Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ld.so.1 problem - fatal: relocation error - "referenced symbol not found"

807575May 13 2005 — edited May 16 2005
Hi, I've been trying to compile and run my application non Solaris using CC (detils below) but haven't got luck with running the application because of a linker error :
--------------------------------------------------------------------------------------------
ld.so.1: java: fatal: relocation error: file ./libtest.so: symbol __1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___J__nullref_: referenced symbol not found
--------------------------------------------------------------------------------------------
Here's what I'm trying to do :
I'm compieing one library to include another shared library whcih uses the "string" class (STL). The compilation of both the libraries proceeds perfectly fine. However, when i preload this library with LD_PRELOAD and run a JAVA application (which will have calls to some function in the preloaded library), the get the above linker error.

Here's what all I have tries to get thsi wroking : ( I understand that this error is due to a missing library that CC has not linked to and i've no idea what the library is!!!)
1.> # LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH
# export LD_LIBRARY_PATH - NO LUCK :-(
2.> linked to /opt/SUNWspro/lib/libCrun.so (found this from another forum on the net), but NO LUCK :-(
3.> export LD_DEBUG=bindings
export LD_DEBUG_OUTPUT=/home/log.txt (so that all sysmbols refered are logged!!!)
i did a grep on the log for the symbol but NO LUCK!!! :-(

Please can you help me with this? What is the library that is to be linked too, or is there something else?

Details About my system, compiler and compilation options :
1.> uname -a output : SunOS sh1sol9 5.9 Generic_117171-12 sun4u sparc SUNW,Sun-Fire-280R Solaris
2.> CC version : Sun WorkShop 6 update 2 C++ 5.3
3.> Compilation flags i've used to build the library :
FIRST LIBRARY : CC -G -xcode=pic32 -I../common/ -ldl ../common/logger.cpp helper_functions.cpp BCPEntries.cpp BCP_class.cpp -o libBCP.so

SECOND LIBRARY : CC -G -xcode=pic32 -I../common/ test_BCP_construct.cpp -lBCP -L. -o libtest.so

Please help me out of this,
Any and every help (or even a hint to it) will be appreciated!!!
Thanks in advance,

Madhur Kumar Tanwani
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 13 2005
Added on May 13 2005
1 comment
1,533 views