[Clfs-support] Problem with Linux (2.6.17.13-09092006) header
David Whitney
dwhitney67 at gmail.com
Mon Nov 19 00:15:21 PST 2007
Hello,
I've been trying to track down the URL where I can look for additional
patches (if any) for the Linux kernel that I used to build CLFS. I am
having trouble compiling an application that uses the swab.h header file in
the /usr/include/linux/byteorder directory.
Here's the error I am getting:
archiver Makefile - compiling: source/cdrom/ArcCDInterface.cpp
In file included from
/home/whitney/olymed/olylfs/usr/include/linux/byteorder/little_endian.h:12,
from
/home/whitney/olymed/olylfs/usr/include/asm/byteorder.h:6,
from
/home/whitney/olymed/olylfs/usr/include/linux/cdrom.h:14,
from source/cdrom/ArcCDInterface.cpp:25:
/home/whitney/olymed/olylfs/usr/include/linux/byteorder/swab.h:80:1: error:
"___constant_swab16" redefined
/home/whitney/olymed/olylfs/usr/include/linux/byteorder/swab.h:55:1: error:
this is the location of the previous definition
/home/whitney/olymed/olylfs/usr/include/linux/byteorder/swab.h:81:1: error:
"___constant_swab32" redefined
/home/whitney/olymed/olylfs/usr/include/linux/byteorder/swab.h:59:1: error:
this is the location of the previous definition
/home/whitney/olymed/olylfs/usr/include/linux/byteorder/swab.h:82:1: error:
"___constant_swab64" redefined
/home/whitney/olymed/olylfs/usr/include/linux/byteorder/swab.h:65:1: error:
this is the location of the previous definition
make[1]: *** [release/cdrom/ArcCDInterface.o] Error 1
Upon examination of swab.h, it is quite apparent what is causing the issue.
Here's a sample:
55 #define ___constant_swab16(x) \
56 ((__u16)( \
57 (((__u16)(x) & (__u16)0x00ffU) << 8) | \
58 (((__u16)(x) & (__u16)0xff00U) >> 8) ))
...
80 #define ___constant_swab16(x) __bswap_constant_16(x)
Normally the redeclaration of a constant, or in this case a macro, would
cause a warning to be issued by GCC, however I am compiling with the -Werror
option. Either way, it seems odd that a multiple definition of this macro
exists. I've noticed in the headers for kernel 2.6.23.1-21 on my Fedora 7
system the issue no longer exists. Is there a remedy for this issue (i.e. a
patch) if I wish to remain using the kernel version 2.6.17.13 as specified
in the CLFS-1.0 guide?
Thank you in advance for your suggestions.
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20071119/1c3af37b/attachment-0001.html>
More information about the Clfs-support
mailing list