Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-26-2005, 01:17 PM   #1
LQ Newbie
Registered: Apr 2005
Posts: 3

Rep: Reputation: 0
building glibc 2.3.5 for static linking.

I'm porting glibc 2.3.5 to a new hardware platform on linux 2.6.9, one of our requirement is to build glibc static only, I mean -disable-shared. It means only "*.a" libraries will be created. Last time I built glibc 2.2.x where I could build all libs with -disable-shared flag in configure command, this time with glibc 2.3.5 while building modules such as 'pwd', 'zic' etc it throws error messages related pthread symbols undefined. Does it mean that I cannot build pthread for static linking?

Example error messages
libc.a(setenv.o): In function `D.L_DL26':
setenv.o(.text+0x52c): undefined reference to `__pthread_mutex_unlock'
setenv.o(.text+0x530): undefined reference to `__pthread_mutex_unlock'
setenv.o(.text+0x54c): undefined reference to `__pthread_mutex_unlock'
setenv.o(.text+0x554): undefined reference to `__pthread_mutex_unlock'

libc.a(vfwprintf.o): In function `D.L_DL67':
vfwprintf.o(.text+0x1268): undefined reference to `_pthread_cleanup_push_defer'
vfwprintf.o(.text+0x126c): undefined reference to `_pthread_cleanup_push_defer'
vfwprintf.o(.text+0x12ec): undefined reference to `_pthread_cleanup_push_defer'
vfwprintf.o(.text+0x12f0): undefined reference to `_pthread_cleanup_push_defer'

Am using following configure flags:

--host=XXXX-linux \
--with-headers=$(KERNEL_HEADERS) \
--enable-add-ons=linuxthreads \
--enable-static-nss \
--disable-shared \
--enable-kernel=$(KERNELVERSION) --prefix= \
--without-f \
--without-tls \
--without-nptl \

Appreciate any valid feedback.

Last edited by rekhakp; 04-26-2005 at 01:36 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
newb: static linking with mcrypt emailbuilder88 Programming 7 07-29-2009 04:54 PM
static linking to c library lantern Programming 1 04-19-2004 09:58 AM
Linking with different versions of glibc. dimm_coder Programming 2 11-25-2003 07:25 AM
Finding and Linking Static Libraries with gcc neorich Programming 15 08-10-2003 05:03 PM
Static/dynamic linking ugenn Linux - Software 0 12-16-2002 12:01 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration