On Sat, Jun 28, 2014 at 3:52 AM, Thomas Petazzoni <[email protected]> wrote: > Hello all, > > Any feedback on the problem reported by Vicente? We're having this > problem regularly in Buildroot with various symbols when linking > statically. It would be good to have some input on how to fix the > problem. > > Thanks, > > Thomas >
Attached please find the workaround we currently use. We simply mark non-pthread __lll_lock_wait_private weak, so it wont interfere with the one in pthread under static link mode. Hope this helps. Tony > 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 >> -------------------------------------- >> >> Full build log: http://www.pastebin.ca/2792067 >> >> Distribution: BuildRoot >> Platform: MIPS32 LittleEndian >> > > > > -- > Thomas Petazzoni, CTO, Free Electrons > Embedded Linux, Kernel and Android engineering > http://free-electrons.com > _______________________________________________ > uClibc mailing list > [email protected] > http://lists.busybox.net/mailman/listinfo/uclibc
__lll_lock_wait_private.patch
Description: Binary data
_______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
