LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-19-2005, 10:50 AM   #1
maxbld
LQ Newbie
 
Registered: Nov 2002
Posts: 6

Rep: Reputation: 0
glibc-2.3.90 broke my links!


Hi to all,
The situation may sound simple to an expert, but for me there's a missing link (yep! a link is exactly what i miss. Well i miss a lot of them!! Whew!!!): I've successfully configured & compiled glibc-2.3.90 with gcc-4.0.0 (!) and i've made a test make install on a ./configure --prefix=/usr/glibc-cvs (a test dir). Then i was tired of waiting and re-configured the package - without making clean - with --prefix=/usr, i built, then installed, and... WOW the install script went out with an error, it didn't find a shared object. Needless to say when i rebooted the bash shell was unable to load its shared objects. So i used a rescue disk, installed a statically linked shell and managed to relink to the previous libraries (glibc-2.2.5). I did so in the /lib directory and after having set LD_LIBRARY_PATH and PATH on all needed dir i came out with a *PERFECTLY* rescued linux box, now relying on glibc-2.2.5. So i finally thought "Now is time to reboot!", but, alas! After the reboot all was *exactly* as before i did all that magic. I checked out shutdown & startup scripts but found nothing, i wonder if there is any script or configuration file which does the trick. By the way i'm on a deeply modified slackware8.1 distro, but all was working perfectly just before that F*****G make install.

Another interesting thing i may add is that if i install the glibc-solibs (Glibc-2.2.5 shared libraries an binaries) from the rescue disk, after a reboot with the hd loader, i'll find once again all the sym links pointing to the glibc-2.3.90. That's frustrating! I can't see why it happens!

Please if you have any hint i would appreciate it a lot!
Thank you in advance for any help, regards,
Max.
 
Old 05-19-2005, 02:42 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
The problem is probably that your start-up scripts are running /sbin/ldconfig, which is finding glibc-2.3.90 as a prefered library to glibc-2.2.5, and is using that.

After installing glibc-2.3.90, you will need to recompile all software that relied on glibc-2.2.5 to use the new library, as they are binary incompatible. (This is the vast majority of software on your system; ever wondered why distros don't ship with glibc upgrades?).

You could try moving glibc-2.3.90 to a different directory and including that directory on the front of LD_LIBRARY_PATH only for software that you actually want to use it. (Someone tell me if that won't work!)
 
Old 05-19-2005, 02:43 PM   #3
black hole sun
Member
 
Registered: Jul 2004
Distribution: Slackware Current
Posts: 127

Rep: Reputation: 15
You attempted to replace glibc on a running system? No offence, but wow dude, that's not exactly the smartest thing I've ever heard. I've broken slackware before trying to do that.

If you wish to replace glibc, you MUST USE PATRICK'S upgrade script and package the newly-built glibc in .tgz format.

Use the slackbuild and do-inst.sh scripts here:

http://slackware.mirrors.tds.net/pub...ource/l/glibc/

Modify the scripts to work for your libc. I have used these scripts before to build an NPTL'd 2.3.4 libc (this was before the NPTL upgrade) and it worked flawlessly.

Once you build the .tgz, use the upgradepkg command to replace the libc you're running. This should fix the linker errors because the install script manually links if ldconfig is screwing up.

Last edited by black hole sun; 05-19-2005 at 02:45 PM.
 
Old 06-06-2005, 11:20 AM   #4
maxbld
LQ Newbie
 
Registered: Nov 2002
Posts: 6

Original Poster
Rep: Reputation: 0
Ok, thank you for your answers. About the reboot problem, i can say i managed to solve it by erasing 2.3.90 glibc files from my /lib directory. Doing so stopped the symbolic links to point to newer glibc after any reboot, so my linux box is stable again but linking to glibc-2.2.5.
I did a new try by making the ld-linux.so.2 point to the /usr/cvs-glibc/lib/ld-2.3.90.so linker and putting /usr/cvs-glibc/lib into LD_LIBRARY_PATH, but then programs were complaining they didn't find some libraries like libtermcap.so.2 or libncurses.so.5. It seemed to be solved adding /usr/lib to LD_LIBRARY_PATH, but when rebooting some startup called program like ext2fsck failed to find libraries. I restored the previous situation and all went well.
Anyways i still don't understand why compiling glibc and installing it in a dedicated directory won't work, is it caused by the fact that binaries coming with the distro were linked against the older glibc version?

Thanks for any help,
Max.
 
  


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
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 03:22 PM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 12:10 PM
Replacing glibc using linuxthreads for glibc using nptl (native positx thread library CestusGW Linux From Scratch 4 01-20-2005 07:26 AM
how to change relitive links to specific links? wolfe2554 Linux - General 4 07-03-2004 12:40 AM
Links Section updated - Please add your Linux links. jeremy Linux - General 2 11-24-2001 11:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:44 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