LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-16-2010, 09:17 PM   #1
LQ Newbie
Registered: Jun 2010
Posts: 3

Rep: Reputation: 0
Question Compiling and installing glibc [/lib/tls/]

I have a server running Redhat EL 4.x.
I am using ACE library for system related functionalities. To support one specific requirement I made change in libc.
The ACE library uses the /lib/tls/

Now I have to compile and install that under /lib/tls/.

I came to know that the libraries under /lib/tls are build with NPTL support.
So, need clarification on how to compile and install the libc under /lib/tls/.

I downloaded the glibc version 2.3.4 (need changes on top of this version).
Configured the source and build directories.

../configure --prefix=/usr/test-libc --enable-add-ons=nptl ----is this the correct one?
And also please tell me how to install the library under /lib/tls/

Thanks for your time and help.

Old 06-17-2010, 07:30 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2015, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 15,984

Rep: Reputation: 3058Reputation: 3058Reputation: 3058Reputation: 3058Reputation: 3058Reputation: 3058Reputation: 3058Reputation: 3058Reputation: 3058Reputation: 3058Reputation: 3058
The installed glibc-2.3.4 is compiled '--with-tls'
and with NTPL. AFAIK.
Please have a look into glibc.spec ( line 9 + 11 )
in the source package glibc-2.3.4-2.43.src.rpm

EDIT : The files, you are missing, are in the package

Just install that, and you have /lib/tls/libc* etc. etc.

Last edited by knudfl; 06-17-2010 at 03:21 PM.
Old 06-17-2010, 08:18 PM   #3
LQ Newbie
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the reply.
But my problem is building and installing the libc.

I have the files /lib/tls/libc*.

What I want is,
I have some changes to do in the source files of libc.
And now I need to build the library libc and install the same.

Thanks for your time and help.
Old 06-17-2010, 10:21 PM   #4
John VV
LQ Muse
Registered: Aug 2005
Posts: 15,895

Rep: Reputation: Disabled
building and installing a DIFFERENT libc than the rest of the OS is built on ?
-- this can be done , but it is not advised .
Old 06-18-2010, 10:15 AM   #5
LQ Newbie
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Correct me if I am wrong.
As this is library, installing different one and using that to build new applications is a legal thing.
If things are done properly that should not harm the os.

Last edited by knareshkumar; 06-18-2010 at 01:31 PM.
Old 04-23-2013, 01:25 AM   #6
LQ Newbie
Registered: Dec 2012
Posts: 11

Rep: Reputation: Disabled
After building glibc sources do I need to copy on to the system or the new libc-2.xx.x inside the /lib folder?
Old 04-23-2013, 10:58 AM   #7
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906Reputation: 906
You probably want to install the new library in a completely separate space. New applications linked against it will use it, while allowing existing applications to use the existing library. The potentially negative implications of getting something wrong in overwriting the system-wide libc would be scarey in the extreme, to me.
--- rod.


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
Broke dynamic linker! /lib/ symbol _dl_out_of_memory GLIBC defa0009 Linux - Software 4 03-20-2009 09:57 AM
#0 0xb7873b71 in memcpy () from /lib/tls/i686/cmov/ Efo Programming 2 01-26-2009 07:18 PM
errno: TLS definition in /lib64/ section .tbss mismatches non-TLS reference johnpaulodonnell Programming 2 07-25-2008 05:37 AM
Installing KDE 3.2.3 w/konstruct gives Qt lib error while compiling... Intrus Mandriva 2 08-08-2004 01:08 PM
Compiling/Installing GTK+ and glibc massacrezero Linux - Newbie 5 05-07-2003 09:01 PM

All times are GMT -5. The time now is 10:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration