LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-23-2005, 04:41 PM   #1
voger
Member
 
Registered: Oct 2005
Distribution: Arch
Posts: 68

Rep: Reputation: 15
Question what is the meaning of /lib/tls directory?


Hi everyone.

I was playing around with a self made bootable cd image, with binaries taken from Fedora Core 1. The problem i had was about shared libraries not beeing found by many programs.

To be more specific ldd says:

ldd /sbin/init
libc.so.6 => /lib/tls/libc.so.6 (0x0063e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00626000)


If i copy libc.so.6 from /lib/tls directory to my cd tree /lib/tls i get a message like unable to load shared library libc.so.6, file not found (something like that).

By looking on the contents of the glibc package i see

rpm -ql glibc|grep libc

/lib/i686/libc-2.3.2.so
/lib/i686/libc.so.6
/lib/libc-2.3.2.so
/lib/libc.so.6

/lib/libcrypt-2.3.2.so
/lib/libcrypt.so.1
/lib/tls/libc-2.3.2.so
/lib/tls/libc.so.6

/usr/sbin/glibc_post_upgrade
/usr/share/doc/glibc-2.3.2
/usr/share/doc/glibc-2.3.2/BUGS
/usr/share/doc/glibc-2.3.2/CONFORMANCE
/usr/share/doc/glibc-2.3.2/COPYING
/usr/share/doc/glibc-2.3.2/COPYING.LIB
/usr/share/doc/glibc-2.3.2/FAQ
/usr/share/doc/glibc-2.3.2/INSTALL
/usr/share/doc/glibc-2.3.2/LICENSES
/usr/share/doc/glibc-2.3.2/NEWS
/usr/share/doc/glibc-2.3.2/NOTES
/usr/share/doc/glibc-2.3.2/PROJECTS
/usr/share/doc/glibc-2.3.2/README
/usr/share/doc/glibc-2.3.2/README.hesiod
/usr/share/doc/glibc-2.3.2/README.libm

So copying /lib/libc.so.6 to cdtree/lib/ solves the problem. I tried softlinks etc but that was the only thing that solved it.

And the same thing happens with all the libraries under the /lib/tls directory.

Can someone please explain why are two different files with the same name and version in the same package? And why ldd points to the one while the program requires the other? Is there any special purpose or function in each file?
 
Old 11-24-2005, 06:29 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
One is regular glibc (/lib/libc)
One is glibc with thread support (NPTL) (/lib/tls/libc*)

Only apps that support threads should use the libs in /lib/tls/

See this for more info:
http://people.redhat.com/drepper/assumekernel.html
http://people.redhat.com/drepper/tls.pdf [PDF]
 
Old 11-25-2005, 05:56 PM   #3
voger
Member
 
Registered: Oct 2005
Distribution: Arch
Posts: 68

Original Poster
Rep: Reputation: 15
Thank you. Very interesting reads. So i guess i should include both libraries in my image.
 
  


Reply



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
including usr/local/lib directory Quest101 Linux - Software 3 01-01-2005 04:13 PM
Installing software, /usr/lib directory and /usr/local millertime Linux - Software 2 07-10-2004 09:21 AM
I accidently deleted the lib directory ICO Slackware 2 02-10-2004 12:40 PM
grep: /usr/lib/libglib-2.0.la: No such file or directory FirstTimeUser Linux - Software 9 10-15-2003 09:53 PM
Restoring /lib directory? kobartek Linux - Newbie 3 06-13-2003 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:51 PM.

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