Figure out the minimum os version neede to run executable or link library.
Hello,
I need to figure out the minimum OS version needed to run some executable.
For the following OS: Linux, AIX, Solaris. For example how do I know the minimum OS version for /bin/ls ? "file" command does not give me much information. There are some tools that are helpful for understanding is the code 32 bit, or 64 bit, but they do not return the minimum OS requirements.
This is a really odd question -- /bin/ls should work with the distribution it came with.
Pretty much anything in /usr, /sbin/, and /opt will work that way.
is about the best you can get. For solaris read isainfo man page, Linux try /etc/release, AIX I dunno. Solaris is very good about running older versions of code. However in all OS cases the limiting factor is almost always the current runtime libraries.
What EXACTLY are you trying to do ?? If it isn't simple curiosity, then you are asking for some trouble down the road.
This is a really odd question -- /bin/ls should work with the distribution it came with.
Pretty much anything in /usr, /sbin/, and /opt will work that way.
is about the best you can get. For solaris read isainfo man page, Linux try /etc/release, AIX I dunno. Solaris is very good about running older versions of code. However in all OS cases the limiting factor is almost always the current runtime libraries.
What EXACTLY are you trying to do ?? If it isn't simple curiosity, then you are asking for some trouble down the road.
Hello and tank you for the fast replay,
Here is some additional information on what I'm trying to do.
I'm trying to achieve the following goal: Automatically name the zip file containing binaries, and libraries compiled on the machines having the above OSes.
The name of the zip file containing the program named prog and it's libraies must be like in the example bellow:
prog-AIX_5.3-RISC.zip
prog-SunOS_5.10-x86_64.zip
prog-SunOS_5.8-SPARC.zip
prog-Linux_2.6.38-x86_64.zip
and so on ...
This is to avoid executing AIX 5.3 executable on AIX 5.2 for example. There are some cases in which the executables are not backward compatible.
I'm trying to avoid this.
For Linux "file" command returns the minimum Linux Kernel that was used during the compilation process.
For the other OSes I can get some information. What I'm not able to do directly is to predict what is the minimum OS version (or kernel version) needed to execute the code. For AIX there is dump command , but it is not much of a help. ldd does not help either. I was wondering how the OS itself decides is this good program (instruction set) to execute.
Here is some additional information on what I'm trying to do.
I'm trying to achieve the following goal: Automatically name the zip file containing binaries, and libraries compiled on the machines having the above OSes.
Why would you use a zip file to hold UNIX executable files? Permissions may not be preserved properly, which could play havoc. Tarballs are better suited.
Quote:
For Linux "file" command returns the minimum Linux Kernel that was used during the compilation process.
This really isn't relevant. You can often run x86 binaries from 1992 on a modern Linux system if you have old enough libraries, or the new libraries are compatible. The way many basic system calls work hasn't changed much since Linux's inception. The libraries are what's really important.
Use packages that were actually distributed for these various operating systems instead of keeping your own tarballs of randomly packaged binaries, and you'll have programs that're supposed to work and know exactly what their dependencies are.
Last edited by Corona688; 12-19-2011 at 02:19 PM..
I am administering an Xserver v10.6.8 and I updated the ports using Macports self update. I received this error when calling the program R
dyld: Library not loaded: /opt/local/lib/libicuuc.48.dylib
Referenced from: /opt/local/lib/R/lib/x86_64/libR.dylib
Reason: image not found
Trace/BPT... (2 Replies)
Hello All,
I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it:
I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable
Approach 1 works... (0 Replies)
I would like to make a script that I can see if the file is executable. If it is executable then it needs to run. Otherwise, if it is not executable the file needs to be edited, and run agian.
I hope you understand what i mean. :)
Thanks for the netherlands (4 Replies)
HI All,
We have a 32bit Gui application created using C++. We ported the application from Solaris to Linux. Issue we are facing is
the size of the library and executable is very large in LINUX compared to Solaris.
Red Hat Enterprise Linux 5.4 is the Linux version we using.
Please... (0 Replies)
I have a script within my home folder and want to be able to execute it without using the sh command.
I know that if it was in ~/bin and executable I could do it just by typing the file name, but would rather keep it in the current file structure
I tried creating a soft link in ~/bin,... (5 Replies)
Hi,
I have an executable that takes indefinitely long time to search for the libsendfile.so in particular solaris machines only. The library is actually in the /lib folder. Where as it works fine on few of the machines, it takes long time in few others.
I have checked crle options. Its... (1 Reply)
I have installed the Darwin Calendar Server on my Mac and got it working.
To start the server I open a Finder window on my mac and click the UNIX executable called RUN.
In order to start the server automatically on bootup I used LINGON to add a startup Daemon to call "RUN -d". When I reboot... (6 Replies)
Our development machines have libstdc++.so.5 and libstdc++.so.6.
When we build our native code, it uses libstdc++.so.6. Is there anyway I can force it to use libstdc++.so.5 instead ?
$ ldd try
/usr/lib/libcwait.so (0x00655000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6... (5 Replies)
Hello,
J have a problem when I use gcc:
This comand works:
gcc -shared -fpic -I/usr/include/sys -I/usr/include -L/usr/lib/librt.sl essai1.c mylib.sl
but
gcc I/usr/include/sys -I/usr/include -L/usr/lib/librt.sl essai2.c -o essai
don't work.
The first command creates a dynamique... (1 Reply)