Re: multiple definitions of setreuid and __lll_lock_wait_private

2014-07-25 Thread Tony Wu
On Fri, Jul 25, 2014 at 4:18 AM, Bernhard Reutner-Fischer
rep.dot@gmail.com 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
 thomas.petazz...@free-electrons.com 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
  uClibc@uclibc.org
  http://lists.busybox.net/mailman/listinfo/uclibc


 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://lists.busybox.net/mailman/listinfo/uclibc



__lll_lock_wait_private.patch
Description: Binary data
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Re: multiple definitions of setreuid and __lll_lock_wait_private

2014-06-30 Thread Tony Wu
On Sat, Jun 28, 2014 at 3:52 AM, Thomas Petazzoni
thomas.petazz...@free-electrons.com 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
 uClibc@uclibc.org
 http://lists.busybox.net/mailman/listinfo/uclibc


__lll_lock_wait_private.patch
Description: Binary data
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Re: uClibc-0.9.33: ARM NPTL static link failure with sigprocmask vs. setjmp

2012-02-20 Thread Tony Wu
On Mon, Feb 20, 2012 at 10:55 PM, Johannes Stezenbach j...@sig21.net wrote:
 Hi,

 while my simple test cases all worked a more complicated application
 fails to link.  I distilled this small test case:

 #include stddef.h
 #include signal.h
 #include setjmp.h

 int main()
 {
        sigset_t set;
        jmp_buf env;
        sigemptyset(set);
        sigprocmask(SIG_BLOCK, set, NULL);
        setjmp(env);
        return 0;
 }

 $ arm-unknown-linux-uclibcgnueabi-gcc -Wall sig.c -static -lpthread
 .../arm-unknown-linux-uclibcgnueabi/sysroot/usr/lib/libc.a(sigprocmask.o): In 
 function `__GI_sigprocmask':
 .../arm-unknown-linux-uclibcgnueabi/build/build-libc/libc/sysdeps/linux/common/sigprocmask.c:27:
  multiple definition of `sigprocmask'
 .../arm-unknown-linux-uclibcgnueabi/sysroot/usr/lib/libpthread.a(pt-sigprocmask.o):.../arm-unknown-linux-uclibcgnueabi/build/build-libc/./libc/sysdeps/linux/arm/../../../../libc/sysdeps/linux/common/sigprocmask.c:27:
  first defined here
 collect2: ld returned 1 exit status


 I'm not sure what is the right fix.
 Just remove libpthread/nptl/sysdeps/pthread/sigprocmask.c ?


 Johannes
 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://lists.busybox.net/mailman/listinfo/uclibc

The sigaction, sigprocmask, and sigfillset static link issue has
already been addressed in the future branch back in Apr. 2011, but the
future branch is not merged yet.

Until then, you can try to cherry-pick the following patches manually.
8ab3145f396eb35d15466b0666270ba8dad69da5
aed47156856366c6aaf29a54e68fed39733f6bce

Tony
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


commit c697912b3a9 breaks linuxthreads build

2012-02-20 Thread Tony Wu
Carmelo,

Commit  c697912b3a9 'inet:rpc: fix authnone_marshal in multithreading
context' breaks linuxthreads build,
__libc_once_define is not defined.

libc/inet/rpc/auth_none.c:69: warning: type defaults to 'int' in
declaration of 'type name'
libc/inet/rpc/auth_none.c:69: error: storage class specified for
parameter 'type name'
libc/inet/rpc/auth_none.c:69: error: expected declaration specifiers
or '...' before 'authnone_private_guard'
libc/inet/rpc/auth_none.c:69: warning: data definition has no type or
storage class
libc/inet/rpc/auth_none.c:69: warning: type defaults to 'int' in
declaration of '__libc_once_define'
libc/inet/rpc/auth_none.c: In function 'authnone_create':
libc/inet/rpc/auth_none.c:96: warning: implicit declaration of
function '__libc_once'
libc/inet/rpc/auth_none.c:96: error: 'authnone_private_guard'
undeclared (first use in this function)

