1826783 Members
1442 Online
109702 Solutions
New Discussion

Re: HPUX 11.00 aCC port

 
SOLVED
Go to solution
Guy Mason
New Member

HPUX 11.00 aCC port

Hi all,

I'm attempting to port an application from HP/UX 10.20 using aCC to HP/UX 11.00 using aCC. I'm getting a runtime error :

/usr/lib/dld.sl: Unresolved symbol: __head (data) from /usr/lib/libC.2
/usr/lib/dld.sl: Unresolved module for symbol: _main (code)

I am using aCC to handle the link phase, anyone have a helpful hint? I'm hoping it's just a stupid user trick.

Thanks
Guy Mason
I think therefore I am, I think
5 REPLIES 5
Alex Glennie
Honored Contributor

Re: HPUX 11.00 aCC port

No idea on the exact cause of your problem but as to hints you may find some useful info at : http://devresource.hp.com/STK/index.html ?

Hopefully a programmin guru maybe able to clear this up easily ?
Alex Glennie
Honored Contributor
Solution

Re: HPUX 11.00 aCC port

Is the library /usr/lib/libC.2 sym linked to anything ? What results if you remove the link ?

This maybe a C++ library that's not supported for use with aC++ ?

If you do a "what /usr/lib/libC.sl" ?
do you find the following output:
$ what /usr/lib/libC.2
/usr/lib/libC.2:
HP C++ HPCPLUSPLUS A.12.10 (980319)

Matthew Crouse
Advisor

Re: HPUX 11.00 aCC port

Hello,

Like Guy, I am trying to port an application from HP-UX 10.20 and 11.0 with CC to 11i with aCC. I am experiencing the same runtime error (only in libC.1 rather than libC.2). My gdb output looks like this:

/usr/lib/dld.sl: Unresolved symbol: __head (data) from /usr/lib/libC.1
/usr/lib/dld.sl: Unresolved module for symbol: _main (code)

Was this problem ever solved? If so, what was the solution?

Alex, /usr/lib/libC.1 is a real file on my system, not a symlink. (Though /usr/lib/libC.sl is a symlink to /usr/lib/libC.2) Additionally, my what output is as follows for libC.1 and libC.2

$what /usr/lib/libC.1
/usr/lib/libC.1:
HP C++ HPCPLUSPLUS A.10.46 (991208)

$what /usr/lib/libC.2
/usr/lib/libC.2:
HP C++ HPCPLUSPLUS A.12.15 (991217)

Would the version difference cause a problem? Thanks in advance,

Matthew
Chris De Angelis
Frequent Advisor

Re: HPUX 11.00 aCC port

I'm no expert, but yes, this could be some kind of versioning problem when the dynamic loader attempts to find the symbols it's looking for in libC...

Try doing an "ldd" on your executable
(/usr/ccs/bin/ldd), and look for what's shown about the version and location of libC.
Jean-Paul Marinier
New Member

Re: HPUX 11.00 aCC port


Symbol __head is defined by /usr/lib/libcxx.a

That was part of the older C++ compiler which
installs under /opt/CC/

Actually when CC is installed, libcxx.a is
a symlink to /opt/CC/lib/libcxx.a

If this gets linked into the executable, and
you authorize re-export of symbols to dynamically loaded shared libraries (ld -E or
aCC -Wl,-E) then these libraries should see
symbol __head correctly

If you recompile *everything* so that no code
compiled with CC is left, you should no longer need the __head symbol and libcxx.a

File /usr/share/html/C/linker/linkhelp.html
contains the theory about ld -E.

hp# pwd
/usr/lib
hp# nm -r libcxx.a | grep __head | grep -v undef
libcxx.a:__head |1073741832|extern|data |$SHORTDATA$


Hope this helps,

Jean-Paul Marinier