---------- Forwarded message ----------
From:
Jason Abernathy <[email protected]>
Date: Mon, Aug 27, 2012 at 4:59 PM
Subject: Re: EDM X Error on Linux
To: Lucas Russo <
[email protected]>
I managed to get EDM
working (or so it seems).
I noticed that the
EDM compiled with the makefile modification has six more
dynamic links, namely:
> ldd $EDM
libXtst.so.6 =>
/usr/lib/x86_64-linux-gnu/libXtst.so.6
(0x00007f174e552000)
libca.so.3.14 =>
/opt/epics/base/lib/linux-x86_64/libca.so.3.14
(0x00007f174dfb8000)
libCom.so.3.14 =>
/opt/epics/base/lib/linux-x86_64/libCom.so.3.14
(0x00007f174dd5f000)
libreadline.so.6 =>
/lib/x86_64-linux-gnu/libreadline.so.6
(0x00007f174d6fb000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1
(0x00007f174d4f2000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
(0x00007f174ba91000)
If I may ask, how
did you realize that the option --no-as-needed could solve the
problem?
Perhaps it was
noted that some important libraries weren't linked against? If
so, why didn't
they get
referenced in order to be included by the linker?
The problem was noticed after upgrading a development machine from
Ubuntu 11.04 to 11.10. It was debugged by executing the same linker
command, verbosely, on a pair of computers which differed only in
their Ubuntu version.
There was a change to implicit link behaviour in Ubuntu 11.10.
Shared libraries dependencies which don't share symbols with the
current target are now culled from the dynamic link table. This
behaviour isn't desired for programs which use pluggable libraries
(such as EDM).
Adding the "--no-as-needed" flag restores the behaviour to that of
earlier versions of Ubuntu (<= 11.04). More information about the
change can be found here:
http://wiki.debian.org/ToolChain/DSOLinking#Onlylinkwithneededlibraries
Cheers,
Jason