Tony
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


master branch broken by commit 7aea441

2011-03-09 Thread Tony Wu
master branch building was broken by commit
7aea441c8a240bd5a0717ec09ae8efc4878cd377.

The actual definition of __libc_drand48_data was removed, causing
undefined reference at link time.

diff --git a/libc/stdlib/drand48-iter.c b/libc/stdlib/drand48-iter.c
index 221cbe0..e0c1ce4 100644
--- a/libc/stdlib/drand48-iter.c
+++ b/libc/stdlib/drand48-iter.c
@@ -23,13 +23,9 @@
 #include stdint.h
 #include sys/types.h

-/* Global state for non-reentrant functions.  */
-struct drand48_data __libc_drand48_data attribute_hidden;
-
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


git head wont build for non-NPTL config.

2011-02-15 Thread Tony Wu
commit 18e7136e79a89ba5e978f0dc445a8fcf8d619a40 broke build for
non-NPT config. The new logic is the reverse of the old one.

+CSRC-$(UCLIBC_HAS_THREADS_NATIVE) += fork.c getpid.c raise.c open.c close.c \
+   read.c write.c
-ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-CSRC := $(filter-out fork.c getpid.c raise.c open.c close.c read.c
write.c, $(CSRC))

Tony
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


Re: MIPS NPTL 0.9.32-rc2 - partially working

2011-02-11 Thread Tony Wu
Imre,

Thanks. I have already applied that patch. pthread works fine for me.
I am having issue with non-pthread shared linked binaries.

Tony

On Fri, Feb 11, 2011 at 9:45 PM, Imre Kaloz ka...@openwrt.org wrote:
 On Fri, 11 Feb 2011 14:43:52 +0100, Tony Wu tung7...@gmail.com wrote:

 Hey,

 I am having some issue with 0.9.32-rc2 NPTL on MIPS. Basically,
 everything works fine except for shared-linked binaries that are not
 linked with pthread. In other words, If a shared-linked binary is not
 linked against pthread, it crashes.

 snip

 Try
 https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.32/180-pthread_cleanup_fix.patch


 Imre
 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://lists.busybox.net/mailman/listinfo/uclibc

___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


[PATCH] Fix typo in Rules.mak

2010-04-28 Thread Tony Wu
Some arch set OPTIMIZATIONS instead of OPTIMIZATION in Rules.mak


0001-Fix-typo-OPTIMIZATIONS-OPTIMIZATION.patch
Description: Binary data
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Re: problems with gnu make and stdout with uclibc nptl

2010-04-07 Thread Tony Wu
_res is moved to .bss section with hidden attribute in 0.9.31. I get
around this issue by removing attribute_hidden.

libc/inet/resolv.c

/*struct __res_state _res __attribute__((section (.bss))) attribute_hidden;*/
struct __res_state _res __attribute__((section (.bss)));

On Wed, Apr 7, 2010 at 3:26 PM, Natanael Copa natanael.c...@gmail.com wrote:
 On Sun, Apr 4, 2010 at 4:42 PM, Austin Foxley aust...@cetoncorp.com wrote:
 On 04/03/2010 11:13 AM, Natanael Copa wrote:
 which means that stdout ends up with the error indicator set for some
 reason. I suspect this is a bug in uclibc-nptl.

 Interestingly enough, redirecting stdout to a file made the build complete.

 Any ideas on how to trace this down?

 Does this happen with the 0.9.31-rc? There aren't too many major differences 
 in
 the stdio code between master and nptl.

 I tried to compile the 0.9.31 with linuxthreads(new) but i got into
 https://bugs.busybox.net/show_bug.cgi?id=1495

 so i dont know. sorry.

 --
 Natanael Copa
 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://lists.busybox.net/mailman/listinfo/uclibc

___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc