Re: runtime unresolved symbol (176 Views)
Reply
Occasional Visitor
nsx8888
Posts: 4
Registered: ‎09-14-2006
Message 1 of 8 (176 Views)

runtime unresolved symbol

I had a program that compiled and linked without problem. But at Run time the program died and we see the following message:

/usr/lib/dld.sl: Unresolved symbol: __nw__FUlP10os_segmentP5_Pvts
(code) from
/project/software2/Mace/EPG/tester/mace/lib/hp-ux/libMaceDB.sl

I used aCC and have searched all places in our code and did not see the above sybol anywhere.

I would appreciated if you may help me to identify the possible cause for the unresolved
symbol.

Other info:
:tsg8% uname -a
HP-UX tsg8 B.11.11 U 9000/785 2008799228 unlimited-user license

Honored Contributor
Sameer_Nirmal
Posts: 2,108
Registered: ‎02-21-2004
Message 2 of 8 (176 Views)

Re: runtime unresolved symbol

The symbol is used in shared library "libMaceDB.sl" which seems to be a part of Mace software. There might a header file of this software where the symbol is defined which should be included in your code.
Acclaimed Contributor
Dennis Handly
Posts: 25,067
Registered: ‎03-06-2006
Message 3 of 8 (176 Views)

Re: runtime unresolved symbol

I assume you know about c++filt and are looking for this symbol:
operator new(unsigned long, os_segment*, _Pvts*)
(Where you will see size_t instead of unsigned long.)

Normally I would assume this symbol would be defined in libMaceDB.sl, unless it is documented that you have to provide it.
Occasional Visitor
nsx8888
Posts: 4
Registered: ‎09-14-2006
Message 4 of 8 (176 Views)

Re: runtime unresolved symbol


Thanks for the info. I checked the code and the operator new was defined in the vendor software's header file (can not be changed):

extern void * operator new (size_t _OS_DBALLOC_PARMS, os_database*, os_typespec*
);
extern void * operator new (size_t _OS_DBALLOC_PARMS, os_object_cluster*, os_typ
espec*);

And it was used in the following way(our code):

_dbAttributes = new(os_segment::of(_users), DB_AttributeList::get_os_typespec())

the header file was included and compiled ok ...

What might be the possible cause for the executable to complain the unresolved symbol?

What should I do to fix it?

Appriciate any help .....
Acclaimed Contributor
Dennis Handly
Posts: 25,067
Registered: ‎03-06-2006
Message 5 of 8 (176 Views)

Re: runtime unresolved symbol

[ Edited ]

>the operator new was defined in the vendor software's header file

(This is declared not defined.)

>What might be the possible cause for the executable to complain the unresolved symbol? What should I do to fix it?

Either they forgot to export it from their shared lib or they didn't implement the function. I assume there is documentation that tells you exactly how to call it? Are you able to ask the vendor about this unsat?

You may want to check their lib to see if there are any functions "close" to the one you want:

odump -sym -slexport .../libMaceDB.sl | grep '__nw__.*os_segment.*_Pvts'

Occasional Visitor
nsx8888
Posts: 4
Registered: ‎09-14-2006
Message 6 of 8 (176 Views)

Re: runtime unresolved symbol

It appears that __nw__FUlP10os_segmentP5_Pvts is comming from vendor software and the vendor has declined to support this as it is an very old version.

I am trying to use debuger to get more clue, but the debuger "adb" stoped as it tries to access persistent memory within vendor software. I have learned how to pass that point in dbx and gdb; but was not successful when I try to use :z-s in adb.

What would the corrrrect way to pass/ignore the seg violation in adb?

Thanks a lot for advice and help.
Acclaimed Contributor
Dennis Handly
Posts: 25,067
Registered: ‎03-06-2006
Message 7 of 8 (176 Views)

Re: runtime unresolved symbol

>What would the corrrrect way to pass/ignore the seg violation in adb?

Why would you ever want to use adb when you can download gdb for free?
http://www.hp.com/go/wdb
Occasional Visitor
nsx8888
Posts: 4
Registered: ‎09-14-2006
Message 8 of 8 (176 Views)

Re: runtime unresolved symbol

For some reason the program was compiled with aCC and I got the coredump when I use gdb.

using adb at least let me get somewhere.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.