1833783 Members
2203 Online
110063 Solutions
New Discussion

using the c compiler

 
SOLVED
Go to solution
Mark Stewart
Frequent Advisor

using the c compiler

there seems to be a small difference between the c compilers on HPUX 10.x and HPUX 11.x. This difference is causing programs compiled on the newer hp-ux to crash, forcing me to only use the older machines. Has anyone heard of this, and is there any way to fix it?
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: using the c compiler

Hi Mark:

You are breaking the rules, the 10.20 code is compatible on 11x but the converse is not true.
If you have to support both 10.20 and 11x boxes then you must compile on the 10.20 box.
You should also make certain that you compile with +DAportable so that all the PA-RISC processors are supported if you have to run in in PA-7xxx and PA-8xxx world.

Regards, Clay
If it ain't broke, I can fix that.
Mark Stewart
Frequent Advisor

Re: using the c compiler

ok, new part of this problem. I need to be able to compile this code on one of my newer machines, which it will not do. I think it won't compile because the newer machines and versions of HP-UX don't have the libraries. Here's the deal - I have to compile on an old hp730(HPUX 10.2 - I think) for it to actually compile. I then run it on 2240(HPUX 10.2) and 6000(HPUX 11.0) workstations. I would like to compile on the 2240 machine, but it seems to be missing something. Any suggestions?
Edward Alfert_2
Respected Contributor

Re: using the c compiler

could you copy and paste the errors that you get during failed compile so we can track down which libraries you need.

thanks.
"Do what you love and you will never work a day in your life." - Confucius
A. Clay Stephenson
Acclaimed Contributor

Re: using the c compiler

Hi Mark:

If I take you at your word, it can't be library errors - that could only affect the linker or executable if using shared libraries. I suspect you are missing header files because your 2nd 10.20 box does not have a development system on it but simply the bundled C compiler which was intended for building kernels but not much more than that.

If you list a few of the errors, I can tell you for sure.

Regards, Clay
If it ain't broke, I can fix that.
Mark Stewart
Frequent Advisor

Re: using the c compiler

I'm actually getting a different error now, but I think that's from a change I made to the makefile. Here is the error I was getting on the 6000 machine:


unrecognized HP-UX version: B.11.00 (assuming 10.0 filesystem)

/usr/ccs/bin/ld:Can't find library for -lM

*** Error exit code 1

Stop.
---------------------------------------------
on the 2240 machine, it's somewhat different. the error on it is:

(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -g option is available only with the C/ANSI C product; ignored.

/usr/ccs/bin/ld:Can't find library for -lXm

*** Error exit code 1

Stop.
---------------------------------------------

Does that help at all?
A. Clay Stephenson
Acclaimed Contributor

Re: using the c compiler

Hi Mark:

On the first machine, it can't find a library.
It appears to be looking for /usr/lib/libM.sl or /usr/lib/libM.a unless you hace used the -L cc option to change the linker library search path so that the files need not be in the default /usr/lib directory. However, this also appears to be running 11.00 which is back to your original problem.

-------------------------------------------

The fundamental problem on the 2nd box is that you don't have a development C compiler. It can't find /usr/lib/libXm.sl or /usr/lib/libXm.a.

You need to purchase the ANSI/C compiler.

Clay
If it ain't broke, I can fix that.