11

The firmware of my NAS comes with a rather old version of glibc, namely 2.5. In order to cope with some precompiled binaries linked* to glibc 2.15, I would like to upgrade it. From some simple testing in a chroot environment I learned simply adding the newer libc-2.15.so and updating the symlink libc.so.6 will yield an unusable system; probably due to libc-2.15.so being linked to ld-linux.so.3 in turn, which would of course also require the 2.15 version instead of the 2.5 one. But before I descend into too much trial and error,

what is the correct procedure to manually upgrade glibc?


*despite being linked "statically", they still dynamically link to glibc...

7
  • "In order to cope with some precompiled binaries (despite being linked "statically", they still dynamically link to glibc...) linked to glibc 2.15." Taking out the brackets, this reduces to "In order to cope with some precompiled binaries linked to glibc 2.15.". I'm not sure what that means. Nov 5, 2014 at 8:02
  • @FaheemMitha Thanks for pointing that out, I never realized I forgot finishing that sentence - hope it makes more sense now Nov 5, 2014 at 8:32
  • Yes, it reads better now, though having that embedded bracket does not help with clarity. I assume that rebuilding the firmware with a newer libc is not an option? Nov 5, 2014 at 12:40
  • @FaheemMitha Debracketed now. No, the firmware unfortunately contains some proprietary components :/ Nov 5, 2014 at 13:21
  • Nitpick city. You marking your text with a *, but are using a 1 in your "footnote." Yes, that is (part of why) proprietary sofrware sucks. Look for free third party firmware perhaps? Or develop your own. Easier said than done, granted. Nov 5, 2014 at 13:25

1 Answer 1

7

Upgrading the standard library is risky, as some programs and libraries may depend on the current version.

My recommendation if you need to run newer programs is to install a full chrooted distribution. This requires more disk space, but is a lot simpler and less risky than trying to update libc. Debian provides a tool to facilitate installations in a chroot: debootstrap. See Installing two glibc alongside in debian/ubuntu (a very similar situation) for more explanations and How do I run 32-bit programs on a 64-bit Debian/Ubuntu? for a full how-to in a slightly different situation.

3
  • 2
    I feared as much... Actually I am currently using a chrooted Gentoo installation. In order to compile out-of-chroot binaries it'd probably be easier to downgrade Gentoo's glibc then, or use a sufficiently old version... Then again I severely doubt (or at least hope not) this is the final answer. Nov 19, 2013 at 15:46
  • What do you mean by saying upgrading glibc "is risky"? Glibc is backward compatible, so it should generally work or did I not understand something here?
    – Nils
    Jul 4, 2017 at 7:24
  • 3
    @Nils What you're missing is the difference between should and does. Programs sometimes depend on undocumented behavior that changes between versions. Jul 4, 2017 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .