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 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
<== Date ==> <== Thread ==>

Subject: Re: EPICS build system DESTDIR support
From: Mark Rivers <rivers@cars.uchicago.edu>
To: Andrew Johnson <anj@aps.anl.gov>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Sat, 22 Jul 2017 03:08:40 +0000
What Andrew suggests is what I do with areaDetector in our installations. By building statically I can copy the application to target machines without needing to worry about shareable libraries at all. I do this on both Linux and Windows.

This also lets me distribute pre-built packages to others much more simply than if they needed to include lots of shareable libraries.

Mark


Sent from my iPhone

> On Jul 21, 2017, at 3:54 PM, Andrew Johnson <anj@aps.anl.gov> wrote:
> 
> Hi Benjamin,
> 
>> On 07/18/2017 11:25 AM, Benjamin Franksen wrote:
>> One advantage of doing it this way is that we never rely on distributing
>> build results for support modules: only the final application that
>> builds the IOCs distributes stuff (to the host that runs the IOC). This
>> means that dependencies (except for system libraries) are fully handled
>> on the build machine.
> 
> It occurred to me that for production IOCs maybe we shouldn't be
> building shared libraries at all?
> 
> Have you compared your approach with just setting STATIC_BUILD=YES in
> the IOC application's CONFIG_SITE file? This avoids the need for IOC
> executables to be linked to any non-system shared libraries at all, so
> you could avoid having to copy them all to your production systems (at
> the expense of a larger IOC executable obviously). Since you have
> IOC-specific copies of each lib*.so file the OS won't be able to share
> them anyway, so you aren't gaining any advantage in exchange for the
> overhead of using shared libraries in the first place.
> 
> You can set STATIC_BUILD=YES on Linux without the SHARED_LIBRARIES=NO
> that Windows needs and you should get the same result, turning off the
> build of shared libraries in your Base CONFIG_SITE file would slightly
> speed up all module builds. Actually if you set SHARED_LIBRARIES=NO you
> don't have to set STATIC_BUILD because the linker will automatically use
> the lib*.a files anyway.
> 
> The final program link stage for a static build does take longer than
> when linking against shared libraries, but you might be giving the
> linker a chance to do more whole-program optimization than it can across
> shared-library interfaces (I don't know if we actually enable that
> optimization though, and of course more optimization means more chances
> for optimizer bugs and/or for it to optimize away things that you don't
> want it to because you don't know you're relying on undefined behaviour).
> 
> - Andrew
> 
> -- 
> Arguing for surveillance because you have nothing to hide is no
> different than making the claim, "I don't care about freedom of
> speech because I have nothing to say." -- Edward Snowdon

Replies:
RE: EPICS build system DESTDIR support Williams Jr., Ernest L.
References:
Re: EPICS build system DESTDIR support Benjamin Franksen
Re: EPICS build system DESTDIR support Andrew Johnson

Navigate by Date:
Prev: Re: EPICS build system DESTDIR support Andrew Johnson
Next: RE: EPICS build system DESTDIR support Williams Jr., Ernest L.
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
Navigate by Thread:
Prev: Re: EPICS build system DESTDIR support Andrew Johnson
Next: RE: EPICS build system DESTDIR support Williams Jr., Ernest L.
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
ANJ, 22 Jul 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·