[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#455396: FTBFS with GCC 4.3: #define redefined & co



Package: vrweb_1.5-17
Usertags: ftbfs-gcc-4.3

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

Error 1)  GCC 4.3 has converted a number of warnings into errors.
With GCC 4.3, you're no longer to just redefine a previous #define.
You need to either avoid redefinitions directly or to use #ifndef to
make sure that something has not been defined already.  See
http://www.cyrius.com/journal/gcc/gcc-4.3-pedwarn.html

Error 2) GCC 4.3 has converted a number of warnings into errors.
With GCC 4.3, you're no longer allowed to put spurious text after
preprocessor directives, such as #else and #endif.  See
http://www.cyrius.com/journal/gcc/gcc-4.3-pedwarn.html

You can reproduce this problem with gcc-snapshot from unstable.  Note
that Red Hat, Novell and Ubuntu have done some work getting packages
to build with GCC 4.3 so there might be patches floating around
somewhere.  I suggest you talk to your upstream.

> Automatic build of vrweb_1.5-17 on em64t by sbuild/amd64 0.53
...
> g++  -O2  -Dcplusplus_2_1  -DOSMajorVersion=2 -DOSMinorVersion=0 -DLINUX -DHG_OSMaj=2 -DHG_OSMin=0  -I/build/tbm/vrweb-1.5/installed/include   -pipe  -c /build/tbm/vrweb-1.5/src/common/OS/memory.C
> /build/tbm/vrweb-1.5/src/common/OS/memory.C:40:7: error: extra tokens at end of #else directive
> make[4]: *** [memory.o] Error 1
> make[4]: Leaving directory `/build/tbm/vrweb-1.5/src/common/OS/LINUX_ELF'

and later:

> g++ -O -O -DLINUX_ELF -DVERBOSE -DASSERT -Dcplusplus_2_1 -DInterViews -Div_nls  -DOSMajorVersion=2 -DOSMinorVersion=0 -DLINUX -DHG_OSMaj=2 -DHG_OSMin=0  -I/build/tbm/vrweb-1.5/installed/include     -pipe  -c /build/tbm/vrweb-1.5/src/harmony/scene/triangulate.C
> g++ -O -O -DLINUX_ELF -DVERBOSE -DASSERT -Dcplusplus_2_1 -DInterViews -Div_nls  -DOSMajorVersion=2 -DOSMinorVersion=0 -DLINUX -DHG_OSMaj=2 -DHG_OSMin=0  -I/build/tbm/vrweb-1.5/installed/include     -pipe  -c /build/tbm/vrweb-1.5/src/harmony/scene/monotone.C
> /build/tbm/vrweb-1.5/src/harmony/scene/monotone.C:120:1: error: "INFINITY" redefined
> In file included from /usr/include/math.h:40,
>                  from /build/tbm/vrweb-1.5/src/harmony/scene/monotone.C:53:
> /usr/include/bits/inf.h:27:1: error: this is the location of the previous definition
> make[4]: *** [monotone.o] Error 1
> make[4]: Leaving directory `/build/tbm/vrweb-1.5/src/harmony/scene/LINUX_ELF'

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




Reply to: