LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 02-23-2009, 10:19 AM   #1
im4linux
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
Unhappy Trouble installing glibc-2.7 on Fedora 2.6.21-1.3194


I am installing glibc on my Fedora box. I have downloaded and untarred the glibc-2.7 tarball, untarred, created a compile subdirectory and run ../configure --prefix=/usr.

I get no error messages from the above.

When I run make however, I get stopped near the end (I assume) of the compile with the error:

"undefined reference _sync_fetch_and_add_4"
"undefined reference _sync_val_compare_and_swap_4"
"undefined reference _sync_bool_compare_and_swap_4"

I'm presuming that I needed to download another library to build. Which one? Or is that not the problem?
 
Old 02-25-2009, 02:59 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Welcome to LQ.

'glibc' is your system ( together with the kernel )
Changing it will probably make everything unusable. For ever.

http://www.gnu.org/software/libc/resources.html
Quote:
Building glibc is quite tricky and has a number of pitfalls, not the least
of which include :

* Never install over a live system. The connection between the individual
parts of the glibc shared libraries is special. The libc.so shared library
uses private interfaces in ld.so and vice versa. On a live system with
dynamically linked applications if a new libc.so replaces an old one with a
different internal ABI your system will be broken. libpthread.so, libm.so, and
librt.so have similar problems. At a minimum, install into a separate chroot
environment.
* There is a high possibility you will end up creating a different public
ABI. If you were to begin distributing binaries they would at a minimum not
work, and at best create a lot of confusion.

If you find yourself needing to build a customised version of glibc, you are
best to use the framework offered by your distribution (i.e. the rpm or deb
package build facilities).
 
Old 02-26-2009, 06:09 AM   #3
anurag_bhd
Member
 
Registered: Nov 2006
Location: Jalandhar, India
Distribution: openSuSE 11.0, Granular 1.0, Mandriva One 2009, Fedora 11
Posts: 60

Rep: Reputation: 18
Try installing glibc on your system (if not already installed) using the command:

Code:
sudo yum install glibc
 
Old 02-26-2009, 12:19 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
*
anurag_bhd : 'glibc' is always installed, glibc is your system .....
 
Old 02-26-2009, 09:24 PM   #5
anurag_bhd
Member
 
Registered: Nov 2006
Location: Jalandhar, India
Distribution: openSuSE 11.0, Granular 1.0, Mandriva One 2009, Fedora 11
Posts: 60

Rep: Reputation: 18
Quote:
Originally Posted by knudfl View Post
*
anurag_bhd : 'glibc' is always installed, glibc is your system .....
Oops... I meant glibc-devel. Thanks for pointing out, anyway.

Code:
sudo yum install glibc-devel

Last edited by anurag_bhd; 02-26-2009 at 09:26 PM.
 
Old 04-20-2009, 06:02 PM   #6
Garlictoast
Member
 
Registered: Aug 2003
Location: USA
Distribution: several Mandrakes
Posts: 34

Rep: Reputation: 15
The fix for your build problem

I learned by private correspondence that the build problem you describe was fixed by adding to my configuration the specification CFLAGS=" -march=i686 -O2" It is necessary to specify the architecture (whatever yours is) in configuring recent versions of glibc. As I recall, it's needed for versions 2.6 and later. I think you also need to specify a level of optimization in the CFLAGS. At least it doesn't hurt to use -O2, the gcc default. All the other comments in response to your question seem to be irrelevant.

Please note, your reported problem is in building glibc, not installing it. There are other problems with switching out basic system software and keeping things working. Commands like cd failed with errors after I tried installing on a test system. Don't install until you really really know how to do it. Good luck.


Quote:
Originally Posted by im4linux View Post
I am installing glibc on my Fedora box. I have downloaded and untarred the glibc-2.7 tarball, untarred, created a compile subdirectory and run ../configure --prefix=/usr.

I get no error messages from the above.

When I run make however, I get stopped near the end (I assume) of the compile with the error:

"undefined reference _sync_fetch_and_add_4"
"undefined reference _sync_val_compare_and_swap_4"
"undefined reference _sync_bool_compare_and_swap_4"

I'm presuming that I needed to download another library to build. Which one? Or is that not the problem?

Last edited by Garlictoast; 04-20-2009 at 06:08 PM. Reason: clarification
 
  


Reply

Tags
glibc, install


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
problem installing glibc-2.3.2-4.80.i686, glibc-common-2.3.2-4.80.8.i386.rpm martianpackets Red Hat 8 05-01-2009 04:22 PM
trouble installing glibc-2.7 - error during ./configure Virtuality Linux - Software 5 12-12-2007 07:43 PM
Installing glibc on centos4 fedora core 4? vp911 Linux - Software 5 04-29-2006 01:15 AM
Trouble installing fedora stewart81 Linux - Newbie 4 10-03-2005 01:59 PM
Trouble installing Wine for RH9, need glibc MajicMan Linux - Software 3 08-09-2005 06:54 PM


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