Operating System - Linux
1757091 Members
2141 Online
108858 Solutions
New Discussion юеВ

Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

 
SOLVED
Go to solution
Bijaya
Occasional Advisor

Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

Hi,

I successfully build all the libraries and exe in 64 bit HP UX. But when I run the exe, I get error as mentioed below...

/usr/lib/hpux64/dld.so: Unsatisfied code symbol '_ZN6vectorIbE10insert_auxE16os_bool_iteratorb' in load module '/user/users20/mchoudar/dev/742HPUX/TransServer/mtm/bin/libmtpdbutil.so'.
Killed

COuld you please help what I need to do ?

Regards,
Bijaya
10 REPLIES 10
Venkatesh BL
Honored Contributor

Re: Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

Looks like you are having a incompatible library. Do you have the right version of libraries?

Try google with "Unsatisfied code symbol" for more clues.
Dennis Handly
Acclaimed Contributor

Re: Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

>dld.so: Unsatisfied code symbol _ZN6vectorIbE10insert_auxE16os_bool_iteratorb' in libmtpdbutil.so

Is libmtpdbutil.so your shlib?
What compiler are you using to build?

Using c++filt shows this is missing:
vector::insert_aux(os_bool_iterator,bool)

This is NOT aC++ -AA code. The os_bool_iterator might come from ObjectSpace.

In any case, you need to figure out where it is being used and where is it suppose to be defined. You can scan binaries with:
$ nm -pxAN *.so *.o *.a | fgrep _ZN6vectorIbE10insert_auxE16os_bool_iteratorb


>Venkatesh: Try google with "Unsatisfied code symbol" for more clues.

What were you thinking of looking for? That symbol or how to go to unsat symbol triage school?
Bijaya
Occasional Advisor

Re: Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

>dld.so: Unsatisfied code symbol _ZN6vectorIbE10insert_auxE16os_bool_iteratorb' in libmtpdbutil.so

>Is libmtpdbutil.so your shlib?

Yes, this is my shlib.
>What compiler are you using to build?

aCC version info: aCC: HP aC++/ANSI C B3910B A.06.10 [Mar 22 2006]

>Using c++filt shows this is missing:
vector::insert_aux(os_bool_iterator,bool)

>This is NOT aC++ -AA code. The os_bool_iterator might come from ObjectSpace.

Yes, this is not an aC++- AA code, rather I am compiling using ├в AP option. I tried to compile using ├в AA option, but got huge list of errors.

>In any case, you need to figure out where it is being used and where is it suppose to be defined. You can scan binaries with:
$ nm -pxAN *.so *.o *.a | fgrep _ZN6vectorIbE10insert_auxE16os_bool_iteratorb

0x0000000000000000 U libmtmscheduler.so:_ZN6vectorIbE10insert_auxE16os_bool_iteratorb
0x0000000000000000 U libmtpcarloc.so:_ZN6vectorIbE10insert_auxE16os_bool_iteratorb
0x0000000000000000 U libmtpdbutil.so:_ZN6vectorIbE10insert_auxE16os_bool_iteratorb
0x0000000000000000 U libmtpdsa.so:_ZN6vectorIbE10insert_auxE16os_bool_iteratorb
0x0000000000000000 U libmtpdsaresrceval.so:_ZN6vectorIbE10insert_auxE16os_bool_iteratorb
0x0000000000000000 U libmtporder.so:_ZN6vectorIbE10insert_auxE16os_bool_iteratorb
0x0000000000000000 U libmtprates.so:_ZN6vectorIbE10insert_auxE16os_bool_iteratorb
0x0000000000000000 U libmtputil.so:_ZN6vectorIbE10insert_auxE16os_bool_iteratorb


Is it some something needs to be done wrt template options.

I checked there are two declarations of the same function insert_aux in one header file
1) void insert_aux ( T* pos, const T& value ); - declared inside os_vector class.
2) void insert_aux( iterator position, bool value ); - declared in template class as mentioned below.

template<>
class OS_PUBLIC_STD os_vector OS_BOOL_ARG

>Venkatesh: Try google with "Unsatisfied code symbol" for more clues.

>What were you thinking of looking for? That symbol or how to go to unsat symbol triage school?
Dennis Handly
Acclaimed Contributor

Re: Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

>I tried to compile using -AA option, but got huge list of errors.

It would probably better to attack these rather than go with some obsolete STL or obsolete -AP option. Have you see this URL:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=eb08b3f1eee02110b3f1eee02110275d6e10RCRD

So unsat triage/detective school starts here: :-)

libmtmscheduler.so:_ZN6vectorIbE10insert_auxE16os_bool_iteratorb

So, no definitions. Now use nm -pxAN on the objects and find the smallest one that has it.

Take that source and recompile with adding -E -.i and attach that .i file.

>Is it some something needs to be done wrt template options.

Possibly but there aren't that many on IPF. There is only the color black. :-)

>I checked there are two declarations of the same function insert_aux
>1) void insert_aux(T*, const T&);

