I'm using gcc 3.2.3-r2. Here
I'm using gcc 3.2.3-r2. Here´s where it stopped: /bin/sh ../../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/3.2/include -I/usr/qt/3/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DNDEBUG -O2 -march=pentium3 -O2 -pipe -fomit-frame-pointer -Wformat-security -Wmissing-format-attribute -c -o plat_linux.lo `test -f 'plat_linux.c' || echo './'`plat_linux.c rm: cannot remove `': Invalid argument In file included from /usr/include/linux/cdrom.h:14, from plat_linux.c:84: /usr/include/asm/byteorder.h:38: syntax error before "__u64" plat_linux.c: In function `gen_init': plat_linux.c:134: warning: unused parameter `d' plat_linux.c: In function `gen_play': plat_linux.c:520: warning: left-hand operand of comma expression has no effect plat_linux.c:520: warning: left-hand operand of comma expression has no effect plat_linux.c:520: warning: left-hand operand of comma expression has no effect plat_linux.c:520: warning: statement with no effect plat_linux.c: In function `gen_pause': plat_linux.c:557: warning: statement with no effect plat_linux.c: In function `gen_resume': plat_linux.c:567: warning: statement with no effect plat_linux.c: In function `gen_stop': plat_linux.c:577: warning: statement with no effect plat_linux.c: In function `gen_eject': plat_linux.c:637: warning: statement with no effect plat_linux.c: In function `gen_set_volume': plat_linux.c:724: warning: left-hand operand of comma expression has no effect plat_linux.c:724: warning: left-hand operand of comma expression has no effect plat_linux.c:724: warning: statement with no effect plat_linux.c: In function `gen_get_volume': plat_linux.c:743: warning: left-hand operand of comma expression has no effect plat_linux.c:743: warning: left-hand operand of comma expression has no effect plat_linux.c:743: warning: statement with no effect make[4]: *** [plat_linux.lo] Error 1 make[4]: Leaving directory `/var/tmp/portage/kdemultimedia-3.2.0_beta1/work/kdemultimedia-3.1.93/kscd/libwm'
*** This bug has been marked as a duplicate of 32246 ***
I don't see why this is a duplicate. 32246 is about compiling KDE 3.1.4 stuff with gcc 3.3. I try to compile 3.2-beta stuff with gcc 3.2.
The issue is not compiling kde, or what gcc used, it is the linux-headers used. What does the following give you: # qpkg -I -v linux-headers Also, did you remove /usr/include/{asm,linux} and link them to your running kernel, and if so, what version kernel ?
Azarah's right, which makes this a dupe. /usr/include/asm/byteorder.h:38: syntax error before "__u64 Is your error.
This can be corrected by removing "-ansi" from the compiler flags. Worked for me. Also mentioned somewhere on bugs.kde.org.
Possibly a stupid question, but how did you remove the -ansi flag?
I will not mark dup at this time, but it is the same bug.
For what it's worth, you can modify the linux header on line 38 (byteorder.h) from static inline __64 ___arch__swab64(__u64 val) to static __inline__ __64 ___arch__swab64(__u64 val) and the error will go away. I'm not sure if this causes other errors, as I'm not sure of the overall impact of this change. The error goes away without changing the headers, and I'm happy. :-) For the record, using gcc3.3.2-r2, linux-headers-2.4.21.
FYI, an easy way to get it to work with only modifying the ebuild is to add "--disable-warnings" to the configure options. It worked for me.
It does not work here (nor can I see how, as __u64 is still not defined): -- azarah@nosferatu tmp $ cat u64-test.c #include <asm/types.h> #if defined(foo) static inline __u64 ___arch__swab64(__u64 val) { return val; } #else static __inline__ __u64 ___arch__swab64(__u64 val) { return val; } #endif azarah@nosferatu tmp $ gcc -c u64-test.c -ansi u64-test.c:9: error: syntax error before "___arch__swab64" u64-test.c:9: error: syntax error before "val" u64-test.c: In function `___arch__swab64': u64-test.c:11: error: `val' undeclared (first use in this function) u64-test.c:11: error: (Each undeclared identifier is reported only once u64-test.c:11: error: for each function it appears in.) azarah@nosferatu tmp $ gcc -c u64-test.c -ansi -Dfoo u64-test.c:4: error: syntax error before "__u64" u64-test.c:4: error: syntax error before "val" u64-test.c: In function `___arch__swab64': u64-test.c:6: error: `val' undeclared (first use in this function) u64-test.c:6: error: (Each undeclared identifier is reported only once u64-test.c:6: error: for each function it appears in.) azarah@nosferatu tmp $