LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-06-2005, 08:54 PM   #1
richarde
LQ Newbie
 
Registered: Jun 2005
Location: Perth, Australia
Distribution: slackware 10.2
Posts: 22

Rep: Reputation: 15
upgrading (or not upgrading) glibc


I just wanted to ask some advice from people who have probably had a lot more experience with Linux than me.

I tried to run a game using Wine and got an error message saying that a dll had failed to load and that version 2.3.4 of glibc was not found.

I am using Slackware 10.0 and the version of glibc I have is 2.3.2. I have searched the forums and the internet a bit but it seems that people have conflicting opinions on whether or not glibc should be upgraded.

So my questions are:

1. Should I attempt to upgrade glibc?
2. What is the safest way to go about this?

From what I have read I am hoping that it is possible to simply download the Slackware 10.1 package for glibc 2.3.4 and use upgrade-pkg to perform the upgrade.

I have considered just installing Slackware 10.1 but I figure that if I do that I won't learn anything.
 
Old 09-06-2005, 10:44 PM   #2
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
Quote:
I have searched the forums and the internet a bit but it seems that people have conflicting opinions on whether or not glibc should be upgraded.
this is because the kernel headers that 10.0 uses were compiled against glibc 2.3.2..........IF you upgrade the glibc libraries.......you may need to recompile the headers to match the newer version of glibc.........
 
Old 09-06-2005, 11:32 PM   #3
elyk
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 241

Rep: Reputation: 49
I had a problem like that once... NEVER run removepkg on glibc. It's not fun. (Yes I'm talking from experience, just decided to reinstall everything)

I've read somewhere that you can run upgradepkg on glibc, but I don't know if that will break anything else.
 
Old 09-06-2005, 11:41 PM   #4
richarde
LQ Newbie
 
Registered: Jun 2005
Location: Perth, Australia
Distribution: slackware 10.2
Posts: 22

Original Poster
Rep: Reputation: 15
thanks for clearing that up freakyg. would this just mean that it may be necessary to re-compile the kernel after an upgrade of glibc?

elyk: Yeah, i have read in some of the other forums that removing glibc doesn't work so well. I have also read about other people who tried to upgrade glibc and ran into major problems so that is why i wanted to ask for some advice first.
 
Old 09-07-2005, 02:04 AM   #5
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I updated glibc from the 2.3.4 from Slackware 10.1 to 2.3.5 from Slackware current a few weeks ago myself.

Immediately after doing so, programs started failing, the NVIDIA drivers stoped working, and the system was all in all a bit of a mess.

But nothing that wasn't fixable. I just had to recompile any program that was giving me problems. The NVIDIA driver was effected this worst, so I reinstalled/compiled that, then recompiled XFCE (I am not using the standard Slackware packages for that, I have it compiled with Composite support), and so on.

I don't recall having to recompile the kernel. I was using 2.6.12 at the time, and even after updating to glibc 2.3.5, I didn't encounter any problems.

Likely, it is one of those things that is going to be different for everyone. Some software is going to explode, and some software will be unphased.

The bottom line though, I wouldn't suggest updating something as major as glibc unless you know what you are getting into, and willing to do the work to get the system back up and running normally.
 
Old 09-07-2005, 04:52 AM   #6
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Piete-Disclaimer: I am not a programmer. All of what I spout is cause/effect related and based on experience, not a deep understanding of the underlying compilation process. What does that mean? It means feel free to enlighten me when I make a mistake =)

glibc is what programs compile against, and in most cases programs are compiled with dynamically linked libraries. As opposed to statically linked libraries.

What does that mean?

If you staticly link your program all the library functions that your program uses will be compiled into your program's final binary. So, the binary will be bigger, but may load faster, and has no dependencies.

Ooh, cool, so why isn't everything staticly linked?
Think about how many programs you've got, then imagine each of them bloating beyond belief! That's some serious code replication! And then you've got your libraries (glibc, libogg, fftw etc etc etc) on your box *as well* to compile against!

But in an age where 500GB hard drives exist, what's the problem?

Meh, who knows. Anyway, the result is, most stuff is compiled dynamically, so that means when you remove glibc (or change it's version), you remove parts of your existing programs (because when they run, they call the library functions, not internal functions).

The kernel doesn't compile against glibc, so won't be affected.

So, uh, you're great and ... well ... what do I do?

Check your reasons for upgrading glibc.

* To run a single program you could recompile the program yourself, which would then work with your version of glibc.
* Find a package that has been compiled for Slack 10.0, not 10.1
* You could run "upgradepkg" on your system, which would take it from Slackware 10.0 to whatever version you liked.

I won't go into it here, but needless to say, there are numerous online-update tools (search the forums for: swaret or slapt-get) that you can use to do a bulk upgrade, or you can do it "manually" by downloading the packages you want (or the ISO, since that's likely to be less time consuming) and then doing something similar to the following:

