Unix Technical Forum

Moving gcc compiled programs

This is a discussion on Moving gcc compiled programs within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hello, If I compile a piece of software on one AIX box using gcc, will it then - in ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 12:15 PM
Troels Arvin
 
Posts: n/a
Default 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 <troels@arvin.dk>
http://troels.arvin.dk/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 12:15 PM
Paul Pluzhnikov
 
Posts: n/a
Default Re: Moving gcc compiled programs

Troels Arvin <troels@arvin.dk> 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 12:15 PM
Troels Arvin
 
Posts: n/a
Default 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 <troels@arvin.dk>
http://troels.arvin.dk/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 12:15 PM
Paul Pluzhnikov
 
Posts: n/a
Default Re: Moving gcc compiled programs

Troels Arvin <troels@arvin.dk> 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:44 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com