Migrating C Application from AIX to Linux

Hi All,

I am currently facing new problem of migrating C(c language) application from AIX machine to Linux machine. We are using GCC to compile the source code..

But facing with the compilation issues, with lot of GCC C libs differing between AIX box to Linux box...

Pls help me providing the cross compiler for both AIX, LINUX...else help me provide how to solve this issue.

details of AIX --

h /u/gmunger: which gcc
/usr/bin/gcc
h /u/gmunger: gcc -v
Reading specs from /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/specs
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --disable-nls --enable-languages=c,c++ --prefix=/opt/freeware --enable-threads --disable-shared --enable-version-specific-runtime-libs --host=powerpc-ibm-aix5.2.0.0
Thread model: aix
gcc version 3.3.2
h /u/gmunger:

Details of LINUX box:
HP UNIX GCC .
Thread model : POSIX

Thanks
Karthik C

I don't think a 'cross compiler' is what you want. Even if you had all the AIX headers, you'd also need all the AIX libraries, and then, you'd have to haul them with you everywhere you want the executable to work. You probably just want to fix the errors that prevent the code from being portable.

Which we really can't do without seeing the code, and preferably the errors too.

Please provide the output from gcc -v on Linux box. "HP UNIX GCC" simply does not sound to be right for such output.

Even better would be the output from gcc -### for both systems.

Can you provide an example of some of the errors you are getting?
Which particular version of GNU/Linux are you porting the application to?

First of all thanks for your reply. I errors which i am currently getting are more bcz of mismatch between AIX and Linux versions of GCC.

For example : methods, variables which present in AIX Box GCC Header file are missing in Linux Box GCC Header file.

Is it possible to modify the Existing Standard C library Header in such a way that it is portable to both linux and Aix?

---------- Post updated at 01:04 PM ---------- Previous update was at 01:02 PM ----------

Details of LINUX box:
gcc -v
Thread model : POSIX

Version : 3.3.3