EPICS Home

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  <20172018  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  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS build system DESTDIR support
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Fri, 21 Jul 2017 15:54:08 -0500
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 Mark Rivers
References:
Re: EPICS build system DESTDIR support Benjamin Franksen

Navigate by Date:
Prev: softGlueZynq R2-0, iocZed R2-0 releases Mooney, Tim M.
Next: Re: EPICS build system DESTDIR support 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  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS build system DESTDIR support Benjamin Franksen
Next: Re: EPICS build system DESTDIR support 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  <20172018  2019  2020  2021  2022  2023  2024