LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Upgrade Slackware 14.1's glibc to the current version (https://www.linuxquestions.org/questions/slackware-14/upgrade-slackware-14-1%27s-glibc-to-the-current-version-4175523320/)

moisespedro 10-25-2014 09:12 AM

Upgrade Slackware 14.1's glibc to the current version
 
Can I do that? It is a minor version so I guess I should be fine?

I was thinking about grabbing the latest glibc SlackBuild and build my own package.

business_kid 10-25-2014 10:38 AM

You can chance it. I agree, a minor version would usually be fine. I am not a software purist, and such would probably disagree. Why bother? Is there some security hole?

Didier Spaier 10-25-2014 02:16 PM

Quote:

Originally Posted by moisespedro (Post 5259377)
Can I do that?

Why couldn't you? If you want to do that, then yes the easiest way would be to use the build material from Slackware-current (not only the SlackBuild, but all files in /source/l/glibc).

Quote:

It is a minor version so I guess I should be fine?
This does not imply that, see current's Changelog about the need to rebuild gcc then glibc as an example.

Advice (only an advice): unless you have a specific need or you want to do that just for fun, either run stable or current, don't mix them or be prepared to solve the problems that could occur. But that also can be fun, of course :D

number22 10-25-2014 05:08 PM

I think that 2.20 has bit of performance gain than the last one, but I can't back it with numbers.

There are number of security fixes in it, I only needed to tweak and add one of Mancha's CVE-0475 fix for glibc 2.20.

moisespedro 10-25-2014 05:38 PM

This would be a just for fun upgrade. But I am afraid I could break my system. I guess it is safe enough then?

So I would build the latest GCC and then glibc?

metaschima 10-25-2014 06:14 PM

I don't think it would be very fun, because something is bound to break. glibc is the heart of the system, and I would only upgrade it if it is truly warranted, never for fun.

business_kid 10-26-2014 04:14 AM

I'll leasve you guys to your patches, and won't comment further.

For the benefit of searchers of this thread, I'll state the bit of theory we all know but nobody has mentioned. Glibc is part of the toolchain (Kernel-headers and gcc being the other 2 parts) and as such, affects basic system libs. Received wisdom is that you don't update these, because they are the basics with which the system is built.

Of the three, glibc is the fussiest, kernel headers the most forgiving of an update, and gcc comes out in the middle. Rather than update glibc from 2.15 to s.15.1 or some such, Linuxfromscratch issued a new book, and pulled the old one, indicating to all that the system should be rebuilt.

GazL 10-26-2014 06:11 AM

Quote:

Originally Posted by number22 (Post 5259580)
I think that 2.20 has bit of performance gain than the last one, but I can't back it with numbers.

There are number of security fixes in it, I only needed to tweak and add one of Mancha's CVE-0475 fix for glibc 2.20.

Isn't 0475 already fixed upstream in 2.20?
https://sourceware.org/git/?p=glibc....ae1e161bc8a8a3

number22 10-26-2014 09:30 AM

Quote:

Originally Posted by GazL (Post 5259751)
Isn't 0475 already fixed upstream in 2.20?
https://sourceware.org/git/?p=glibc....ae1e161bc8a8a3

Apparently, I was not carefully reading the release note.

mostlyharmless 10-26-2014 11:14 AM

Don't forget that if you are using multilib, your glibc has already been altered... replacing it with this patch at this point will almost certainly break that.

genss 10-26-2014 12:32 PM

glibc should be a C standard library

anyway
unless some function was deprecated that some of the programs you run need, there shouldn't be any problem
glibc people go to fair trouble for it to be backwards compatible with older kernels
so in theory there shouldn't be any problems
in practice if something goes wrong remember to delete all the simlinks of the newer library when reverting, as upgradepkg can't do it itself

ruario 10-27-2014 12:43 AM

Might be a good time to use one of my favourite quotes.

Quote:

Originally Posted by Einstein
In theory, theory and practice are the same. In practice, they are not.


ReaperX7 10-27-2014 01:33 AM

Never replace glibc unless you're prepared to rebuild an entire system back around it, and patch as you go.

From what I've learned with LFS, once you install a new glibc, some things must be rebuilt to the new system. Some programs may work, but others may not work. You'd have to probably build a small temporary system to use as a chroot jail, then rebuild packages for the new glibc, test, patch if needed, and lather, rinse, repeat as needed. It's a process... a long arduous process.

Go read the past changelogs and get Patrick to give you details about what is required when you rebuild glibc. It may seem as easy as building a SlackBuild, but this is just of those packages that isn't all cut and dry. Glibc, just like the kernel-headers are just two packages you do not touch outside of the aaa_* packages.

shevegen 12-09-2019 07:58 AM

This is mostly for others who may find the thread here.

ReaperX7 is right.

IMO the best approach is to do the LFS-approach - first build a
temporary toolchain. The LFS recommends to remove it lateron,
but I recommend to keep it - and re-use it. That way whenever
glibc changes, you can change it, but it is still quite annoying
since you have to recompile a lot, even when using statically
compiled programs. Nonetheless I also recommend to use some statically
compiled programs, as well as binutils for recovery.

The core toolchain set is: glibc, gcc, kernel headers, binutils. Then
there are secondary helpers: sed, awk, grep, coreutils. If you have
a working glibc, gcc and binutils, you should be able to compile most
everything though.

I don't yet know how lilo/grub play with it, but you can do things
step by step. Also make sure to know how to compile a kernel on
your own - it may help for later.

Didier Spaier 12-09-2019 11:38 AM

@ shevegen: please do not post in a 3 years old thread to provide an advice probably not adapted to Slackware. Unless you can alse provide a success report telling with all details how you did it on Slackware: what was the glibc version you started with, which steps you took and what was the glibc version at the end of the process.


All times are GMT -5. The time now is 07:53 PM.