Solved

'unresolvable symbol' in shared lib on IRIX6.2: __record_needed_destruction

Posted on 1997-07-02
5
434 Views
Last Modified: 2013-12-26
When attempting to run a binary which was dynamically linked to a shared library (.so file), rld gives me the following error:

"rld: Fatal Error: attempted access to unresolvable symbol in libava2.so: __record_needed_destruction"

where libava2.so is a (quite simple) library that I created.  How do I fix this?

Hint: it may have something to do w/ old 32-bit vs. new 32-bit and LD_LIBRARY_PATH vs. LD_LIBRARYN32_PATH environment variables.
0
Comment
Question by:kfcox
  • 2
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
jos010697 earned 300 total points
ID: 1293835
Nope, your lib paths are fine, because the runtime linker
did find the shared object; it just complained about the
symbol itself (see error message). Did you tell the
the linker (when you created the .so file) to export the
symbols you want to access at runtime? (like _record_needed_
descturction).

It depends a bit on the Un*x box your'e running on; on my
SP/2 AIX thingy, I pass the following flags to the linker:

   -bM:SRE -bnoentry -berok -bEexport.exp

where file export.exp contains the names of the symbols
to be exported. On a Linux box, the flags look like this:

   -shared -fPIC

check your manuals for 'ld' ...

kind regards,

Jos aka jos@and.nl
0
 
LVL 4

Expert Comment

by:jos010697
ID: 1293836
ps. The Linux flags are incomplete; the complete line of
flags looks like this:

-export-dynamic -shared -fPIC

kind regards,

Jos aka jos@and.nl
0
 

Author Comment

by:kfcox
ID: 1293837
this symbol is in
        /usr/lib/libebtctudl.so
Possible reasons:
        1. not specified in library list for the linker
        2. lib cannot be accessed/found at runtime (see your
            LD_LIBRARY*_PATH, see also linker options:
                -force_load, -delay_load, -default_delay_load )

To find out which shared libs will be used at runtime, try:
        setenv _RLD_PATH /usr/lib/rld.debug
        setenv _RLD_ARGS "-v -log any_file"
        your_executable

Good Luck, Achim

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1293838
What is the /usr/lib/libebtctudl.so library and what package is it a part of?  It's not on my system, and I can't find any mention of it anywhere!!
0
 

Author Comment

by:kfcox
ID: 1293839
/usr/lib/libebtctudl.so is new in IRIX 6.x, contact SGI to ask
for its purpose. Anyway, it should be founf on your distribution
CDs (see Find/Search functionality in Toolchest->SoftwareManager)

To solve your problem try to find out which source or library
references routines in /usr/lib/libebtctudl.so .
Use the -v and/or -m option of the the linker (take care if you
use cc or CC for linking).
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now