Bug 1495

Summary: enabling LINUXTHREADS_NEW generates undefined reference to `_res'
Product: uClibc Reporter: Mwanguhya Daniel Murungi <dmurungi>
Component: ThreadsAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: bugs.busybox.net, ncopa, ralphs, uclibc-cvs
Priority: P5 Keywords: link-failure
Version: 0.9.31   
Target Milestone: 0.9.31   
Hardware: PC   
OS: Linux   
Host: i486-linux-uclibc Target: i486-linux-uclibc
Build: Build 2010-04-03 Slackware 12.2

Description Mwanguhya Daniel Murungi 2010-04-06 08:47:47 UTC
I'm trying to compile uClibc 0.9.31 for x86 with LINUXTHREADS_NEW enabled and 
I get the following error;

-----------------------------------------------------
  AR cr libpthread/linuxthreads/libpthread_so.a
  STRIP -x -R .note -R .comment libpthread/linuxthreads/libpthread_so.a
  CC libpthread/linuxthreads/pthread_atfork.oS
  AR cr lib/libpthread_nonshared.a
  STRIP -x -R .note -R .comment lib/libpthread_nonshared.a
  LD libpthread-0.9.31.so
libpthread/linuxthreads/libpthread_so.a(pthread.oS): In function 
`__pthread_reset_main_thread':
pthread.c:(.text.__pthread_reset_main_thread+0x9f): undefined reference to 
`_res'
collect2: ld returned 1 exit status
make[1]: *** [lib/libpthread.so] Error 1

-----------------------------------------------------

Building with LINUXTHREADS_OLD works fine. The above error does not occur with 
uclibc 0.9.30.3.
Comment 1 Bernhard Reutner-Fischer 2012-04-17 21:41:07 UTC
I think this was fixed in 0.9.32 and builds fine for me with 0.9.33.1 and later.
If you still experience this problem then please consider using NPTL on x86 and otherwise attach your .config.

Thanks,