LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Library compatibility questions (https://www.linuxquestions.org/questions/linux-software-2/library-compatibility-questions-695584/)

tknutsson 01-07-2009 09:41 AM

Library compatibility questions
 
Hi,

I'm thinking about migrating an old 2.4-system that uses some closed source libraries *dodging the rotten eggs*, to a shiny new 2.6-kernel.

My question is, will i be able to use these binary libs that are compiled for 2.4 under 2.6? If so, will it require that i build the new kernel using the same toolchain that I am using now?

Simon Bridge 01-07-2009 09:44 AM

Quote:

will i be able to use these binary libs that are compiled for 2.4 under 2.6
In general: no.

Technically it depends what they are and how they were compiled.

tknutsson 01-07-2009 09:45 AM

wow, that was fast :)

Could you explain why this will not work?

Does it make any difference if it is static/shared?

i92guboj 01-07-2009 10:38 AM

Quote:

Originally Posted by tknutsson (Post 3399945)
wow, that was fast :)

Could you explain why this will not work?

It entirely depends on the libraries really. Having a 2.4 or 2.6 kernel shouldn't really matter for *most* user land programs. But your glibc version is really critical, and there the kernel headers come into scene.

If your programs require a given feature that's present in older versions of glibc or your kernel then you are going to need to patch them, how much work will be needed depends on the application. It really depends on how low level this apps are.

Quote:

Does it make any difference if it is static/shared?
It could. But if the applications are very old there are a million things that could go wrong.

Why not just copy them into an usb stick and try to run them after booting from a modern livecd? You could as well install a newer distro into a vm or something like that.

tknutsson 01-08-2009 01:20 AM

Quote:

Originally Posted by i92guboj (Post 3399998)
It entirely depends on the libraries really. Having a 2.4 or 2.6 kernel shouldn't really matter for *most* user land programs. But your glibc version is really critical, and there the kernel headers come into scene.

If your programs require a given feature that's present in older versions of glibc or your kernel then you are going to need to patch them, how much work will be needed depends on the application. It really depends on how low level this apps are.



It could. But if the applications are very old there are a million things that could go wrong.

Why not just copy them into an usb stick and try to run them after booting from a modern livecd? You could as well install a newer distro into a vm or something like that.

Ok, since i cannot look into the code i guess that the only way to know for sure is to execute them on 2.6 and see what happens. However, by the way they are used i would guess that they mostly use stdio for file i/o, some sockets and math. Have there been any major changes in those areas in libc?

Valery Reznic 01-08-2009 01:25 AM

Quote:

Originally Posted by i92guboj (Post 3399998)
Why not just copy them into an usb stick and try to run them after booting from a modern livecd? You could as well install a newer distro into a vm or something like that.

Good idea. If it's work you are lucky. If not you can try to use Ermine (http://magicErmine.com) or statifier (http://statifier.sf.net).

Both of them able to pack dynamically linked executable and all shared library this executable uses into one self-contained executable, that can run virtually on any Linux distribution (with same processor :). Statifier is license under GPL, Ermine is commercial. On the other hand executble packed with statifier can have problem on systems with memory randomization.

i92guboj 01-08-2009 01:27 AM

Well, the simpler the program is, the better chance you get to run it successfully. Nothing major should have changed there, but even minor changes can sometimes break compatibility.


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