multiple definitions of setreuid and __lll_lock_wait_private

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu Jun 12 14:44:07 UTC 2014


Dear Vicente Olivert Riera,

On Tue, 3 Jun 2014 11:38:46 +0100, Vicente Olivert Riera wrote:

> I'm trying to compile cdrkit for static and I'm getting compilation 
> errors due to multiple definitions of setreuid and __lll_lock_wait_private.
> It works fine in a shared built.
> 
> Here are the relevant lines of the build log:
> 
> --------------------------------------
> Linking C executable devdump
> /home/test/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(setreuid.os): 
> In function `setreuid':
> setreuid.c:(.text+0x0): multiple definition of `setreuid'
> /home/test/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpthread.a(pthread_setreuid.os):pthread_setreuid.c:(.text+0x0): 
> first defined here
> collect2: error: ld returned 1 exit status
> --------------------------------------
> 
> and
> 
> --------------------------------------
> Linking C executable genisoimage
> /home/test/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpthread.a(lowlevellock.os): 
> In function `__lll_lock_wait_private':
> lowlevellock.c:(.text+0x0): multiple definition of `__lll_lock_wait_private'
> /home/test/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(libc-lowlevellock.os):libc-lowlevellock.c:(.text+0x0): 
> first defined here
> collect2: error: ld returned 1 exit status
> --------------------------------------

And there are similar problems with vfork:

aserver.o: In function `pcm_shm_cmd':
aserver.c:(.text+0x16df): warning: 
aserver.o: In function `main':
aserver.c:(.text.startup+0x37c): warning: gethostbyname is obsolescent, use getnameinfo() instead.
/home/test/test/1/output/host/usr/i686-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(vfork.os): In function `__GI_vfork':
(.text+0x0): multiple definition of `__vfork'
/home/test/test/1/output/host/usr/i686-buildroot-linux-uclibc/sysroot/usr/lib/libpthread.a(pt-vfork.os):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [aserver] Error 1

See
http://autobuild.buildroot.org/results/ac6/ac6b8e95cbcb79316aa969d09a27c72628d180c5/build-end.log
for a more detailed output.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the uClibc mailing list