This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: the way ld evaluates and chooses libraries


Hi Nick,

Thanks for your answer.

On 10/13/06, Nick Clifton <nickc@redhat.com> wrote:
Hi Jeremy,

It sounds as though the problem you were having was because the
.so.9.0 file was linking with libstdc++.so.5 and that this library was
also being used to resolve all the other undefined (c++) symbols used in
other, earlier object files and libraries.  So what you might be able to
do is to place the libocci.so.9.0 library as the last item on the
linker's command line and place libstdc++.so.6 before it.  That way
libstdc++.so.6 will be used to resolve all the other c++ symbols for all
the other object files, but because libocci.so.9.0 comes after it on the
command line, it will not be used to resolve symbols in that library.

That explains why I don't get errors anymore when I add -lstdc++ at the beginning of the line. The last error that comes from oracle lib just means in the end that this version of the lib is screwed up ...

To make it short, when I try to link it fails with lot of errors. When
I add -lstdc++ et the beginning of the command line, I get only one
error with the oracle lib (which means all the other symbols were
correctly resolved)

# ldd /opt/oracle/product/9.2.0/lib/libocci.so.9.0
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x00802000)

# gcc296 -lstdc++ -locci
/opt/oracle/product/9.2.0/lib//libocci.so: undefined reference to
`__ctype_toupper'

Well, to fix it badly, I just copied a running libocci from another
server straight on this one, and it worked (even if this is probably
not the better way to do it).

Thanks a lot for taking time to explain this !

Jeremy
--
Linux Registered User #317862
Linux From Scratch Registered User #16571
Please do not send me .doc, .xls, .ppt, as I will *NOT* read them.
Please send me only open formats, as OpenDocument or pdf.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]