This can't be it.

>2) void insert_aux(iterator, bool); - declared in template class as mentioned below.

This is it.

template<>
class OS_PUBLIC_STD os_vector OS_BOOL_ARG

Where is the rest of this?
It would probably helpful to just attach that source file.
Bijaya
Occasional Advisor

Re: Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

I tried $ nm -pxAN *.o | fgrep _ZN6vectorIbE10insert_auxE16os_bool_iteratorb

Didn't find any data

However, when I tried $ nm -pxAN *.o | fgrep insert_aux, I got result as mentioed below

0x0000000000000000 T ./src/vector.o:_ZN6vectorIb9allocatorIbEE10insert_auxE16os_bool_iteratorb

I have a doubt whether there is any definition exactly matching

vector::insert_aux(os_bool_iterator,bool)


There are two declarations for insert_aux
1) void insert_aux ( T* pos, const T& value ); - declared inside os_vector class.
2) void insert_aux( iterator position, bool value ); - declared in template class as mentioned below.

template<>
class OS_PUBLIC_STD os_vector OS_BOOL_ARG

according to point no.2 above, it would be like os_vector::insert_aux(os_bool_iterator,bool)
instead of vector::insert_aux(os_bool_iterator,bool).

I am trying to compile the source file with -E -.i, getting some error now, will fix it and let you know.
Dennis Handly
Acclaimed Contributor
Solution

Re: Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

Hmm, if it's in the shlib it must be in some object file.

>I got result as mentioned below
_ZN6vectorIb9allocatorIbEE10insert_auxE16os_bool_iteratorb

This is vector. I suppose that could occur depending on OS_BOOL_ARG.
Or you are using -AP headers.

>I have a doubt whether there is any definition exactly matching
vector::insert_aux(os_bool_iterator,bool)

If there is an unsat, there must be a definition, that's how templates work. Compiling a source with -E -.i, that has that unsat will show you exactly where it is.

>There are two declarations for insert_aux declared inside os_vector class.
>it would be like os_vector instead of vector

Oops, that doesn't match vector, unless macros are hiding it, or you are mixing with HP's -AP headers.

Taking a look at the .h file shows a possible problem. You didn't configure your STL correctly:
#ifdef OS_NO_AUTO_INSTANTIATE
# include

You need to define OS_NO_AUTO_INSTANTIATE.
Note: The name is incorrect. It really should be:
#ifndef OS_broken_cfront_style_templates

There is a "gray" template option to kludge this but it is better to be Standard and use the proper define.
Bijaya
Occasional Advisor

Re: Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

I just verified compilation log and found below mentioned warnings...I verified, the template declarion is there in ospace/osstd/vector.h and the definition is there in ospace/osstd/src/vector.cpp

ld: (Warning) Unsatisfied symbol "vector::insert(os_bool_iterator,unsigned long,bool)" in file /user/users20/mchoudar/dev/742HPUX/Trans
Server/mtm/bin/libmtpdsa.so
ld: (Warning) Unsatisfied symbol "vector::insert_aux(os_bool_iterator,bool)" in file /user/users20/mchoudar/dev/742HPUX/TransServer/mtm
/bin/libmtpdsa.so

I am compiling as mentioed below..aCC -c -DANSI_C +inst_implicit_include +inst_v +Z -ext -AP +DD64 -Wl,-ashared_archive -g -o obj/ltlcostprovider.o -DOS_NEW_CHECK -DMANU_HPUX -DOS_STL_ASSERT -DOS_MANU -DOS_MULTI_THREADED -DOS_NO_ALLOCATORS -DOS_ENABLE_MEMBER_TEMPLATE_FEATURES -DOS_HPUX_PTHREADS -DOS_HPUX_11_00 -Donce=. -D_HPUX_SOURCE -DOS_NO_WSTRING -D_REENTRANT-D_THREAD_SAFE -DOS_PTHREADS +Olit=none -llib1 -l lib2 etc.

As mentioned above I am using +inst_implicit_include, is it supported ?
Or the way I am using is incorrect, I should use +inst_include_suffixes also.
Dennis Handly
Acclaimed Contributor

Re: Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

First of all, why are you using ObjectSpace's STL and not -AA or -AP's?

>the definition is there in src/vector.cpp

This implies you need to compile this file too.

>+inst_implicit_include +inst_v

You should NOT be using the obsolete option +inst_implicit_include. As I said, use the appropriate define OS_NO_AUTO_INSTANTIATE.
+inst_v does nothing.

> -D_REENTRANT-D_THREAD_SAFE

Was there a space between these two?

>+Olit=none

Why are you using this?

>As mentioned above I am using +inst_implicit_include, is it supported?

There is no reason to use it since your STL can be configured to avoid it.
Bijaya
Occasional Advisor

Re: Getting error "Unsatisfied symbol" while running exe in HP UX B.11.23

Thank you Dennis . By defining the macro correctly, it removes the linker problem.