Shared libraries on Linux are designed to be forward-compatible.  In
otherwords, newer versions of system libraries generally do not break
executables built with older versions of those libraries.
Unfortunately, the converse is not true: executables built against
newer libraries will not work when run on systems with older
libraries.

If you want to build an exe that will run in as many places as
possible, your best bet is to build it on the oldest system you want
it to run on.  In your case, since your desired system for it to run
on is embedded and you can't build it there, you need to find out what
version of the system libraries the embedded system is using, and then
find a Linux distribution based on the same version.  The only library
you probably need to worry about is libc.so.6, the system C run-time
library.  As long as you build on a system which has the same C
run-time lib (or older), then the exe will run.

If your embedded system is Red Hat based or uses the RPM install tool,
you can figure out your C runtime version using 'rpm -q glibc'.
Otherwise, you can figure it out by doing looking at the symbolic link
for the library:

% ls -l /lib/libc.so.6
lrwxr-xr-x    1 root     root           13 Apr  2 11:44 /lib/libc.so.6
-> libc-2.2.4.so

Here the glibc version is 2.2.4; this command was run on a Red Hat 7.2
system.  RH 7.2 and 7.3, Mandrake 8.0,  and S.u.S.E 8.0 all use glibc
2.2.4 I believe.  Any of these distros should be able to build an exe
that will run on your embedded system if it also has 2.2.4 or newer.
If it's older, I know RH 6.2 uses 2.1.92.
You may be able to use the resource rpmfind.net to help you figure out
what distros have the version you need.
(And I don't recommend going with S.u.S.E., because I've  had a really
hard time finding older versions of it for sale or downloadable
on-line.)

One further note:  I'm assuming your executable is either in C or is
built using the LV app builder.  If it's C++, you are in another plane
of library he11, because libstdc++ library has been through many ABI
changes and has been a moving target until fairly recently.  Use
rpmfind.net to find the library packages you need; you might look for
packages made explicitly for building backward-compatible exes; they
tend to be named things like 'glibc-compat' and 'libstdc++-compat'
plus a version number.

Good luck!

Regards,
Craig Smith
LabVIEW R&D

Reply via email to