[Pkg-octave-devel] Bug#505373: FTBFS with GCC 4.4: missing #include

Martin Michlmayr tbm at cyrius.com
Tue Nov 11 21:56:55 UTC 2008


Package: octave2.1
Version: 1:2.1.73-19
User: debian-gcc at lists.debian.org
Usertags: ftbfs-gcc-4.4
Tags: patch

Your package fails to build with the upcoming GCC 4.4.  Version 4.4
has not been released yet but I'm building with a snapshot in order
to find errors and give people an advance warning.

GCC 4.4 cleaned up some more C++ headers.  You always have to #include
headers directly and cannot rely for things to be included indirectly.

You can reproduce this problem with gcc-snapshot from unstable.

> Automatic build of octave2.1_1:2.1.73-19 on em64t by sbuild/amd64 0.53
...
> make[4]: Leaving directory `/build/tbm/octave2.1-2.1.73/scripts/time'
> g++ -O2 -o gethelp gethelp.cc 
> gethelp.cc: In function 'std::string extract_help_text()':
> gethelp.cc:58: error: 'EOF' was not declared in this scope
> make[3]: *** [gethelp] Error 1

After fixing this, the build also fails with the following (as does octave3.0):

make[2]: Entering directory `/home/tbm/octave2.1-2.1.73/src'
g++  -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -g -O2 -rdynamic \
        -L..  -fPIC  -o octave \
        main.o  \
        -L../liboctave -L../libcruft -L../src -Wl,-rpath -Wl,/usr/lib/octave-2.1.73 \
        -loctinterp -loctave  -lcruft   \
         -llapackgf-3 -lblas-3gf -lfftw3 -lreadline  -lncurses -ldl -lhdf5 -lz -lm  -L/usr/lib/gcc/x86_64-linux-gnu/4.3.2 -L/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../.. -lhdf5 -lz -lgfortranbegin -lgfortran -lm
../src/liboctinterp.so: undefined reference to `std::ctype<char>::_M_widen_init() const'
collect2: ld returned 1 exit status
make[2]: *** [octave] Error 1


--- scripts/gethelp.cc~	2008-11-11 21:07:53.000000000 +0000
+++ scripts/gethelp.cc	2008-11-11 21:07:58.000000000 +0000
@@ -2,6 +2,7 @@
 #define __USE_STD_IOSTREAM
 #endif
 
+#include <cstdio>
 #include <string>
 #include <iostream>
 

-- 
Martin Michlmayr
http://www.cyrius.com/





More information about the Pkg-octave-devel mailing list