Version: (using KDE KDE 3.0.99) Installed from: Compiled From Sources Compiler: gcc 3.2.1 OS: Linux I am using kernel 2.5.47 (and the 'asm' and 'linux' symlinks are in place in the include directory). I have a build problem with the kdemultimedia package in general - not just kscd - but I couldn't see how to report the bug against kdemultimedia build. The output from gcc (v3.2.1) is: ----------------------------------------------------- In file included from /usr/local/include/linux/cdrom.h:14, from cdromAccess_Linux.cpp:17, from cdromAccess.cpp:26: /usr/local/include/asm/byteorder.h:38: syntax error before `(' token /usr/local/include/asm/byteorder.h:42: '__u64' is used as a type, but is not defined as a type. /usr/local/include/asm/byteorder.h:43: parse error before `}' token /usr/local/include/asm/byteorder.h:44: syntax error before `.' token /usr/local/include/asm/byteorder.h:50: syntax error before `.' token /usr/local/include/asm/byteorder.h:51: syntax error before `.' token /usr/local/include/asm/byteorder.h:52: parse error before `:' token In file included from /usr/local/include/linux/byteorder/little_endian.h:11, from /usr/local/include/asm/byteorder.h:65, from /usr/local/include/linux/cdrom.h:14, from cdromAccess_Linux.cpp:17, from cdromAccess.cpp:26: /usr/local/include/linux/byteorder/swab.h:158: syntax error before `(' token /usr/local/include/linux/byteorder/swab.h:168: syntax error before `(' token /usr/local/include/linux/byteorder/swab.h:172: `__u64' was not declared in this scope /usr/local/include/linux/byteorder/swab.h:172: `addr' was not declared in this scope /usr/local/include/linux/byteorder/swab.h:173: variable or field `__swab64s' declared void /usr/local/include/linux/byteorder/swab.h:173: `__swab64s' declared as an `inline' variable /usr/local/include/linux/byteorder/swab.h:173: syntax error before `{' token ----------------------------------------------------- It seems that this happens because of the following code (taken from asm/types.h): ----------------------------------------------------- #if defined(__GNUC__) && !defined(__STRICT_ANSI__) typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif ----------------------------------------------------- When compiling with the -ansi switch, the __u64 type is undefined, which causes the errors listed above. I don't know whether this is an issue with the kernel headers or with kdemultimedia, but the solution is simple: remove the -ansi switch from the compiler flags and it works perfectly. Please let me know if there are any tests/etc I can do to help.
I have like 3-4 patches for KdeMultimedia which fixes 2.5 kernel issues . I will upload them when I can get home. Actually the problem you mentioned can be resolved by adding typedef unsigned long long __u64; ANSI doesnt support long long thats why it fails :)
a matter of passing the correct flags to the compiler ... look forward to the 2.5 patches (perhaps when 2.5 is nearing completion so as not to make unecessary changes?)
Errr 2.5 kernel is not broken. You better open the bug again . Because kernel wont define a long long variable unless you cut off -ansi or explicitly define it.
since it is a matter of passing the right compiler flags and happens with a devel kernel, i don't consider this a kscd bug. ergo its closed. i've mailed core-devel re: -ansi and the 2.5 kernel. btw, i never said 2.5 was broken. i was referring to the 2.5 patches you have and noting that it may not be the wisest move to put patches in CVS HEAD for a kernel that has only recently moved into feature freeze.
Please note that this same error occurs with GCC 3.3 and kernel 2.4.21. The -ansi switch causes the preprocessor symbol __STRICT_ANSI__ to be defined, which in turn causes the section #if defined(__GNUC__) && !defined(__STRICT_ANSI__) typedef unsigned long long __u64 #endif from /usr/include/asm/types.h (a Linux kernel header) to not be compiled. It occurs in the subdirectories `kscd/libwm' and `mpeglib/lib/input', and can be solved by editing the Makefiles in said directories to remove all occurrences of the `-ansi' flag.
*** Bug 61892 has been marked as a duplicate of this bug. ***
It's not good idea to remove -ansi flags from the Makefile-s. Somebody put them for some purposes. The correct solution is to apply the patch suggested by Niki Guldbrand <niki@lunar-linux.org> to the kernel. After that everything works fine. =========================================================================== --- old/include/asm-i386/byteorder.h 2003-06-13 16:51:38.000000000 +0200 +++ new/include/asm-i386/byteorder.h 2003-09-08 20:59:43.000000000 +0200 @@ -34,7 +34,7 @@ return x; } - +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) static inline __u64 ___arch__swab64(__u64 val) { union { @@ -55,10 +55,11 @@ } #define __arch__swab64(x) ___arch__swab64(x) +#define __BYTEORDER_HAS_U64__ +#endif #define __arch__swab32(x) ___arch__swab32(x) #define __arch__swab16(x) ___arch__swab16(x) -#define __BYTEORDER_HAS_U64__ #endif /* __GNUC__ */ ==================================================
This is already fixed.
I tried to compile kdemultimedia 3.3.1, it fails without the kernel patch (I'm using kernel headers 2.4.27)