RE: [SLE] Little_endian.h errors
I looked at your post, and got this reply on the mythtv list, but still won't work.
You can try the following workaround in all the source files that #include <linux/cdrom.h>:
#ifdef HAVE_LINUX_CDROM_H /* linux 2.6.9 workaround */ # include <linux/version.h> # if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,9) # include <asm/types.h> # define __le64 __u64 # define __le32 __u32 # define __le16 __u16 # define __be64 __u64 # define __be32 __u32 # define __be16 __u16 # endif /* linux 2.6.9 workaround */ # include <linux/cdrom.h> #endif
-=Khanh=-
-----Original Message----- From: Joe Morris (NTM) [mailto:Joe_Morris@ntm.org] Sent: Tuesday, June 14, 2005 6:02 PM To: suse-linux-e@suse.com Subject: Re: [SLE] Little_endian.h errors
Khanh Tran wrote:
I've been trying to compile MythTV 0.18.1 on SuSE 9.2, Are you sure that is 9.2 and not 9.3? however I keep getting the following errors. Anyone know what to do?
mythcdrom-linux.cpp In file included from /usr/include/asm/byteorder.h:59, from /usr/include/linux/cdrom.h:14, from mythcdrom-linux.cpp:3: /usr/include/linux/byteorder/little_endian.h:43: error: syntax error before `(' token /usr/include/linux/byteorder/little_endian.h:47: error: syntax error before `*' token /usr/include/linux/byteorder/little_endian.h: In function `__u64 __le64_to_cpup(...)': /usr/include/linux/byteorder/little_endian.h:49: error: `p' undeclared (first use this function)
This looks a lot like the bug I was working to figure out to get kscd to get compiled in 9.3 with cdda support. The kscd author told me it was a glibc bug. Assuming it is 9.3, the problem is [Disclaimer: I am not a programmer, and my code reading and terminology is therefore highly suspect] there is a reference to cdrom.h in mythcdrom-linux.cpp, which references byteorder, which references little_endian.h, which is defined in types.h as #if defined(__GNUC__) && !defined(__STRICT_ANSI__) *typedef* __u64 __bitwise __le64; *typedef* __u64 __bitwise __be64; #endif
If cdrom.h is defined with __STRICT_ANSI__, it breaks the definition and causes the little_endian error. I unfortunately don't know which has a bug, what it is or should be. You could search the archives and take a look at the patch I used to get this to work with kscd. Maybe it will give you an idea of a fix? /workaround?
-- Joe Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Registered Linux user 231871
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
participants (1)
-
Khanh Tran