[SuSE 8.2] gcc 3.3.1-0 update leads to compile errors in glibc-devel files
Hi there! Today I upgraded my gcc to 3.3.1-0 using the newly provided SuSE rpms. These are the updated rpms: gcc-c++-3.3.1-0.i586.rpm gnat-3.3.1-0.i586.rpm libobjc-3.3.1-0.i586.rpm gcc-g77-3.3.1-0.i586.rpm gnat-runtime-3.3.1-0.i586.rpm libstdc++-3.3.1-0.i586.rpm cpp-3.3.1-0.i586.rpm gcc-info-3.3.1-0.i586.rpm libgcc-3.3.1-0.i586.rpm libstdc++-devel-3.3.1-0.i586.rpm gcc-3.3.1-0.i586.rpm gcc-java-3.3.1-0.i586.rpm libgcj-3.3.1-0.i586.rpm gcc-3.3.1-0.src.rpm gcc-objc-3.3.1-0.i586.rpm libgcj-devel-3.3.1-0.i586.rpm However, some programs do not compile anymore (in this case kdemultimedia) because of errors in a glibc-devel file: Compiling kdemultimedia CVS: In file included from /usr/include/linux/byteorder/little_endian.h:11, from /usr/include/asm/byteorder.h:32, from /usr/include/linux/cdrom.h:14, from cdromAccess_Linux.cpp:17, from cdromAccess.cpp:30: /usr/include/linux/byteorder/swab.h: In function `const __u32 __fswab24(unsigned int)': /usr/include/linux/byteorder/swab.h:174: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:174: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h: In function `__u32 __swab24p(__u32*)': /usr/include/linux/byteorder/swab.h:178: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:178: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h: In function `void __swab24s(__u32*)': /usr/include/linux/byteorder/swab.h:182: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:182: error: ISO C++ forbids braced-groups within expressions make[4]: *** [cdromAccess.lo] Fehler 1 I didn't find an up-to-date SuSE rpm for glibc and glibc-devel. The version shipped with 8.2 is 2.3.2-6... Who can help me here? I don't know what to do... Please CC me, I'm not in this list. Thanks a lot in advance :-) Thorben
Thorben Kröger <ThorbenKroeger@web.de> [Fri, 22 Aug 2003 22:58:04 +0200]:
However, some programs do not compile anymore (in this case kdemultimedia) because of errors in a glibc-devel file:
For the time being try editing the file yourself. First make a backup copy of the file. Then change these macros #define ___swab16(x) \ ({ \ __u16 __x = (x); \ ((__u16)( \ (((__u16)(__x) & (__u16)0x00ffU) << 8) | \ (((__u16)(__x) & (__u16)0xff00U) >> 8) )); \ }) So they look like this: #define ___swab16(x) \ (__extension__{ \ __u16 __x = (x); \ ((__u16)( \ (((__u16)(__x) & (__u16)0x00ffU) << 8) | \ (((__u16)(__x) & (__u16)0xff00U) >> 8) )); \ }) i.e. add __extension__ before the braced group. This should do the trick. I'll talk with my colleague whether or not to put a modified glibc-devel in /pub/projects/gcc/8.2 sometime next week. In the future *please* report things like this at http://www.suse.de/feedback as I clearly stated in the READMEs (if you haven't already done so)! Otherwise chances are very high that we'll never notice it. Philipp
-- Philipp Thomas work: pthomas@suse.de private: philipp.thomas@t-link.de
OK, I added __extension__ to those macros but it still doesn't work; here is what I get: /usr/include/linux/byteorder/swab.h: In function `const __u32 __fswab24(unsigned int)': /usr/include/linux/byteorder/swab.h:174: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:174: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:174: error: `__x' undeclared (first use this function) /usr/include/linux/byteorder/swab.h:174: error: (Each undeclared identifier is reported only once for each function it appears in.) /usr/include/linux/byteorder/swab.h: At global scope: /usr/include/linux/byteorder/swab.h:174: error: parse error before `)' token /usr/include/linux/byteorder/swab.h: In function `__u32 __swab24p(__u32*)': /usr/include/linux/byteorder/swab.h:178: error: parse error before `{' token /usr/include/linux/byteorder/swab.h: At global scope: /usr/include/linux/byteorder/swab.h:178: error: parse error before `)' token /usr/include/linux/byteorder/swab.h: In function `void __swab24s(__u32*)': /usr/include/linux/byteorder/swab.h:182: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:182: error: parse error before `)' token
Thorben Kröger <ThorbenKroeger@web.de> [Fri, 22 Aug 2003 22:58:04 +0200]:
OK, second try. Could you please post *all* options that are passed to gcc? Philipp -- Philipp Thomas work: pthomas@suse.de private: philipp.thomas@t-link.de
On Saturday 23 August 2003 13:52, Philipp Thomas wrote:
OK, second try. Could you please post *all* options that are passed to gcc?
Entering directory `/home/thorben/src/cvs/kdemultimedia/mpeglib/lib/input' if /bin/sh ../../../libtool --silent --mode=compile --tag=CXX g++ - DHAVE_CONFIG_H -I. -I. -I../../.. -I/home/thorben/kdecvs/include -I/home/ thorben/src/cvs/qt-copy//include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W - Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE - Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security -Wmissing- format-attribute -fno-exceptions -fno-check-new -fno-common - DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT - DQT_NO_TRANSLATION -MT cdromAccess.lo -MD -MP -MF ".deps/cdromAccess.Tpo" \ -c -o cdromAccess.lo `test -f 'cdromAccess.cpp' || echo './'`cdromAccess. cpp; \ then mv ".deps/cdromAccess.Tpo" ".deps/cdromAccess.Plo"; \ else rm -f ".deps/cdromAccess.Tpo"; exit 1; \ fi In file included from /usr/include/linux/byteorder/little_endian.h:11, from /usr/include/asm/byteorder.h:32, from /usr/include/linux/cdrom.h:14, from cdromAccess_Linux.cpp:17, from cdromAccess.cpp:30: /usr/include/linux/byteorder/swab.h: In function `const __u32 __fswab24(unsigned int)': /usr/include/linux/byteorder/swab.h:174: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:174: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:174: error: `__x' undeclared (first use this function) /usr/include/linux/byteorder/swab.h:174: error: (Each undeclared identifier is reported only once for each function it appears in.) /usr/include/linux/byteorder/swab.h: At global scope: /usr/include/linux/byteorder/swab.h:174: error: parse error before `)' token /usr/include/linux/byteorder/swab.h: In function `__u32 __swab24p(__u32*)': /usr/include/linux/byteorder/swab.h:178: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:178: error: parse error before `{' token /usr/include/linux/byteorder/swab.h: At global scope: /usr/include/linux/byteorder/swab.h:178: error: parse error before `)' token /usr/include/linux/byteorder/swab.h: In function `void __swab24s(__u32*)': /usr/include/linux/byteorder/swab.h:182: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:182: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:182: error: parse error before `)' token make[4]: *** [cdromAccess.lo] Fehler 1 make[4]: Leaving directory `/home/thorben/src/cvs/kdemultimedia/mpeglib/lib/ input' make[3]: *** [all-recursive] Fehler 1 make[3]: Leaving directory `/home/thorben/src/cvs/kdemultimedia/mpeglib/lib' make[2]: *** [all-recursive] Fehler 1 make[2]: Leaving directory `/home/thorben/src/cvs/kdemultimedia/mpeglib' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory `/home/thorben/src/cvs/kdemultimedia' make: *** [all] Fehler 2 Here is the diff for the file swab.h: --- swab.h.old 2003-08-23 00:11:47.000000000 +0200 +++ swab.h 2003-08-24 11:02:25.000000000 +0200 @@ -22 +22 @@ -({ \ +(__extension__{ \ @@ -30 +30 @@ -({ \ +(__extension__{ \ @@ -39 +39 @@ -({ \ +(__extension__{ \ @@ -49 +49 @@ -({ \ +(__extension__{ \ @@ -92 +92 @@ -# define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); }) +# define __arch__swab16(x) (__extension__{ __u16 __tmp = (x) ; ___swab16 (__tmp); }) @@ -95 +95 @@ -# define __arch__swab24(x) ({ __u32 __tmp = (x) ; ___swab24(__tmp); }) +# define __arch__swab24(x) (__extension__{ __u32 __tmp = (x) ; ___swab24 (__tmp); }) @@ -98 +98 @@ -# define __arch__swab32(x) ({ __u32 __tmp = (x) ; ___swab32(__tmp); }) +# define __arch__swab32(x) (__extension__{ __u32 __tmp = (x) ; ___swab32 (__tmp); }) @@ -101 +101 @@ -# define __arch__swab64(x) ({ __u64 __tmp = (x) ; ___swab64(__tmp); }) +# define __arch__swab64(x) (__extension__{ __u64 __tmp = (x) ; ___swab64 (__tmp); }) Thorben
Thorben Kröger <ThorbenKroeger@web.de> [Sun, 24 Aug 2003 11:08:27 +0200]:
As I thought :) Remove -pedantic and -ansi from the compiler flags (probably CXXFLAGS in the Makefile). That should turn the errors into warnings and let it continue to compile. Philipp
Thorben Kröger <ThorbenKroeger@web.de> [Fri, 22 Aug 2003 22:58:04 +0200]:
However, some programs do not compile anymore (in this case kdemultimedia) because of errors in a glibc-devel file:
For the time being try editing the file yourself. First make a backup copy of the file. Then change these macros #define ___swab16(x) \ ({ \ __u16 __x = (x); \ ((__u16)( \ (((__u16)(__x) & (__u16)0x00ffU) << 8) | \ (((__u16)(__x) & (__u16)0xff00U) >> 8) )); \ }) So they look like this: #define ___swab16(x) \ (__extension__{ \ __u16 __x = (x); \ ((__u16)( \ (((__u16)(__x) & (__u16)0x00ffU) << 8) | \ (((__u16)(__x) & (__u16)0xff00U) >> 8) )); \ }) i.e. add __extension__ before the braced group. This should do the trick. I'll talk with my colleague whether or not to put a modified glibc-devel in /pub/projects/gcc/8.2 sometime next week. In the future *please* report things like this at http://www.suse.de/feedback as I clearly stated in the READMEs (if you haven't already done so)! Otherwise chances are very high that we'll never notice it. Philipp
-- Philipp Thomas work: pthomas@suse.de private: philipp.thomas@t-link.de
OK, I added __extension__ to those macros but it still doesn't work; here is what I get: /usr/include/linux/byteorder/swab.h: In function `const __u32 __fswab24(unsigned int)': /usr/include/linux/byteorder/swab.h:174: error: ISO C++ forbids braced-groups within expressions /usr/include/linux/byteorder/swab.h:174: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:174: error: `__x' undeclared (first use this function) /usr/include/linux/byteorder/swab.h:174: error: (Each undeclared identifier is reported only once for each function it appears in.) /usr/include/linux/byteorder/swab.h: At global scope: /usr/include/linux/byteorder/swab.h:174: error: parse error before `)' token /usr/include/linux/byteorder/swab.h: In function `__u32 __swab24p(__u32*)': /usr/include/linux/byteorder/swab.h:178: error: parse error before `{' token /usr/include/linux/byteorder/swab.h: At global scope: /usr/include/linux/byteorder/swab.h:178: error: parse error before `)' token /usr/include/linux/byteorder/swab.h: In function `void __swab24s(__u32*)': /usr/include/linux/byteorder/swab.h:182: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:182: error: parse error before `)' token
Thorben Kröger <ThorbenKroeger@web.de> [Fri, 22 Aug 2003 22:58:04 +0200]:
OK, second try. Could you please post *all* options that are passed to gcc? Philipp -- Philipp Thomas work: pthomas@suse.de private: philipp.thomas@t-link.de
On Saturday 23 August 2003 13:52, Philipp Thomas wrote:
OK, second try. Could you please post *all* options that are passed to gcc?
Entering directory `/home/thorben/src/cvs/kdemultimedia/mpeglib/lib/input' if /bin/sh ../../../libtool --silent --mode=compile --tag=CXX g++ - DHAVE_CONFIG_H -I. -I. -I../../.. -I/home/thorben/kdecvs/include -I/home/ thorben/src/cvs/qt-copy//include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W - Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE - Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security -Wmissing- format-attribute -fno-exceptions -fno-check-new -fno-common - DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT - DQT_NO_TRANSLATION -MT cdromAccess.lo -MD -MP -MF ".deps/cdromAccess.Tpo" \ -c -o cdromAccess.lo `test -f 'cdromAccess.cpp' || echo './'`cdromAccess. cpp; \ then mv ".deps/cdromAccess.Tpo" ".deps/cdromAccess.Plo"; \ else rm -f ".deps/cdromAccess.Tpo"; exit 1; \ fi In file included from /usr/include/linux/byteorder/little_endian.h:11, from /usr/include/asm/byteorder.h:32, from /usr/include/linux/cdrom.h:14, from cdromAccess_Linux.cpp:17, from cdromAccess.cpp:30: /usr/include/linux/byteorder/swab.h: In function `const __u32 __fswab24(unsigned int)': /usr/include/linux/byteorder/swab.h:174: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:174: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:174: error: `__x' undeclared (first use this function) /usr/include/linux/byteorder/swab.h:174: error: (Each undeclared identifier is reported only once for each function it appears in.) /usr/include/linux/byteorder/swab.h: At global scope: /usr/include/linux/byteorder/swab.h:174: error: parse error before `)' token /usr/include/linux/byteorder/swab.h: In function `__u32 __swab24p(__u32*)': /usr/include/linux/byteorder/swab.h:178: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:178: error: parse error before `{' token /usr/include/linux/byteorder/swab.h: At global scope: /usr/include/linux/byteorder/swab.h:178: error: parse error before `)' token /usr/include/linux/byteorder/swab.h: In function `void __swab24s(__u32*)': /usr/include/linux/byteorder/swab.h:182: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:182: error: parse error before `{' token /usr/include/linux/byteorder/swab.h:182: error: parse error before `)' token make[4]: *** [cdromAccess.lo] Fehler 1 make[4]: Leaving directory `/home/thorben/src/cvs/kdemultimedia/mpeglib/lib/ input' make[3]: *** [all-recursive] Fehler 1 make[3]: Leaving directory `/home/thorben/src/cvs/kdemultimedia/mpeglib/lib' make[2]: *** [all-recursive] Fehler 1 make[2]: Leaving directory `/home/thorben/src/cvs/kdemultimedia/mpeglib' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory `/home/thorben/src/cvs/kdemultimedia' make: *** [all] Fehler 2 Here is the diff for the file swab.h: --- swab.h.old 2003-08-23 00:11:47.000000000 +0200 +++ swab.h 2003-08-24 11:02:25.000000000 +0200 @@ -22 +22 @@ -({ \ +(__extension__{ \ @@ -30 +30 @@ -({ \ +(__extension__{ \ @@ -39 +39 @@ -({ \ +(__extension__{ \ @@ -49 +49 @@ -({ \ +(__extension__{ \ @@ -92 +92 @@ -# define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); }) +# define __arch__swab16(x) (__extension__{ __u16 __tmp = (x) ; ___swab16 (__tmp); }) @@ -95 +95 @@ -# define __arch__swab24(x) ({ __u32 __tmp = (x) ; ___swab24(__tmp); }) +# define __arch__swab24(x) (__extension__{ __u32 __tmp = (x) ; ___swab24 (__tmp); }) @@ -98 +98 @@ -# define __arch__swab32(x) ({ __u32 __tmp = (x) ; ___swab32(__tmp); }) +# define __arch__swab32(x) (__extension__{ __u32 __tmp = (x) ; ___swab32 (__tmp); }) @@ -101 +101 @@ -# define __arch__swab64(x) ({ __u64 __tmp = (x) ; ___swab64(__tmp); }) +# define __arch__swab64(x) (__extension__{ __u64 __tmp = (x) ; ___swab64 (__tmp); }) Thorben
Thorben Kröger <ThorbenKroeger@web.de> [Sun, 24 Aug 2003 11:08:27 +0200]:
As I thought :) Remove -pedantic and -ansi from the compiler flags (probably CXXFLAGS in the Makefile). That should turn the errors into warnings and let it continue to compile. Philipp
participants (2)
-
Philipp Thomas
-
Thorben Kröger