SUMMARY: dynamic linker problems

From: Reichert, Alan (aareichert@tasc.com)
Date: Tue Jun 01 1999 - 12:36:42 CDT


Thanks for the inputs on this problem. This fellow did find the problem and
correct it,
as you can read below...

-----Original Message-----
From: Guppy, Brian
Sent: Tuesday, June 01, 1999 11:40 AM
To: Reichert, Alan
Subject: FW: dynamic linker problems

I fixed the problem - the binary wasn't explicitly getting linked with the
Motif library, so I just had to add '-lXm' to the linker options. I still
have a couple of questions, though - why, if libXm wasn't showing up in the
output of 'dump -Lv', was it being listed in the output of 'ldd' on host1?
And why didn't the compile fail at the link stage?

-Brian

> I am experiencing some interesting dynamic linker problems on
> two Solaris machines, one of which (host1) is running the
> original version of Solaris 2.5.1 and the other of which
> (host2) is running Solaris 2.5.1 Hardware 11/97. I compiled
> binary1 on host1 and it runs fine, but when I try to run the
> same binary on host2, ld.so gives us a fatal error, saying
> that the symbol xmManagerClassRec is not found.
> xmManagerClassRec is in libXm.so, the Motif library. Running
> 'ldd' on binary1 on host1 shows, as expected, that libXm.so
> is in the dependency list and is successfully located in
> /usr/dt/lib. Running 'ldd' on binary1 on host2, however,
> does not list libXm.so anywhere in the dependency list. It's
> not a 'not found' error; all the library dependencies that
> get listed are successfully resolved, but libXm just doesn't
> show up in the list. This seems awfully strange, since I
> thought all the dynamic library dependency information was
> contained within the binary. Any ideas why this might be happening?

Thanks to dana@dtn.com, Michael F Gordon, Anderson McCammont, Casper Dik,
Rahul Roy, and Ronald Loftin.

Suggestions included checking the LD_LIBRARY_PATH variable (which we did
prior
to sending this to the list), running "dump -Lv <binary_name>", checking
MOTIF library patch levels, check symbols using nm, and checking that the
binary
was linked with -lXm explicitly. This last one seemed to be the kicker.

Regards,

- Alan



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:20 CDT