tag 667412 patch
thanks

Matthias Klose <[email protected]> (03/04/2012):
> Package: vowpal-wabbit
> Version: 5.1+83-gffab10a-1
> Severity: important
> Tags: sid wheezy
> User: [email protected]
> Usertags: ftbfs-gcc-4.7

Here's a patch to fix the FTBFS. No intent to NMU from my side.

Mraw,
KiBi.
diff -Nru vowpal-wabbit-5.1+83-gffab10a/debian/changelog vowpal-wabbit-5.1+83-gffab10a/debian/changelog
--- vowpal-wabbit-5.1+83-gffab10a/debian/changelog	2011-07-06 22:21:28.000000000 +0000
+++ vowpal-wabbit-5.1+83-gffab10a/debian/changelog	2012-04-04 16:45:24.000000000 +0000
@@ -1,3 +1,10 @@
+vowpal-wabbit (5.1+83-gffab10a-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTBFS with gcc 4.7 by fixing a bunch of missing includes (Closes: #667412).
+
+ -- Cyril Brulebois <[email protected]>  Wed, 04 Apr 2012 16:45:04 +0000
+
 vowpal-wabbit (5.1+83-gffab10a-1) unstable; urgency=low
 
   * Fresh upstream snapshot addressing LDA tests errors on 32bit
diff -Nru vowpal-wabbit-5.1+83-gffab10a/debian/patches/fix-ftbfs-with-gcc-4.7 vowpal-wabbit-5.1+83-gffab10a/debian/patches/fix-ftbfs-with-gcc-4.7
--- vowpal-wabbit-5.1+83-gffab10a/debian/patches/fix-ftbfs-with-gcc-4.7	1970-01-01 00:00:00.000000000 +0000
+++ vowpal-wabbit-5.1+83-gffab10a/debian/patches/fix-ftbfs-with-gcc-4.7	2012-04-04 16:46:40.000000000 +0000
@@ -0,0 +1,74 @@
+Description: Fix FTBFS with gcc 4.7 by fixing a bunch of missing includes.
+Author: Cyril Brulebois <[email protected]>
+Bug-Debian: http://bugs.debian.org/667412
+
+--- vowpal-wabbit-5.1+83-gffab10a.orig/v_array.h
++++ vowpal-wabbit-5.1+83-gffab10a/v_array.h
+@@ -7,6 +7,8 @@ embodied in the content of this file are
+ #ifndef VARRAY_H__
+ #define VARRAY_H__
+ #include <stdlib.h>
++#include <cstring>
++#include <algorithm>
+ 
+ template<class T> class v_array{
+  public:
+@@ -43,7 +45,7 @@ template<class T> void push_many(v_array
+   if(v.end+num >= v.end_array)
+     {
+       size_t length = v.end - v.begin;
+-      size_t new_length = max(2 * (size_t)(v.end_array - v.begin) + 3, 
++      size_t new_length = std::max(2 * (size_t)(v.end_array - v.begin) + 3, 
+ 			      v.end - v.begin + num);
+       v.begin = (T *)realloc(v.begin,sizeof(T) * new_length);
+       v.end = v.begin + length;
+--- vowpal-wabbit-5.1+83-gffab10a.orig/allreduce_master.cc
++++ vowpal-wabbit-5.1+83-gffab10a/allreduce_master.cc
+@@ -17,6 +17,7 @@ This creates a binary tree topology over
+ #include <string>
+ #include <iostream>
+ #include <cmath>
++#include <unistd.h>
+ 
+ using namespace std;
+ 
+--- vowpal-wabbit-5.1+83-gffab10a.orig/active_interactor.cc
++++ vowpal-wabbit-5.1+83-gffab10a/active_interactor.cc
+@@ -6,6 +6,7 @@
+ #include <netinet/in.h>
+ #include <netinet/tcp.h>
+ #include <netdb.h>
++#include <unistd.h>
+ 
+ using std::cin;
+ using std::endl;
+--- vowpal-wabbit-5.1+83-gffab10a.orig/allreduce.cc
++++ vowpal-wabbit-5.1+83-gffab10a/allreduce.cc
+@@ -21,6 +21,7 @@ Alekh Agarwal and John Langford, with he
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/timeb.h>
++#include <unistd.h>
+ #include "allreduce.h"
+ 
+ using namespace std;
+--- vowpal-wabbit-5.1+83-gffab10a.orig/io.h
++++ vowpal-wabbit-5.1+83-gffab10a/io.h
+@@ -8,6 +8,7 @@ embodied in the content of this file are
+ #define IO_H__
+ 
+ #include <fcntl.h>
++#include <unistd.h>
+ #include "v_array.h"
+ #include<iostream>
+ 
+--- vowpal-wabbit-5.1+83-gffab10a.orig/network.cc
++++ vowpal-wabbit-5.1+83-gffab10a/network.cc
+@@ -9,6 +9,7 @@
+ 
+ #include <string>
+ #include <iostream>
++#include <unistd.h>
+ 
+ using namespace std;
+ 
diff -Nru vowpal-wabbit-5.1+83-gffab10a/debian/patches/series vowpal-wabbit-5.1+83-gffab10a/debian/patches/series
--- vowpal-wabbit-5.1+83-gffab10a/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ vowpal-wabbit-5.1+83-gffab10a/debian/patches/series	2012-04-04 16:46:25.000000000 +0000
@@ -0,0 +1 @@
+fix-ftbfs-with-gcc-4.7

Attachment: signature.asc
Description: Digital signature

Reply via email to