Operating System - HP-UX
1837249 Members
5132 Online
110115 Solutions
New Discussion

Installing HP ANSI C to other than default target

 
Christian Kappel Jensen
Occasional Contributor

Installing HP ANSI C to other than default target

Hi!

I've been trying to get HP ANSI C (B3901BA B.11.11.08) to work from an alternative target path. I have installed it into /opt/sdk2, as described at http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,2548,00.html.

It installs fine, however, when I execute /opt/sdk2/opt/ansic/bin/cc, it returns

/opt/sdk2/usr/ccs/bin/ld: Can't open /opt/langtools/lib/crt0.o
/opt/sdk2/usr/ccs/bin/ld: No such file or directory

I have copied set SDKROOT to /opt/sdk2 and also tried with LPATH set to /opt/langtools/lib, but to no avail.
It does work if I link the langtools path to where it expects it (/opt/langtools/lib), but that is not where I want it.


Any suggestions?


Regards,
Christian
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: Installing HP ANSI C to other than default target

The variable you need to fix is SHLIB_PATH

If you adjust the target and the SHLIB_PATH it might work.

My experiments with java were less than promising though.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steve Steel
Honored Contributor

Re: Installing HP ANSI C to other than default target

Hi


try LD_PRELOAD


LD_LIBRARY_PATH, SHLIB_PATH, and LD_PRELOAD
Specifies, at runtime, directories to search for library files.
See the +s option, dld.sl(5), and the +help option for the Online
HP-UX Linker and Libraries User's Guide for more information.



Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Franky_1
Respected Contributor

Re: Installing HP ANSI C to other than default target

Hi,

you should preset the LD_LIBRARY_PATH Variable accordingly

Regards

Franky
Don't worry be happy
Christian Kappel Jensen
Occasional Contributor

Re: Installing HP ANSI C to other than default target

Thank you all for the suggestions. However, none of the suggestested environments solved the problem.

I have tried with these set and exported accordingly:

LPATH=/opt/sdk2/opt/langtools/lib
SHLIB_PATH=/opt/sdk2/opt/langtools/lib
LD_PRELOAD=/opt/sdk2/opt/langtools/lib
LD_LIBRARY_PATH=/opt/sdk2/opt/langtools/lib
SDKROOT=/opt/sdk2

I still get the same:

bash-2.04# /opt/sdk2/opt/ansic/bin/cc dummy.c
/opt/sdk2/usr/ccs/bin/ld: Can't open /opt/langtools/lib/crt0.o
/opt/sdk2/usr/ccs/bin/ld: No such file or directory

Maybe I'm missing something here?


Regards,
Christian