Operating System - Linux
1820667 Members
2355 Online
109626 Solutions
New Discussion юеВ

Error compiling pro*c thru make in HP-UX

 
Tushar Dey
New Member

Error compiling pro*c thru make in HP-UX

Hello,

I am getting following errors when compiling a pro*c program. My Pro*C programs used to work in in HP UX 10.20 but stopped working in HP UX 11.0.

================== ERROR message ===============
Precompiling prb_ptax.pc
cc -I. -O -Aa -Wl,-aarchive -L/cal/oracle/lib -o prb_ptax prb_ptax.c /cal/oracle
/lib/libsql.a /cal/oracle/lib/osntab.o -lsqlnet -lora /cal/oracle/lib/libpls.a -
lsqlnet -lnlsrtl -lcv6 -lcore -lnlsrtl -lcv6 -lcore -lcl -lm
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C pro
duct; ignored.
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C pro
duct; ignored.
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (prb_ptax.o) was dete
cted. The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unsatisfied symbols:
shl_load (code)
shl_findsym (code)
*** Error exit code 1

Stop.
================== ERROR message ===============
12 REPLIES 12
James R. Ferguson
Acclaimed Contributor

Re: Error compiling pro*c thru make in HP-UX

Hi:

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

...tells you that you are using the sleletal bundled C compiler only useful for basic kernel support and not a full-fledged ANSI C one. It would appear that you had licensed the ANSI C compiler on 10.20 but did not do so (or did not install) the same on your 11.x server.

Remember, 11.0 is out-of-support. The ANSI C compiler would be on one of the Application CDs but will require a codeword to unlock.

Regards!

...JRF...

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Error compiling pro*c thru make in HP-UX

ld: Unsatisfied symbols: shl_load shl_findsym

This occurs because you have illegally used -Wl,-aarchive.
Either leave it out or use -Wl,-aarchive_shared

Also as JRF mentioned, you shouldn't be using the bundled C compiler to develop applications.
Tushar Dey
New Member

Re: Error compiling pro*c thru make in HP-UX

Hi Gurus,

My priority is to work on the errors. So, can you please suggest me any workaround on the errors 'shl_load' and 'shl_fiindsym'. For the time being I am ignoring the warnings regarding cc comand line options options '-O' and '-A'.

Regards,
Tushar
Dennis Handly
Acclaimed Contributor

Re: Error compiling pro*c thru make in HP-UX

>can you please suggest me any workaround

I mentioned exactly why you got them.
Roberto Arias
Valued Contributor

Re: Error compiling pro*c thru make in HP-UX

Hi all

You must install compiler for HP-UX 11x . Isuggest you ANSI/C (HP software) o gcc (GNU software

rgds
The man is your friend
Bill Hassell
Honored Contributor

Re: Error compiling pro*c thru make in HP-UX

You do not have a compiler on the new system that will work. You must purchase the ANSI/C compiler (as was done on the old 10.20 system) or try using the free gcc compiler.


Bill Hassell, sysadmin
Tushar Dey
New Member

Re: Error compiling pro*c thru make in HP-UX

Hi All,

Thanks for suggestion that takes me towards installing the developer packs / gcc.

Meanwhile, I tried to compile by removing LDFLAGS "-Wl,-aarchive" and compiled as follows
---------------
cc -I. -O -Aa -L/cal/oracle/lib -o prb_ptax prb_ptax.c /cal/oracle/lib/libsql.a
/cal/oracle/lib/osntab.o -lsqlnet -lora /cal/oracle/lib/libpls.a -lsqlnet -lnlsr
tl -lcv6 -lcore -lnlsrtl -lcv6 -lcore -lcl -lm
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C pro
duct; ignored.
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C pro
duct; ignored.
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (prb_ptax.o) was dete
cted. The linked output may not run on a PA 1.x system.
---------------

But, finally when I executed the binary, I got following error -
/usr/lib/dld.sl: Can't open shared library: /usr/lib/libc.2

Any 2nd thought on this?

Regards,
Tushar
Dennis Handly
Acclaimed Contributor

Re: Error compiling pro*c thru make in HP-UX

>finally when I executed the binary, I got following error-
dld.sl: Can't open shared library: /usr/lib/libc.2

My crystal ball says you took your executable that you developed on 11.00 and tried to execute it on 10.20. That won't work and wouldn't work even if you could use -Wl,-aarchive.

Only forward compatibility is supported.
Tushar Dey
New Member

Re: Error compiling pro*c thru make in HP-UX

Hi Dennis,

You are absolutely correct.

1. I tried to compile in new box HP UX 11.00 without option '-aacrchive'. It worked.

2. I copied the executable to HP UX 10.20. It gave an error -
/usr/lib/dld.sl: Can't open shared library: /usr/lib/libc.2
/usr/lib/dld.sl: No such file or directory

3. When tried to HP UX 10.20 box now it gives -
core dump at precompilation itself.

Thanks.
Dennis Handly
Acclaimed Contributor

Re: Error compiling pro*c thru make in HP-UX

>2. I copied the executable to 10.20.

You can't do that.

>3. When tried to HP UX 10.20 box now it gives - core dump at precompilation itself.

Tried what? Core dump where? What did you mean by pre-compilation, something to do with pro*c?
Tushar Dey
New Member

Re: Error compiling pro*c thru make in HP-UX

Hi Denis,

Thanks again for your response. I now tried to precompile the entire thing in 10.20 box and it is not working. It gives error at precompilation itself.

Actually, there were two identical boxes with HP UX 10.20. One could precompile well and another couldn't. I used to ompile in one and port the executable to another. The one with good precompiler (PRO*C) got OS crashed and had to be reinstalled. Now, I am able to compile in this box (with OS reinstalled with HPUX 11.00 and system restored), but not able to port it to the other box with HPUX 10.20 where the precompiler doesn't work and gives core dump.

Is theere any way to compile in HPUX 11.00 with compatibility mode.

Regards,
Tushar
Dennis Handly
Acclaimed Contributor

Re: Error compiling pro*c thru make in HP-UX

>Is there any way to compile in 11.00 with compatibility mode.

No, there is no supported way. Only forward compatibility is supported.