On Fri, Jul 25, 2014 at 4:18 AM, Bernhard Reutner-Fischer <[email protected]> wrote: > On Mon, Jun 30, 2014 at 02:56:37PM +0800, Tony Wu wrote: >> 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. > > Well ok, not entirely happy but for static linking i do not immediately > see a better way to handle that. > Can you please use weak_alias (or suitable construct, see > include/cancel.h for explanations) and fix all arches, not just arm?
Rewrote using weak_function, and hopefully fixed for all arches. Please see attachment. Thanks, Tony > Same for the one below.. >> >> 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 > > .. sounds like lt_strong_alias / weak alias is missing, can you > take a closer look and propose a patch? > > thanks, >> >> 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 > > >> _______________________________________________ >> 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
