redefinition of 'struct iovec' problem with new libc-ports

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

redefinition of 'struct iovec' problem with new libc-ports

Bridge Wu
Hello,

I checked out the latest libc-ports from cvs. I met building problem
when using it to build arm-linux toolchain. I used crosstool. The
error appeared at building glibc startfiles which are required by
shared libgcc. In detail, it appeared at compiling
glibc-2.4/sysdeps/unix/sysv/linux/init-first.c. The error is
redefinition error.

In file included from ../ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h:26,
                 from ../io/fcntl.h:34,
                 from ../include/fcntl.h:2,
                 from ../sysdeps/unix/sysv/linux/init-first.c:22:
../sysdeps/unix/sysv/linux/bits/uio.h:20:3: error: #error "Never include <bits/u
io.h> directly; use <sys/uio.h> instead."
In file included from ../misc/sys/uio.h:29,
                 from ../include/sys/uio.h:2,
                 from ../socket/sys/socket.h:27,
                 from ../include/sys/socket.h:2,
                 from ../inet/netinet/in.h:24,
                 from ../include/netinet/in.h:3,
                 from ../resolv/resolv.h:57,
                 from ../include/resolv.h:12,
                 from ../nptl/descr.h:39,
                 from ../ports/sysdeps/arm/nptl/tls.h:63,
                 from ../include/tls.h:6,
                 from ../include/link.h:45,
                 from ../include/dlfcn.h:3,
                 from ../sysdeps/generic/ldsodefs.h:32,
                 from ../ports/sysdeps/arm/ldsodefs.h:39,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from ../sysdeps/unix/sysv/linux/init-first.c:30:
../sysdeps/unix/sysv/linux/bits/uio.h:43: error: redefinition of 'struct iovec'

This is because fcntl.h added below code snippet. If I removed these
three lines, I can get the final toolchain successfully.

in ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h:
#ifdef __USE_GNU
# include <bits/uio.h>
#endif

I'm not clear why this code snippet is needed? If I must use it, do I
miss anything else?

--
best regards,
-Bridge
Reply | Threaded
Open this post in threaded view
|

Re: redefinition of 'struct iovec' problem with new libc-ports

Lior Balkohen
> I checked out the latest libc-ports from cvs. I met building problem

Please check out libc HEAD and try again.
Reply | Threaded
Open this post in threaded view
|

Re: redefinition of 'struct iovec' problem with new libc-ports

Lior Balkohen
2006/6/23, Bridge Wu <[hidden email]>:
> Would you please clarify which I should check out? Does it mean
> libc-2.4 HEAD in glibc-2.4.tar.gz in sourceware cvs server? Which name
> is the module? Is the path [hidden email]:/cvs/glibc?
> Thanks. -Bridge

It's not a good idea to take a ports snapshot in addition to the
glibc-2.4 release tarball since there have been many changes. Please
check out both libc and ports HEAD like:

cvs -z 9 -d :pserver:[hidden email]:/cvs/glibc co libc
cd libc
cvs -z 9 -d :pserver:[hidden email]:/cvs/glibc co ports