Operating System - HP-UX
1832856 Members
2907 Online
110047 Solutions
New Discussion

Re: HPUX.PARISC platform linking issue.

 
jgobbur
Advisor

HPUX.PARISC platform linking issue.

Hi,

I am getting following error during the linkline.
Even I used the +k option during the compilation of files.
See:
====
ld: Duplicate symbol "sthpfi_curr" in files /ade/aime_has_347028/oracle/has/lib/s0clsnAgentMain.o and /ade/aime_has_347028/oracle/has/lib/liboraagent11.a[clsnAgent.o]
ld: Duplicate symbol "sthpfi_prev" in files /ade/aime_has_347028/oracle/has/lib/s0clsnAgentMain.o and /ade/aime_has_347028/oracle/has/lib/liboraagent11.a[clsnAgent.o]
ld: Duplicate symbol "sthpfi_curr" in files /ade/aime_has_347028/oracle/has/lib/s0clsnAgentMain.o and /ade/aime_has_347028/oracle/has/lib/liboraagent11.a[clsnDiskmonAgent.o]
ld: Duplicate symbol "sthpfi_prev" in files /ade/aime_has_347028/oracle/has/lib/s0clsnAgentMain.o and /ade/aime_has_347028/oracle/has/lib/liboraagent11.a[clsnDiskmonAgent.o]
ld: Unsatisfied symbol "kgdsdst(skgdscb *,unsigned int)" in file /ade/aime_has_347028/oracle/has/lib/s0clsnAgentMain.o
5 errors.

====
Pls let me know what could be the issue here.
2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: HPUX.PARISC platform linking issue.

The errors mean what they say. You have duplicate symbols in your object file and in your archive. You may want to remove that object from the link line?

That unsat indicates you are missing a C++ symbol kgdsdst. If that is suppose to be C, you need to use: extern "C" ...
Dennis Handly
Acclaimed Contributor

Re: HPUX.PARISC platform linking issue.

>If i use the link line option "-Wl,+allowdups" it works fine. Is there better way to avoid this issue?

Make sure sthpfi_curr, etc. aren't defined in more than once place. Then use "extern type sthpfi_curr" when you want to reference it.

What does the source like like for s0clsnAgentMain.cpp and clsnAgent.cpp?