From: Mark Gray
My understanding of the restrictions that Linus put on Linux was that was that a program on one linux operating system had to be compatible with another operating system.
He has said nothing about application programs that I know of.
I have compiled a program with g++ compiler on suse linux and transferred the executable to a server running rad hat linux. If I compile this source code on the server it works but if I compile the same source code on desktop and ftp up executable it does not work. Both machines running 586. I looked at the server executbale and it was 20k in size. The executable on my system was about 30k using the same source code. Is this incompatability my fault?
Redhat-7.0 uses a beta version of gcc/g++ which uses a new and incompatible name mangling convention so you cannot run c++ programs compiled with earlier versions of g++ on redhat-7.0 and vice versa (unless you statically link them, but c++ statically linked programs are absolutely huge.) The egcs people seem to suggest that they will be returning to the old name mangling convention before releasing the next version (as I read it) and were a bit upset that redhat included the beta g++ (but it is a more advanced/standards compliant version.)
Could this be because I have my hard drive in 32 bit mode and maybe server in 16 bit mode?
No such thing in Linux -- see above.
Does anyone have any ideas how I can fix this? I find this confusing because I downloaded from another companies site once and it worked on my suse.
You probably should take a look at www.dejanews.com, www.google.com, the archive of the egcs lists at www.cygnus.com, or the archives of the redhat lists (if you can find them) for an answer -- there was quite a bit of anger when people first found out about the problem, so there is probably an answer in there somewhere (I gave redhat-7.0 a miss myself.)
Message-ID: <3A2A318C.870D6363@halenet.com.au>
Date: Sun, 03 Dec 2000 21:42:04 +1000
From: Don Hansford
My understanding of the restrictions that Linus put on Linux was that was that a program on one linux operating system had to be compatible with another operating system.
He has said nothing about application programs that I know of. I have compiled a program with g++ compiler on suse linux and
transferred the executable to a server running rad hat linux. If I compile this source code on the server it works but if I compile the same source code on desktop and ftp up executable it does not work. Both machines running 586. I looked at the server executbale and it was 20k in size. The executable on my system was about 30k using the same source code. Is this incompatability my fault?
In a word, yes. The reason you get the source and compile it is so that
it "moulds" itself to your system. If you want a generic - run on any
distro - type program, get the statically linked one. It's much bigger,
but it includes all the libraries etyc that you may or may not have on
your system.
Also, RedHat has a reputation for doing things a "bit differently" to
other linux distros, so to expext something compiled under SuSE to run
on RH is drawing a bit of a long bow! :-)
--
This Email is 100% Virus Free!
How do I know? Because no Microsoft
products were used to generate it!
Regards Don Hansford
ECKYTECH COMPUTING/
SQIT Warwick
participants (2)
-
donh@halenet.com.au
-
markgray@iago.nac.net