Re: no Hello World!!
- From: jt@xxxxxxxxxxx (Jens Thoms Toerring)
- Date: 19 Mar 2007 23:24:18 GMT
rwittenberg@xxxxxxxxxxxxxxx wrote:
I want to be able to compile with my Fedora Core 6 system and run the
executable on my Debian Woody system. I used to compile on a Red Hat
9.0 box and run on Debian Woody earlier and that worked just fine.
Here is what I see in the 2 scenarios.
Why didn't you tell from the start that you compiled the program on
one machine and then copied it to another one, trying to run it
there? That normally doesn't work and immediately explains your
troubles.
Case 1 (compiled on FC6 run on Debian):
On compiling on FC6 and
on FC6
#ldd a.out
linux-gate.so.1 => (0x0057f000)
libc.so.6 => /lib/libc.so.6 (0x00ad0000)
/lib/ld-linux.so.2 (0x00ab3000)
After transfering file
on Debian
#ldd a.out
/usr/bin/ldd: line 1: 3164 Floating point
exceptionLD_TRACE_LOADED_OBJECTS=1 LD_WARN= LD_BIND_NOW=
LD_LIBRARY_VERSION=$verify_out LD_VERBOSE= "$file"
Case 2 (compiled on RH9 and run on Debian):
On compiling on RH9 and
Running on RH9
# ldd a.out
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
After transfering file
on Debian
# ldd a.out
libc.so.6 => /lib/tls/libc.so.6 (0xb7e27000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7f62000)
Well, obviously FC6 and Woody are different enough systems to
make it impossible to simply copy a program from one machine
to the other and having it run on there, while RH9 and Woody
are similar enough. Probably different versions of the libc or
ld-linux.so, different locations of where the essential libra-
ries are, and maybe different additional libraries required
(as you can see, FC6 needs some linux-gate.so that probably
doesn't even exist on the other systems). Forget about that
and get used to compiling your programs on the target machine,
you're in for a lot of grieve otherwise. Or link statically
if you really have no alternatve to moving the binary, that's
the only more or less practical method.
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@xxxxxxxxxxx
\__________________________ http://toerring.de
.
- Follow-Ups:
- Re: no Hello World!!
- From: rwittenberg
- Re: no Hello World!!
- References:
- no Hello World!!
- From: rwittenberg
- Re: no Hello World!!
- From: Jens Thoms Toerring
- Re: no Hello World!!
- From: rwittenberg
- Re: no Hello World!!
- From: Jens Thoms Toerring
- Re: no Hello World!!
- From: rwittenberg
- no Hello World!!
- Prev by Date: Re: no Hello World!!
- Next by Date: Re: no Hello World!!
- Previous by thread: Re: no Hello World!!
- Next by thread: Re: no Hello World!!
- Index(es):
Relevant Pages
|