Moving gcc compiled programs - Aix

This is a discussion on Moving gcc compiled programs - Aix ; Hello, If I compile a piece of software on one AIX box using gcc, will it then - in general - be possible to execute on other AIX boxes (with the same AIX version, and the same CPU type)? - ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Moving gcc compiled programs

  1. Moving gcc compiled programs

    Hello,

    If I compile a piece of software on one AIX box using gcc, will it then -
    in general - be possible to execute on other AIX boxes (with the same AIX
    version, and the same CPU type)? - Or are special gnu-compatibility
    libraries needed on the other box?

    --
    Regards,
    Troels Arvin
    http://troels.arvin.dk/

  2. Re: Moving gcc compiled programs

    Troels Arvin writes:

    > If I compile a piece of software on one AIX box using gcc, will it then -
    > in general - be possible to execute on other AIX boxes (with the same AIX
    > version, and the same CPU type)?


    Yes, provided all required gcc shared libraries are present on the
    other box.

    > - Or are special gnu-compatibility libraries needed on the other box?


    They aren't "special" in any way; but the same (or compatible)
    libraries you linked against must be present at runtime.

    You may also link programs in such a way that no gcc shared
    libraries are required (by statically linking all required code
    into the executable itself). The details of how to do this differ
    depending on whether you have C or C++, and on the version of gcc
    you used.

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

  3. Re: Moving gcc compiled programs

    On Fri, 09 Feb 2007 07:14:14 -0800, Paul Pluzhnikov wrote:
    >> If I compile a piece of software on one AIX box using gcc, will it then -
    >> in general - be possible to execute on other AIX boxes (with the same AIX
    >> version, and the same CPU type)?

    >
    > Yes, provided all required gcc shared libraries are present on the
    > other box.


    OK, so - being specific - if the compiling box has gcc from
    http://www-03.ibm.com/servers/aix/pr.../download.html then
    the other box should have the libgcc package installed?



    --
    Regards,
    Troels Arvin
    http://troels.arvin.dk/

  4. Re: Moving gcc compiled programs

    Troels Arvin writes:

    > OK, so - being specific - if the compiling box has gcc from
    > http://www-03.ibm.com/servers/aix/pr.../download.html then
    > the other box should have the libgcc package installed?


    For "palin C" that will probably be sufficient.
    For C++ you'll probably also need libstdc++.

    Cheers,
    --
    In order to understand recursion you must first understand recursion.
    Remove /-nsp/ for email.

+ Reply to Thread