- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem compiling with HP-UX cc ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-10-2006 11:21 AM
тАО10-10-2006 11:21 AM
I'm new to HP-UX, working on an HP-UX Itanium II cluster, and trying to compile 64bit binaries using the cc compiler.
The compile steps seem to work fine (so my CFLAGS are okay?) but the linking step fails (with LFLAGS = +O3 -lm):
"ld: Can't find library or mismatched ABI for -lm" (see attached makefile & compiler messages).
I have compiled working binaries using gcc, but these won't be well optimised for this platform... Can anyone point me in the right direction to resolve this?
Thanks in advance,
D.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-10-2006 04:27 PM
тАО10-10-2006 04:27 PM
Solutionlooking for "libm.*" in the wrong place.
There seems to be an abundance of wrong
choices:
antinode@td164> find /usr/lib -name 'libm.*' -exec file {} \;
/usr/lib/hpux32/libm.so: ELF-32 shared object file - IA64
/usr/lib/hpux32/libm.so.1: ELF-32 shared object file - IA64
/usr/lib/hpux32/libm.a: archive file
/usr/lib/libm.1: s800 shared library -not stripped
/usr/lib/libm.2: PA-RISC1.1 shared library -not stripped
/usr/lib/hpux64/libm.so: ELF-64 shared object file - IA64
/usr/lib/hpux64/libm.so.1: ELF-64 shared object file - IA64
/usr/lib/hpux64/libm.a: archive file
/usr/lib/pa20_64/libm.2: ELF-64 shared object file - PA-RISC 2.0 (LP64)
/usr/lib/pa20_64/libm.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)
/usr/lib/libm.0: s800 shared library -not stripped
/usr/lib/libm.sl: PA-RISC1.1 shared library -not stripped
I'd expect you to want one of the IA64
choices.
"man ld" suggests that it (or the the dynamic
loader) can be misled by environment
variables like LPATH, RPATH, SHLIB_PATH,
and/or LD_LIBRARY_PATH. Unset 'em if you
have 'em.
If it really is looking in the wrong
directory, and if it's not obvious why, you
might try throwing in a "-L dir" option to
try to steer it back to a better one.
There may be an "ld" option which would offer
more clues as to where it seeks what, but, if
so, it's unknown to me (like so many things).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2006 09:20 AM
тАО10-11-2006 09:20 AM
Re: Problem compiling with HP-UX cc ...
Excellent - problem solved (& now I know a little more about cc...)
For the record, LD_LIBRARY_PATH was set to the pretty obscure /contrib/lsf/6.0/hpuxia64/lib
Adding -L /usr/lib/hpux64 fixed it.
many thanks!
D.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2006 09:22 AM
тАО10-11-2006 09:22 AM
Re: Problem compiling with HP-UX cc ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2006 09:36 AM
тАО10-11-2006 09:36 AM
Re: Problem compiling with HP-UX cc ...
Good news, but you might wish to look into
why LD_LIBRARY_PATH is set to anything,
especially globally. It's pretty harmless
when it's set in some shell script which runs
some program which needs it, but to have it
always set to anything may be asking for
trouble (like this). Including the default
value(s) in the colon-separated variable
value can help, but the right value for one
program can easily be wrong for another.
This fellow seems to have hit something
similar (setting more stuff), for example:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1067351