Operating System - Linux
1748038 Members
5051 Online
108757 Solutions
New Discussion юеВ

Re: Unresolved symbol: __head (data) from /usr/lib/libC.2

 
Dima_Ru
Occasional Contributor

Unresolved symbol: __head (data) from /usr/lib/libC.2

Hello!
I am new on HPUX. But I am porting an application from linux to HPUX. And I got an error while trying to start it:

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


What is really wrong? I looked on libC and found that __head really undefined.
7 REPLIES 7
Peter Godron
Honored Contributor

Re: Unresolved symbol: __head (data) from /usr/lib/libC.2

Dima,
welcome to the ITRC !

Have you seen this previous thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1029240

Also, what step have you used to compile/link your code after moving it from Solaris to HP? What is your environment setup, especially LIB locations?

If this answer was useful, please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
Calandrello
Trusted Contributor

Re: Unresolved symbol: __head (data) from /usr/lib/libC.2

Dima
which and the application? In the installation occurred all certainty? Voce had that to compile? if yes the compilation was successfully?
Dennis Handly
Acclaimed Contributor

Re: Unresolved symbol: __head (data) from /usr/lib/libC.2

As Peter points out, you are illegally using the obsolete cfront lib libC. Remove -lC from your link lines. The appropriate libs should be supplied by the aCC driver.
Dima_Ru
Occasional Contributor

Re: Unresolved symbol: __head (data) from /usr/lib/libC.2

Oh! Thanks all of you. It really helped. I have removed -lC from linking and started without problems.

But is it really a HPUX compiler/linker bug? It sounds strange when I add another library and it failes...
Dennis Handly
Acclaimed Contributor

Re: Unresolved symbol: __head (data) from /usr/lib/libC.2

>But is it really a HP-UX compiler/linker bug? It sounds strange when I add another library and it fails.

What more do I need to say besides illegal and obsolete and not supported? ;-)

That obsolete lib requires you to link with the CC driver. Similar to aCC and -lCsup on PA.

Dima_Ru
Occasional Contributor

Re: Unresolved symbol: __head (data) from /usr/lib/libC.2

>That obsolete lib requires you to link the CC driver. Similar to aCC and -lCsup on PA.

Thanks, Dennis.

What do you mean "CC driver"?
As far as I got aCC is C++ compiler on HPUX. But rather strange...

So, if link with aCC and with -lC what should I also link with? Or whether it is possible to link in this way?

Can you suggest me any information about aCC, cc comopilers on HPUX. They are very different (as I see) comparing with sun's CC and gcc.
Dennis Handly
Acclaimed Contributor

Re: Unresolved symbol: __head (data) from /usr/lib/libC.2

>What do you mean "CC driver"?

CC is the obsolete cfront driver.

>if link with aCC and with -lC what should I also link with?

You should take the default.

>Can you suggest me any information about aCC, cc compilers on HPUX.

There is a man page for each. You can also use the +help option for Online Help. The are also on the web: (for aC++ and IPF C)
http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,7862,00.html

For PA C:
http://www.docs.hp.com/en/7763/5991-4871/c_index.html