* Backup any editted config files (/etc) and anything you've tweaked (I tweak startx, so that gets backed up). If you can afford the space, it's always a good idea to dump an image to disk, that way, the upgrade is risk free. If it goes horribly wrong - you can restore your old system precisely how you left it.
* mount -o loop /path/to/new-slack.iso /place/to/mount
* upgrade pkg /place/to/mount/slackware/*/*.tgz

It'll run through every package, starting with the a/ directory and upgrade the packages you have installed. When it's done, you'll have essentially installed a newer version of Slackware, but without loosing your config files =)

Uhm, apologies for the length of the post. I get carried away when I see people messing with toolchains ... I should probably see a doctor about that, actually.

My advice would be a manual upgradepkg. It's easy and pretty painless. Just be aware that if you've still got the kernel modules and kernel packages installed, it will upgrade them and reinstall lilo, so you may have to edit lilo.conf and/or reinstall (make modules_install && make install) your custom kernel.

Take it easy, and don't forget - pretty much everything is fixable!

- Piete "Quick! Someone's discussing toolchains! Must. Get. Into. Conversation!" Sartain.

PS: I second MS3FGX's statement:

Quote:
The bottom line though, I wouldn't suggest updating something as major as glibc unless you know what you are getting into, and willing to do the work to get the system back up and running normally.

PPS: It's not meant to be a scare post.

PPPS: Really.
 
Old 09-07-2005, 10:20 PM   #7
richarde
LQ Newbie
 
Registered: Jun 2005
Location: Perth, Australia
Distribution: slackware 10.2
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks for the advice guys. I have a couple more questions:

Is it possible to have two separate versions of glibc installed at the same time and install different programs against different versions?

and secondly, Piete, you said:

"* To run a single program you could recompile the program yourself, which would then work with your version of glibc."

what would this involve? Does this mean editing the source code of the program?

Thanks

Richard
 
Old 09-08-2005, 04:16 AM   #8
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Quote:
Is it possible to have two separate versions of glibc installed at the same time and install different programs against different versions?
You can only have one "native" glibc installed, which means although you install multiple toolchains (glibc, gcc, binutils, + extras) and therefore multiple glibc's to compile against with those toolchains, you only have one glibc residing as native in your system. The knock on effect being that it is hard to run the program once you've compiled it using a different toolchain. I suspect it is possible, but it's not a desirable solution in most cases.

Quote:
* To run a single program you could recompile the program yourself, which would then work with your version of glibc.

what would this involve? Does this mean editing the source code of the program?
No no, you merely have to get the original source code and compile it yourself - no editing required. At least, if you have to edit the source to get it to compile, there's a problem with the source and/or your machine ... so, on the assumption that it's a simple program a typical build session for me looks something like this:

Code:
~$  cd src
src/$ tar xfz myprogram.tar.gz
src/$ cd myprogram
src/myprogram/$ ./configure
src/myprogram/$ make
src/myprogram/$ su -c checkinstall
password:
src/myprogram/$
Checkinstall is a program that I use to package other programs I have configured in the above way. It's not faultless packaging, and I wouldn't be comfortable distributing the packages it makes, but it does list them in pkgtool, so I can easily uninstall them should I need/want to. Checkinstall runs the command "make install" unless told otherwise, but I'm getting ahead of myself ...

For a more complex program, read the manual! Having a look over at www.winehq.org shows me that actually their install from source proceedure is very much the same as mine! For instructions, straight from the developers, read here: http://winehq.org/site/docs/wine-use...ng-wine-source

I tend to go off on tangents, so please do say if you want anything clarified. I would say, however, that all the information is out there and Google (www.google.com/linux) is your friend!

- Piete.
 
Old 09-08-2005, 08:26 AM   #9
richarde
LQ Newbie
 
Registered: Jun 2005
Location: Perth, Australia
Distribution: slackware 10.2
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks again for your help Piete. I think I have some reading to do

I have not been using linux for long and am used to the Windows way of doing things and I thought that the error meant that my version of glibc wasn't high enough and that I had to upgrade it. I understand now and I think I know why it wasn't working. I used the Slackware 10.1 package and Slackware 10.1 has glibc 2.3.4 instead of 2.3.2, so wine expected me to have 2.3.4 when I don't.

I have done some compiling of packages from source before so I know the basics. I haven't used checkinstall before but have heard of it and what it does so i will do some googling and reading up on it.

PS: Don't worry if you keep going off on tangents. It just means I learn more

Richard
 
Old 09-12-2005, 12:56 AM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
If you bdo decide to upgrade GLIBC, you can do it more safely by doing it remotely. I mean, don't upgrade a running system -use the install CD to boot and mount your installation on /mnt. Then run removepkg and installpkg to install the new libs.

This will prevent you from having a non-bootable system, but it may still break some programs.
 
  


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
upgrading glibc abk4523 Linux - Software 5 08-10-2005 03:45 PM
Upgrading glibc-2.2.4 to glibc-2.3.2 on redhat 7.2 Shuja Linux From Scratch 2 07-30-2004 12:34 AM
Upgrading glibc. Tommi Linux - General 4 04-27-2003 07:23 AM
upgrading Glibc 2.2.4 to 2.3+ zLinuxz Linux - General 5 01-02-2003 10:01 PM
Upgrading GLIBC ryanstrayer Linux - General 9 02-11-2002 04:31 AM

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

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