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  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Problem building aravisGigE on Centos 7
From: Ralph Lange <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Mon, 2 Jul 2018 09:12:58 +0200
A while ago RedHat changed the default behavior of DSO linking; for Enterprise Linux this change hit users when moving from RHEL6 to RHEL7.

Bottom line:
Before, applications were able to just use symbols of indirect dependencies, relying on their direct dependencies to pull them in.
Now, an application has to list all its dependencies explicitly on the linker command line.

This gets tricky with libraries that provide templates in their API. Templates are generating source code, so an application might end up actually calling an indirect dependency, i.e. the indirect dependency may become direct without the application being aware.

Confused? http://www.kaizou.org/2015/01/linux-libraries/ has a good overview of linking and dependency resolution.

Cheers,
~Ralph


On Sat, Jun 30, 2018 at 11:52 PM Michael Davidsaver <[email protected]> wrote:
On 06/30/2018 06:41 AM, Mark Rivers wrote:
> Hi Michael,
>
> Thanks, adding the second line below to the Makefile fixed it.
>
> PROD_SYS_LIBS += giomm-2.4
> PROD_SYS_LIBS += gio-2.0 gobject-2.0 gthread-2.0 glib-2.0
>
> I was puzzled why it worked previously when the Makefile contained only the first line, i.e. giomm=2.4.
>
> I think I have figured it out.  If I add this line to the Makefile it builds fine without the second line above:
>
> STATIC_BUILD=NO
>
> If it is building dynamically then libgiomm-2.4.so has the information it needs to know what other libraries are required.  But if I build statically then I need to specify the other libraries.  When this worked previously for me I must have been building dynamically.  Does this make sense?

Yes.  Static libraries (.a files) don't contain the dependency information found in shared object (.so).
So when linking STATIC_BUILD=NO, only the direct dependencies need to be listed (it doesn't hurt to list all).
With STATIC_BUILD=YES, all dependencies must be listed, and in a specific order (direct first).

References:
Problem building aravisGigE on Centos 7 Mark Rivers
Re: Problem building aravisGigE on Centos 7 Michael Davidsaver
RE: Problem building aravisGigE on Centos 7 Mark Rivers
Re: Problem building aravisGigE on Centos 7 Michael Davidsaver

Navigate by Date:
Prev: Re: Problem building aravisGigE on Centos 7 Michael Davidsaver
Next: areaDetector R3-3-1 released Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Problem building aravisGigE on Centos 7 Michael Davidsaver
Next: areaDetector R3-3-1 released Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 02 Jul 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·