compile error: mpeglib/lib/input/cdromAccess.cpp

Jason Harris kstars at 30doradus.org
Thu Feb 10 15:03:33 GMT 2005


Hello,

When compiling kdemultimedia/mpeglib/lib/input/cdromAccess.cpp (CVS), I 
get:

-----------------
In file included from /usr/include/linux/types.h:14,
                 from cdromAccess_Linux.cpp:17,
                 from cdromAccess.cpp:38:
/usr/include/asm/types.h:29: 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:29: 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:29: 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
------------------------

I was able to workaround by commenting out line 32:
  typedef unsigned long __u64;

But the real solution will be to fix the preprocessor logic.  Looking at 
the CVS log for this file, the last commit was made to fix compilation 
on PPC64.  I am on amd64, so I think we need a check for PPC as well as 
64-bit in the #if:

  #if __WORDSIZE == 64 && (defined(__ppc__)||defined(__powerpc__))
  typedef unsigned long __u64;
  #else
  typedef unsigned long long __u64;
  #endif 

This works for me, but of course I have not tested it on PPC64...

regards,
Jason

-- 
KStars: Desktop Planetarium for KDE
http://edu.kde.org/kstars



More information about the kde-multimedia mailing list