Operating System - Linux
1751966 Members
4685 Online
108783 Solutions
New Discussion юеВ

Re: ld: Unsatisfied symbol

 
Thiagu_1
Advisor

ld: Unsatisfied symbol

When I try to compile a C++ code on HP-UX itanium 32-bit machine, I get the following error message.

ld: Unsatisfied symbol "RWCTokenizer::RWCTokenizer(RWClassicCString const&)(complete)" in file ../liberror/lib/liberror.a[logfacility.o]
ld: (Warning) Unsatisfied symbol "ostream::operator<<(void const*)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "ostream::operator<<(char const*)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "ostrstream::ostrstream()(complete)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "strstreambuf::freeze(int)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "ostrstream::~ostrstream()(complete)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "setw(int)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "strstreambase::rdbuf()" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "ostrstream::str()" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "ends(ostream&)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "Iostream_init::~Iostream_init()(complete)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "Iostream_init::Iostream_init()(complete)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "flush(ostream&)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "cerr" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "cout" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "endl(ostream&)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "ostream::operator<<(int)" in file /opt/Orbix/lib/liborbixmt.sl
ld: (Warning) Unsatisfied symbol "ostream::operator<<(unsigned long)" in file /opt/Orbix/lib/liborbixmt.sl

Can anyone provide solution for this please?
6 REPLIES 6
Dave Hutton
Honored Contributor

Re: ld: Unsatisfied symbol

Do you mean a 32 bit program?

I thought HPUX on Itanium was only 64bit. Sorry doesn't help much, but just in case your expecting something you shouldn't be.

Dennis Handly
Acclaimed Contributor

Re: ld: Unsatisfied symbol

How are you linking your application?

The above unsats indicate the lib is compiled with -AP. This is NOT the default on IPF and indicates a problem and the lib will generally not be usable on IPF at all. And goes against HP's recommendations.

The symbols are defined in -lstream and the RWCTokenizer is likely to be in -lrwtool -AP or -lrwtool_v2 for -AA.
Thiagu_1
Advisor

Re: ld: Unsatisfied symbol

My application are linked with

-AA
-D_RWCONFIG__RogueWaveStdLib_NoThrLib_Static_Debug
-ltls79-_RogueWaveStdLib_NoThrLib_Static_Debug
-lstd41-_RogueWaveStdLib_NoThrLib_Static_Debug
-L/opt/Orbix/lib -lorbixmt -lpthread

I tried adding -lrwtool_v2 but I still get the same error message.

I think I may be missing some SourcePro libraries!!!
Dennis Handly
Acclaimed Contributor

Re: ld: Unsatisfied symbol

>My application are linked with -AA

That's the problem. You can't use liborbixmt.sl on IPF unless you recompile with -AP. This is not all that usable, where did you get it?

(The library also doesn't seem to fit in with other IPF conventions, have a .so suffix and in a directory hpux32/.)

>I tried adding -lrwtool_v2 but I still get the same error message. I think I may be missing some SourcePro libraries!!!

Adding -lrwtool_v2 will only fix ONE unsat, RWCTokenizer. If you are using SourcePro, then you need to ignore what I said about lrwtool_v2, that's the HP supplied lib.
Thiagu_1
Advisor

Re: ld: Unsatisfied symbol

Thanks for your reply Dennis

> Reg Orbix warnings
/opt/Orbix/lib/liborbixmt.sl is a soft link pointing to ./liborbixmt.3.3.aCC.1 (available in the same directory). I changed the soft link to .so file but still the warnings remain the same

> Reg SourcePro errors
I tried using all the SourcePro libraries and I still get the same errors.

Here are the some other errors

ld: Unsatisfied symbol "RWOrdered::occurrencesOf(RWCollectable const*) const" in file .../SourceP
ro/SourcePro32/Ed8/lib/libdbt62-_RogueWaveStdLib_NoThrLib_Static_Debug.a[forkey.o]
ld: Unsatisfied symbol "RWCollectable::self() const" in file .../SourcePro/SourcePro32/Ed8/lib/li
bdbt62-_RogueWaveStdLib_NoThrLib_Static_Debug.a[expr.o]
ld: Unsatisfied symbol "RWDate::saveOn(RWFile&) const" in file .../SourcePro/SourcePro32/Ed8/lib/
libdbt62-_RogueWaveStdLib_NoThrLib_Static_Debug.a[datetmio.o]
ld: Unsatisfied symbol "RWBasicUString::Counter::length() const" in file .../SourcePro/SourcePro3
2/Ed8/lib/liboci62-_RogueWaveStdLib_NoThrLib_Static_Debug.a[rwocitypes.o]
and so on

This Makefile is linked with
-L$(ORBIX_HOME)/lib -lorbixmt -lpthread\
$(ROGUE_HOME)/lib/rwoci_RogueWaveStdLib_NoThrLib_Static_Debug.o \
-L$(ROGUE_HOME)/lib \
-ltls79-_RogueWaveStdLib_NoThrLib_Static_Debug \
-lstd41-_RogueWaveStdLib_NoThrLib_Static_Debug \
-loci62-_RogueWaveStdLib_NoThrLib_Static_Debug \
-ldbt62-_RogueWaveStdLib_NoThrLib_Static_Debug \



Have you come across these errors earlier?
Dennis Handly
Acclaimed Contributor

Re: ld: Unsatisfied symbol

>Reg Orbix warnings
/opt/Orbix/lib/liborbixmt.sl is a soft link pointing to ./liborbixmt.3.3.aCC.1. I changed the soft link to .so file but still the warnings remain the same

That wasn't the immediate issue. The issue is that liborbixmt.sl is broken and not usable on IPF because it is compiled with -AP. Where did you get it? Can you get a -AA compiled version??
http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,5520,00.html

>I tried using all the SourcePro libraries and I still get the same errors.

You are using archive libs. They may have to be ordered. If you can use shared libs, you should. If you don't want to worry about ordering (since you still may have the missing functions) you could just link with -Wl,+n. You may also want to use -Wf,-o so you can see the mangled names. That way you can use nm to search your libs to see which one has the missing symbol.

Also your makefile has your libs in the wrong order.
You should have your objects, then the SourcePro libs, then put -lorbixmt -lpthread at the end.

I'm not sure what ...NoThrLib_Static_Debug.o is for?