I don't get linux shared libraries...



  • I have a RHEL 4 server and I want to upgrade a PHP application on the server which has added support for LDAP.

    In the process of installation, I find out that our PHP installation is missing the LDAP extension.

    I download the php-ldap RPM and try to install and it complains that it requires glibc-2.5.

    I use 'yum' to try to install glibc-2.5 and realize that most of the software on the server relies on glibc-2.3.4.

    Is it not possible to have glibc-2.5 and glibc-2.3.4 installed at the same time? This is something that I've never fundamentally understood about linux. Why can't I keep both versions of the library, and programs pick the library with the interface that they want to use?

    My main concern is that if I try to upgrade *Everything*, the odds of it all working (i.e. all those hundreds of packages having the dependencies declared perfectly and all dependencies being availble fo rdownload) are very small. If the upgrade fails in the middle, then my server will be complete hosed for several days while I try to rebuild it.



  • Even if you could, it's not worth fiddling with.  The easiest thing to do is to get the source rpm and build it against your current glibc version.  Assuming you're on a fairly stock install and have the ldap devel rpm installed (and that rpm depends on glibc-2.3.4), I'd expect it to work (meaning that a compile error due to wrong gcc version, unspecified header dependency or something else mucking things up is less than 10% likely).



  • Have you tried reinstalling Windows then doing it?



  • @LoztInSpace said:

    Have you tried reinstalling Windows then doing it?
     

    Windows clearly never has a similar problem. 

    Oh sorry, sometimes it does

    Unfortunately, I think it comes down to overzealous use of versioning and macroization in system headers, and a mindset that makes breaking a binary ABI ok if you put a replaceable component above the core system.  I'm of the opinion that the C runtime is well enough specified that it can and should be link stable, especially across minor-version number increases (microsoft actually breaks across major version numbers to their credit, but glibc breaks at the minor number).  



  • Sorry, I know this is old, but I just have to add some info here...

    If you need multiple glibc libraries installed, look for the "compatibility" libraries.  They are usually named something like "compat-libstdc++" or "compat-libgcc".  These will install the shared libraries that you need without interfering with the latest versions of the libraries.  Great for dealing with precompiled binaries that can't be updated. 



  • If it were a standalone executable, that'd work.  I wouldn't expect it to work on something loaded in a process using a different glibc version however (a php extension for example).



  • @arty said:

    microsoft actually breaks across major version numbers to their credit, but glibc breaks at the minor number
     

    Of course, Microsoft only releases major versions... Except for the odd bugfix.


  • Garbage Person

    @mallard said:

     

    Of course, Microsoft only releases major versions... Except for the odd bugfix.

     

    I read this as "Only Microsoft releases major versions" - which is equally true. Really, FOSS developers, you need to learn that incrementing the version number is not a life or death thing.

     

    I, kid you fucking not, once used an opensource app with a twelve-digit version number less than 1.0. The first 8 digits were all 9's. 


Log in to reply