On 27/04/2011 21:56, Nick Sabalausky wrote:
"Nick Sabalausky"<a@a.a>  wrote in message
news:ip9va1$2lbe$1...@digitalmars.com...
"Spacen Jasset"<spacenjas...@yahoo.co.uk>  wrote in message
news:ip9n5d$27je$1...@digitalmars.com...

try lsb_release for this, if you aren't sure (and it's available as a
command)

jason@ionrift:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.2 LTS
Release:        10.04
Codename:       lucid

otherwise cat /etc/*release*


On my system, the one I'm compiling on, I get:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.04.1 LTS
Release:        10.04
Codename:       lucid

On the main server I just get:

$ lsb_release -a
-jailshell: lsb_release: command not found


On the main server, cat /etc/*release* doesn't work either:

$ cat /etc/*release*
cat: cat /etc/*release*: No such file or directory




I see. It looks like you are trying to run at least on debian 4 yes.


What I would suggest you do is get the oddest debian or centos distribution you can, use a virtual box, and build on that. e.g. centos 3

It is possible to get "compat libraries" for some distributions, but that may just be more hassle.


You *can* by the way statically link any libraries (if you need to), except libc.so. As other libraries don't call the kernel directly.

something like this:

gcc obects.o -Wl,-Bstatic -lc++ -lfoo -lfish -Wl,-Bdynamic



The way to then check if the binary will run on an older (or newer system) is

ldd <executable> or library. It will then tell you what it will bind to, or if it cannot find any particular library.

Reply via email to