Version: CVS as of Sunday 16 January 2005 (using KDE Devel) Installed from: Compiled sources Compiler: gcc (GCC) 3.4.3 (Gentoo Linux 3.4.3, ssp-3.4.3-0, pie-8.7.6.6) OS: Linux Just got a new AMD64, and compiling KDE from CVS results in an error compiling kdemultimedia/mpeglib/lib/input/cdromAccess.cpp Specifically: /usr/include/asm/types.h:32: error: conflicting declaration 'typedef long long unsigned int __u64' cdromAccess.cpp:32: error: '__u64' has a previous declaration as `typedef long unsigned int __u64' /usr/include/asm/types.h:32: error: declaration of `typedef long long unsigned int __u64' cdromAccess.cpp:32: error: conflicts with previous declaration `typedef long unsigned int __u64' /usr/include/asm/types.h:32: error: declaration of `typedef long long unsigned int __u64' cdromAccess.cpp:32: error: conflicts with previous declaration `typedef long unsigned int __u64' make: *** [cdromAccess.lo] Error 1 What seems to be happening is that in KERNEL_VERSION > 2.5.70, it's using the kernel headers, but it's being redefined right after that due to the 1.09->1.10 revision in CVS of the file. The addition of an additional #ifdef __u64 should fix it. (as the diff below has) --- /usr/portage/distfiles/cvs-src/kde/kdemultimedia/mpeglib/lib/input/cdromAccess.cpp 2004-12-16 15:36:44.000000000 -0600 +++ kdemultimedia/mpeglib/lib/input/cdromAccess.cpp 2005-01-16 04:15:10.378563408 -0600 @@ -28,6 +28,7 @@ #ifndef __u64 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,70) #include <bits/wordsize.h> + #ifndef __u64 #if __WORDSIZE == 64 typedef unsigned long __u64; #else @@ -35,6 +36,7 @@ #endif #endif #endif + #endif #include "cdromAccess_Linux.cpp" #endif
Ooops, mistake in the above. Don't use.
The kernel's definition of __u64 for x86-64 appears to be unsigned long long, conflicting with the word size test used. Changing #if __WORDSIZE == 64 to #if __WORDSIZE == 64 && !defined(__x86_64__) fixes it for me. And should fix it for all x86-64 users.
See also: http://bugs.gentoo.org/show_bug.cgi?id=74961
Can someone apply this, because as of Gentoo patch applied to 3.4.0 which works here: --- mpeglib/lib/input/cdromAccess.cpp.org 2005-02-02 14:06:28.000000000 +0100 +++ mpeglib/lib/input/cdromAccess.cpp 2005-02-02 14:07:30.000000000 +0100 @@ -27,6 +27,9 @@ #include <sys/types.h> #ifndef __u64 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,70) + #ifdef __x86_64__ + typedef unsigned long long __u64; + #else #include <bits/wordsize.h> #if __WORDSIZE == 64 typedef unsigned long __u64; @@ -35,6 +38,7 @@ #endif #endif #endif + #endif #include "cdromAccess_Linux.cpp" #endif
*** Bug 100476 has been marked as a duplicate of this bug. ***
This component has been replaced with Phonon in KDE 4. If this issue still needs to be addressed, please add a comment, or report it for Phonon.