This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Duplicate definitions of __NFDBITS, __FDELT, __FDMASK



Bill, here's a good one for you....

I used the build-crossgcc.sh cript to build a ppc cross compiler on an
i686 machine so I can build a linux-2.4.2 kernel for a board I'm
working on. That process worked fine.  Unfortunately when I try to
build up util-linux-2.11 to create the mount utilities and friends,
the compiliation complains that __NFDBITS and __FDMASK() are being
redefined.  It turns out that the <sys/select.h> in glibc-2.2.2
(misc/sys/select.h) doesn't check to see if they have been defined
before, and in this case they were already defined because
<linux/posix_type.h> defined them.  Now the big question is who should
define them???? 

Currently I've modified (in my local copies) <sys/select.h> to have an
#ifndef around the duplicate definitions and so far it compiles.  I
haven't tried running it yet, but the types look like the same size.

Any suggestions on how to properly fix this????

Here's the log from the build:

powerpc-linux-gcc -c -O -pipe -O2 -fsigned-char -fomit-frame-pointer -Wa,-m403 -Ilib -Wall -Wmissing-prototypes -Wstrict-prototypes -I/usr/include/ncurses -DNCH=0  -D_FILE_OFFSET_BITS=64 -DSBINDIR=\"/sbin\" -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\" -DVARPATH=\"/var\" -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_NFS -DMAIN lomount.c -o main_losetup.o
In file included from /usr/local/wave/linux-cross-tools/host/i686-linux-gnu/lib/gcc-lib/ppc-linux-gnu/2.95.3/../../../../ppc-linux-gnu/sys-include/sys/types.h:209,
                 from /usr/local/wave/linux-cross-tools/host/i686-linux-gnu/lib/gcc-lib/ppc-linux-gnu/2.95.3/../../../../ppc-linux-gnu/sys-include/bits/fcntl.h:25,
                 from /usr/local/wave/linux-cross-tools/host/i686-linux-gnu/lib/gcc-lib/ppc-linux-gnu/2.95.3/../../../../ppc-linux-gnu/sys-include/fcntl.h:33,
                 from lomount.c:20:
/usr/local/wave/linux-cross-tools/host/i686-linux-gnu/lib/gcc-lib/ppc-linux-gnu/2.95.3/../../../../ppc-linux-gnu/sys-include/sys/select.h:52: warning: `__NFDBITS' redefined
/usr/local/wave/linux-cross-tools/host/i686-linux-gnu/lib/gcc-lib/ppc-linux-gnu/2.95.3/../../../../ppc-linux-gnu/sys-include/linux/posix_types.h:22: warning: this is the location of the previous definition
/usr/local/wave/linux-cross-tools/host/i686-linux-gnu/lib/gcc-lib/ppc-linux-gnu/2.95.3/../../../../ppc-linux-gnu/sys-include/sys/select.h:56: warning: `__FDMASK' redefined
/usr/local/wave/linux-cross-tools/host/i686-linux-gnu/lib/gcc-lib/ppc-linux-gnu/2.95.3/../../../../ppc-linux-gnu/sys-include/linux/posix_types.h:34: warning: this is the location of the previous definition

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]