Operating System - HP-UX
1825775 Members
2074 Online
109687 Solutions
New Discussion

Shared Libraries: Unresolved Symbol from libCsup.1

 
SOLVED
Go to solution
Jim Leishman
New Member

Shared Libraries: Unresolved Symbol from libCsup.1

Hi Everybody!

I believe I'm having trouble with shared libraries on different UNIX versions. Here is my situation. We have a development machine based on UNIX 10.20 that runs CATIA on it. We have several in house programs that are linked with CATIA functions which run fine on 10.20. However, our productionmachine is targeted for UNIX 11.11. Some of the executables generated on 10.2 run fine on 11.11 and others don't.

This is where I believe shared libraries are causing me problems. Programs only using FORTRAN and CATIA run both on 10.20 and 11.11. The command used to generate these executables on 10.20 is:

ld +s -E prog.o /opt/aCC/lib/crt.o /opt/aCC/lib/cpprt0.o \ /usr/catia/cfg/code/lib/libgeo.a -lc -lm -lf -ldld -lstream -lstd -lCsup -o prog

The programs that don't work involve C wrappers around the FORTRAN. The command to generate these executables is:

cc -W1,+n -o TEST1 TEST1.o prog.o /usr/catia/cfg/code/lib/libgeo.a /usr/lib/libcl.sl /usr/lib/libcma.sl /usr/lib/libc.sl

When these executables are run on 11.11 the following error is issued:

/usr/lib/libdld.sl: Unresolved symbol: __StaticCTorTable_Start (data) from /usr/lib/libCsup.1
/usr/lib/libdld.sl: Unresolved symbol: __StaticCTorTable_End (data) from /usr/lib/libCsup.1

I haven't worked much with shared libraries but I think the problem is with them. I've tried alot of different scenarios to get it to work (3 days worth) but no luck. I've checked environment variables e.g. SHLIB_PATH that are the same on both machines.

What am I missing? Any suggestions or thoughts on this would greatly be appreciated. Thanks in advance.

Jim
7 REPLIES 7
Shahul
Esteemed Contributor
Solution

Re: Shared Libraries: Unresolved Symbol from libCsup.1

Hi

This can be the problem of patches. Please find out the recent patches available for shared libraries and load with all suggested pre requisites. I hope this will solve ur problem

Best of luck

Shahul
Rainer von Bongartz
Honored Contributor

Re: Shared Libraries: Unresolved Symbol from libCsup.1

check with nm the entry points in your library libCsup.1

nm libCsup.1 | grep Table_Start

I get the following results:
__StaticCtorTable_Start|1073754880|static|data |$DATA$CDTORC1$

I found that only __StaticCtorTable is an entry point but not __StaticCTorTable as your ld complains
(watch out for the the capital T)

check this for your box first
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Stefan Farrelly
Honored Contributor

Re: Shared Libraries: Unresolved Symbol from libCsup.1


The executables you are generating on 10.20, why dont you compile them as static so all the library stuff you need is linked into the executable, then when you move them to 11i and run them they should work fine.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Denver Osborn
Honored Contributor

Re: Shared Libraries: Unresolved Symbol from libCsup.1

Jim,

If the OS is 11.11 here is the ac++ runtime libs patch that should be installed.

PHSS_22898

If the O/S is 11.0 install PHSS_22543

Hope this helps
-denver
Jim Leishman
New Member

Re: Shared Libraries: Unresolved Symbol from libCsup.1

Yeah, it's working!!! I want to thank everybody for their insights and suggestions.

shahul - You were right, I needed a patch. This got me going in the right direction.

Rainer - Your suggestion verified I was missing the indicated entry points.

Stefan - I tried your idea as a test case to see if I could get it going. However, I can't do that because I'm bounded by CATIA scripts that use shared libraries.

Denver - Thanks for identifying the correct patches, it worked like a charm. I hope I was clear in describing my problem over the phone. I called you back the next day but couldn't reach you, so I closed out the call (ticket?) using the automation process on the phone by leaving a message for you.

One thing about these type of problems, you pick up and find out alot of neat things along the way.
Magdi KAMAL
Respected Contributor

Re: Shared Libraries: Unresolved Symbol from libCsup.1

Hi Jim,

I had met this problem developping a client/ server application model to validate migration of DCE/RPC (XDR) on hp 11.0 and I was surprised that libraries names from hp-ux side has changed !!!

Better you include all libraries into your make file.
Once link edition is OK and no more "Unresolved symbols" are comming then try to remove library by library till you have the new subset you are looking for.

Good luck.
Jim Leishman
New Member

Re: Shared Libraries: Unresolved Symbol from libCsup.1

Maqdi,

I actually did that. I threw all the shared libraries (and the kitchen sink!) into my makefile and started to back them out one at a time. The problem was I needed a patch to update the libCsup.1 library. Thanks for your input.

Jim