Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C compiler for AIX5.2

Status
Not open for further replies.

polani

Instructor
Jun 4, 2003
159
CA
Dears,
I need an urgent help from your side for C compiler issue.
I install AIX5.2 with ML01...some xlc filesets are installed as a part of AIX installation.
It appears that these are only runtime C compiler filesets.
Could these filesets be used for compiling user applications ( c based ) or not?
In my previous experience i need C compiler for AIX as a seprate product with licenses for this purpose.
Also if i compile c programmes and generate C object files
and transfer these to another pseries machine ( with same AIX level but no C compiler )will these C executables work or not??
Please help me on an urgent basis... i will remain thankfull to you alll
Polani!!!





Here comes polani Once again!!!

P690 Certified Specailist
HACMP & AIX Certified Specailist
AIX & HACCMP Instructor
 
Hi,

I'm not a C specialist, but, i may have some informations:

Logicaly, there is a native C compiler packaged with AIX but if you have only the runtime filesets installed you won't be able to compile anything.

An easy way is to install GCC, it willl take nearly 10 minutes of your time and is a totaly free C compiler.


For your last question, in many cases, having the C runtime installed will be enough to execute C applications, but it depends of the way the programs were compiled and if they try to call some external specific libraries.



I hope this will help you
 
Dear All,
Thanks for your support.
Infact while writing my query i just delivered some words mistake.
Infact this problem arose from one of my customer who wanted to know that if he wants to run his C/C++ compiled applications ( which he is planning to acquire from his third part vendor), will he succeed or not using these C runtme environment filesets..
I , by mistake has wrritten .o files....infact i mean object files which are created by compiling C applications. I have still following questions and will feel very courtagiuos if anyone of you answer them.

1.Does execution of C object files require existance of application
specific libraries if they are executed on a machine different from
the machine on which they are compiled.
2. It appears that in a big environemnt ( seprate machines for developer / testing/ production env.) it will be suffice to have C compiler on development machine only.Compile C code and transfer binaries to other machines.Will this procedure require same O/S level
between the machines.


polani

Here comes polani Once again!!!

P690 Certified Specailist
HACMP & AIX Certified Specailist
AIX & HACCMP Instructor
 
the answers to your questions will depend on which system libraries are used in the C/C++ app. i am not a programmer, but you can avoid library issues by compiling a static binary, however this can get quite large. otherwise, any dynamic libraries you use should be compatible across the machines. it will help to use standard POSIX functions in your code.

sorry my answer is "might work, might not".

IBM Certified -- AIX 4.3 Obfuscation
 
I have one small wrinkle to add, if the source machine in question that built the executables was a 4.3 machine AND the executables are 64-bit apps...then you have a problem. A 64-bit executable built on a 4.3 machine will not run in a 5L environment until it is recompiled or so I read at least in ‘AIX Version 4.3 to 5L Migration Guide’
I am actually struggling with the planning stages of a 4.3->5.2 migration and this issue caught me totally off guard! IBM is usually very good about making stuff like this transparent, but according to them some low level change breaks 4.3/64bit apps on a 5L machine. I know thats off thread a little, but would love to understand this better if anyone knows anything about it. The documentation just makes the statement with little explanation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top