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  2018  2019  2020  2021  <20222023  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  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: SHRLIB_VESION Variable
From: Andrew Johnson via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Mon, 29 Aug 2022 10:45:37 -0500
HI Abdalla,

On 8/28/22 2:20 AM, Abdalla Ahmad via Tech-talk wrote:
How much is it important to set the SHRLIB_VERSION when building support modules? I know it is set by default to the base version when building EPICS base but it seems it is optional when building any support modules. I did this test in our RPM setup, I had all support modules built using asyn 4.41 and I deployed an RPM for asyn 4.42, doing “yum install stream-device” failed because it explicitly asked for asyn 4.41 “libasyn.so.4.41”. I unset the variable in the base and removed it in the support modules, it did update asyn and installed any module that uses asyn, but I am wondering how much this would affect compatibility and dependencies between modules.
The importance depends on your tolerance for the IOC crashing with weird symptoms due to a mis-match between the caller and the library it's calling. Even though the compile-time Application Program Interface (API) of a particular support module version is often compatible with earlier versions, very few if any EPICS support module authors check that new releases of a module are 100% compatible with earlier ones at the Application Binary Interface (ABI) level; those differences tend to be larger and more important if the module is at least partially coded in C++, which is becoming more common. There are tools available from the Linux community for checking ABI compatibility between releases, but they aren't very widely used and can make maintenance significantly more complicated.

If an IOC dynamically links with a different version of a shared library than the version it was built with (e.g. your Asyn 4.41 vs. 4.42 described above) there is a possibility that the calls it makes into the library (i.e. using the modules ABI) will not be quite the same as the calls that it would have made with the other version, which can lead to the library doing something different and the possibility of a crash or introducing unexpected behavior.

We recommend setting SHRLIB_VERSION when building support module libraries so that IOCs that link with shared libraries will not attempt to use a library that is different than the version it was built with. Disabling that check may work with some libraries and version updates (and maybe even with some record types and device support settings) but not with others, so you are taking a risk with the operation of your control system by doing that.

HTH,

- Andrew
-- 
Complexity is free, it's Simplicity that takes work.

References:
SHRLIB_VESION Variable Abdalla Ahmad via Tech-talk

Navigate by Date:
Prev: Re: Eurotherm modbus support Wlodek, Jakub via Tech-talk
Next: Re: SHRLIB_VESION Variable Michael Davidsaver via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: SHRLIB_VESION Variable Abdalla Ahmad via Tech-talk
Next: Re: SHRLIB_VESION Variable Michael Davidsaver via Tech-talk
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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·