Operating System - HP-UX
1753534 Members
5325 Online
108795 Solutions
New Discussion юеВ

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

 
SOLVED
Go to solution
jason_lee
Honored Contributor

aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

Hi,
I'm trying to port some CPP source codes from HP-UX 11i to 11.31 IA.

I'm using:
1) gmake 3.81
2) aC++ for 11.31 with latest patch

I'm getting the following:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ld: (Warning) Unsatisfied symbol "ios::ios(streambuf*)(base)" in file /usr/lib/hpux32/librwtool.so

ld: (Warning) Unsatisfied symbol "istream::get(char*,int,char)" in file /usr/lib/hpux32/librwtool.so

ld: (Warning) Unsatisfied symbol "streambuf::seekpos(long,int)" in file /usr/lib/hpux32/librwtool.so

ld: (Warning) Unsatisfied symbol "ios::floatfield" in file /usr/lib/hpux32/librwtool.s.....................
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Any idea? Will assign points for useful idea.
jason
9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

You should NOT be using -lrwtool for IPF, since the default is almost -AA, you should use -lrwtool_v2 instead.
jason_lee
Honored Contributor

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

Dennis,
I'm new to compiling in CPP, can you explain how can I do what you suggested?

>You should NOT be using -lrwtool for IPF, >since the default is almost -AA, you should >use -lrwtool_v2 instead.

1) What is the meaning of "almost -AA?
2) How can I use -lrwtool_v2, where should I change before running gmake?

Pls advise.
J.
jason_lee
Honored Contributor

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

Update:

After changing the lrwtool to lrwtool_v2, I don't get the "Unsatisified symbol..." warnings anymore.

Now, when I run the program, I got core dump & this message on the screen:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aCC runtime: Unexpected exception of type "__rw::__rw_thread_error".
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Any idea?
jason_lee
Honored Contributor

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

Here's the portion "top half" of my makefile:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VPATH=../src
CPP=/opt/aCC/bin/aCC
ORACLE_SID=openview
ORACLE_HOME=/app/oracle10g/product/10.2.0.4/DB1
ORAINC=-I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I$(ORACLE_HOME)/plsql/public -I$(ORACLE_HOME)/network/public
CPPFLAGS = -D_REENTRANT -DRWSTD_MULTI_THREAD -D_THREAD_SAFE -D_LARGEFILE64_SOURCE -I../src $(ORAINC)
LINKFLAGS=-L$(ORACLE_HOME)/lib32 -L$(ORACLE_HOME)/rdbms/lib32
ORALINK = -locci -lclntsh `cat $(ORACLE_HOME)/lib32/sysliblist`
LINKLIBS = -lrwtool_v2 $(ORALINK)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The only change I've made = LINKLIBS = -lrwtool_v2 (from lrwtool).

Since I'm on HPUX IA 11.31, what else I need to change?

Pls advise.
Jason.
jason_lee
Honored Contributor

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

When running the compiled file:
#./progd
aCC runtime: Unexpected exception of type "__rw::__rw_thread_error".
Abort(coredump)

#strings core
./progd
x32/libstd_v2.so.1
04:Unable to find library '/usr/lib/nls/loc/hpux32/locales.3/C'.

# ll /usr/lib/nls/loc/hpux32/locales.3/C
/usr/lib/nls/loc/hpux32/locales.3/C not found

# what /usr/lib/hpux32/libstd_v2.so.1
/usr/lib/hpux32/libstd_v2.so.1:
HP aC++ for Integrity Servers B3910B A.06.20 [May 13 2008] C++ Standard Library (RogueWave Version 2.02.01)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Let me know if any other info required.
Dennis Handly
Acclaimed Contributor
Solution

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

>1) What is the meaning of "almost" -AA?

Not quite -AA. Read the man page. It is better if you explicitly add -AA, then I don't have to explain. :-)

>CPPFLAGS = -D_REENTRANT -DRWSTD_MULTI_THREAD -D_THREAD_SAFE

These are the -AP values. Remove all of these and replace by -mt. That works for both -AA and -AP.

>aCC runtime: Unexpected exception of type "__rw::__rw_thread_error".

Hum, typically this would tell you that you have illegally compiled your threaded source without the -mt option but it doesn't appear if there is a throw spec:
aCC runtime: Use of "-mt" must be consistent during both compilation and linking.
jason_lee
Honored Contributor

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

Dennis,
Thanks for your reply. I'm waiting whole day for you :-). Well I understand what you wanted me to change, except the following:

>Hum, typically... but it doesn't appear if >there is a throw spec:
>aCC runtime: Use of "-mt" must be >consistent during both compilation and >linking.

What's the meaning of "throw spec"?
I wil change the makefile for removing those unwanted & replacing it with -mt.
Where can I add this "throw spec"?

Pls advise.
Jason.
jason_lee
Honored Contributor

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

thanks to dennis
Dennis Handly
Acclaimed Contributor

Re: aCC compilation on HP-UX 11.31: ld: (Warning) Unsatisfied symbol

>What's the meaning of "throw spec"?

The throw spec is short for exception specification on a function:
void foo() throw() { }

>I will change the makefile for removing those unwanted & replacing it with -mt. Where can I add this "throw spec"?

All you need is to change your makefile. The throw spec is in the aC++ runtime lib and can't be changed. The throw spec is why you don't get a nicer message, saying to use -mt.