LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Trouble installing glibc-2.7 on Fedora 2.6.21-1.3194 (https://www.linuxquestions.org/questions/linux-software-2/trouble-installing-glibc-2-7-on-fedora-2-6-21-1-3194-a-706833/)

im4linux 02-23-2009 09:19 AM

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?

knudfl 02-25-2009 01:59 PM

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).

anurag_bhd 02-26-2009 05:09 AM

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

Code:

sudo yum install glibc

knudfl 02-26-2009 11:19 AM

*
anurag_bhd : 'glibc' is always installed, glibc is your system .....

anurag_bhd 02-26-2009 08:24 PM

Quote:

Originally Posted by knudfl (Post 3458327)
*
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

Garlictoast 04-20-2009 05:02 PM

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 (Post 3454387)
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?



All times are GMT -5. The time now is 02:34 AM.