[mythtv-users] little_endian.h errors compiliing 0.18.1

Robert Tsai rtsai1111 at comcast.net
Tue Jun 14 21:22:08 UTC 2005


On Tue, Jun 14, 2005 at 05:03:37PM -0400, Khanh Tran wrote:
> I've been trying to compile 0.18.1 on SuSE 9.2, however I keep getting
> the following errors.  Anyone know what to do?

This is a bug in the header files in 2.6.9 (what kernel do you have)?

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

I found this on google somewhere but I can't find it again, so I have
no reference URL. But it allowed me to compile, back when I was on
2.6.9.

If you're going to upgrade your kernel anyway, then you won't need
this workaround.

> make[2]: Entering directory
> `/home/mythtv/download/mythtv.18.1/mythtv-0.18.1/libs/libmyth'
> g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall
> -march=pentium4 -I/opt/kde3/include -pthread
> -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -Wall -W
> -O3 -Wall -Wno-switch -fomit-frame-pointer -D_REENTRANT -DPIC -fPIC
> -DMMX -Di386 -DUSING_IVTV -DUSING_XRANDR -D_GNU_SOURCE
> -D_FILE_OFFSET_BITS=64 -DPREFIX=\"/usr/local\" -DUSING_OSS -DUSE_ALSA
> -DUSE_JOYSTICK_MENU -DUSE_LIRC -DUSE_ARTS -DQT_NO_DEBUG
> -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/default -I.
> -I/usr/local/include -I../libmythsamplerate -I../libmythsoundtouch
> -I../.. -I/usr/include -I/usr/lib/qt3/include -o mythcdrom-linux.o
> 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)
> /usr/include/linux/byteorder/little_endian.h:49: error: (Each undeclared
> identifier is reported only once for each function it appears in.)
> /usr/include/linux/byteorder/little_endian.h: At global scope:
> /usr/include/linux/byteorder/little_endian.h:51: error: syntax error
> before `(' token
> /usr/include/linux/byteorder/little_endian.h:55: error: syntax error
> before `*' token
> /usr/include/linux/byteorder/little_endian.h:59: error: syntax error
> before `(' token
> /usr/include/linux/byteorder/little_endian.h:63: error: syntax error
> before `*' token
> /usr/include/linux/byteorder/little_endian.h:67: error: syntax error
> before `(' token
> /usr/include/linux/byteorder/little_endian.h:71: error: syntax error
> before `*' token
> /usr/include/linux/byteorder/little_endian.h:75: error: syntax error
> before `(' token
> /usr/include/linux/byteorder/little_endian.h:79: error: syntax error
> before `*' token
> /usr/include/linux/byteorder/little_endian.h:83: error: syntax error
> before `(' token
> /usr/include/linux/byteorder/little_endian.h:87: error: syntax error
> before `*' token
> make[2]: *** [mythcdrom-linux.o] Error 1
> make[2]: Leaving directory
> `/home/mythtv/download/mythtv.18.1/mythtv-0.18.1/libs/libmyth'
> make[1]: *** [sub-libmyth] Error 2
> make[1]: Leaving directory
> `/home/mythtv/download/mythtv.18.1/mythtv-0.18.1/libs'
> make: *** [sub-libs] Error 2
> 
> 

> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


--Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20050614/ec40916b/attachment.pgp


More information about the mythtv-users mailing list