Re: Best way of compiling applications to run on older linux distros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Tom,

I've never tried it on too old platforms, but isn't it sufficient to copy ALL new libraries with which your application is dynamically linked from the new machine to the old one, and then adjust LD_LIBRARY_PATH in order to guarantee that the correct libraries are used (check with "ldd application_name")? OK, that may raise juridical questions, if your application is not GPL'ed (may be, I have no idea...) and increases the total size of the project. But I think, that should work? What am I missing?

Axel

PS: I have the impression, that's the technique used by most windows applications: simply install all needed libraries in the adequate version on the target machine ...

-------- Original-Nachricht --------
> Datum: Tue, 04 Nov 2008 10:59:57 +0000
> Von: Tom Quarendon <tom.quarendon@xxxxxxxxxxxxx>
> An: gcc-help@xxxxxxxxxxx
> Betreff: Best way of compiling applications to run on older linux distros

> We have a requirement for our application to run on Centos 4, but 
> currently we compile on Fedora 9 with gcc 4.3.
> My question is what is the best way of compiling an application to 
> target older linux distros? Doesn't seem to be any common wisdom that I 
> can find on the web, but maybe I'm searching for the wrong thing.
> 
> I had tried just compiling up with gcc 4.3 and bundling the executables 
> and libraries, including libstdc++ (code is written in C++), but ran in 
> to the problem of the dynamic linker hash format having changed. So I 
> recompiled with the --hash-format=sysv linker option, but the 
> libstdc++.so is still compiled in the incompatible way, and without 
> shipping libstdc++.so I get complaints about incorrect levels of 
> libstdc++ (expecting 3.4.9 I think, but only found 3.4.6).
> 
> Obvisously one solution is to compile on Centos 4, using a gcc such as
> 3.4.
> However I'd like to use the latest gcc is I can. Indeed I'm having 
> trouble getting some of our code to link when I compile it with gcc 3.4 
> installed on the Fedora 9 build machine. I'm assuming that latest gcc 
> will produce better results. It certainly compiles much faster.
> 
> So what's the "correct" way to do this? If I'm a company producing 
> commercial applications that I'd like to run on as wide a variety of 
> common Linux installations as possible, what's my best build 
> platform/tool chain?
> 
> Thanks.
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email 
> ______________________________________________________________________

-- 
"Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ...
Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux