Hi,
We also do this a lot as SLAC as well.
Building statically, simplifies our IOC deployment.
Cheers,
Ernest
________________________________________
From: [email protected] [[email protected]] on behalf of Mark Rivers [[email protected]]
Sent: Friday, July 21, 2017 8:08 PM
To: Andrew Johnson
Cc: [email protected]
Subject: Re: EPICS build system DESTDIR support
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 <[email protected]> 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
- References:
- Re: EPICS build system DESTDIR support Benjamin Franksen
- Re: EPICS build system DESTDIR support Andrew Johnson
- Re: EPICS build system DESTDIR support Mark Rivers
- Navigate by Date:
- Prev:
Re: EPICS build system DESTDIR support Mark Rivers
- Next:
Re: Andor SDK3 issue - AT_WaitBuffer fails Brett Graham
- 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>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: EPICS build system DESTDIR support Mark Rivers
- Next:
areaDetector developers meeting in Aix on Provence 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>
2018
2019
2020
2021
2022
2023
2024
|