EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Fwd: EDM X Error on Linux
From: Lucas Russo <[email protected]>
To: [email protected]
Date: Tue, 28 Aug 2012 13:58:45 -0300
Hello everyone once again,

I just wanted to post the reply from Jason about
his explanation to the --no-as-needed linker flag

I think it can be helpful to others as well!

Best Regards,

Lucas

---------- 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]>


Hi Lucas,


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


References:
Re: EDM X Error on Linux Jason Abernathy
Re: EDM X Error on Linux Lucas Russo
Re: EDM X Error on Linux Lucas Russo

Navigate by Date:
Prev: Re: aiRecord conversion Bruno Seiva Martins
Next: Re: aiRecord conversion Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EDM X Error on Linux Lucas Russo
Next: aiRecord conversion Bruno Seiva Martins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·