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: EPICS Application Package
From: "J. Lewis Muir" <[email protected]>
To: [email protected]
Cc: [email protected]
Date: Fri, 16 Nov 2018 15:12:55 -0600
On Fri, Nov 16, 2018 at 7:46 AM Benjamin Franksen
<[email protected]> wrote:
> We are using shared libraries for our soft IOCs and don't need package
> managers or containers. The trick is to make sure all the libraries are
> installed along with the application and to set the RPATH accordingly.
>
> Our setup is roughly as follows: in the place where IOC binaries are
> built, we specify
>
> LINKER_USE_RPATH=NO
> USR_LDFLAGS += '-Wl,-rpath,../../bin/$(T_A)'
>
> In addition we have a special SupportModulesApp directory that contains
> only a Makefile with the following content (stripped to show only the
> Linux stuff):
>
> TOP=..
> include $(TOP)/configure/CONFIG
>
> MODULE_PATHS = $(SHRLIB_SEARCH_DIRS)
> MODULE_LIBNAMES = $(notdir $(foreach dir,$(MODULE_PATHS),$(wildcard
> $(dir)/lib*.a)))
> MODULE_NAMES = $(MODULE_LIBNAMES:$(LIB_PREFIX)%.a=%)
>
> MODULES_Linux = $(foreach dir,$(SHRLIB_SEARCH_DIRS),$(wildcard
> $(dir)/lib*.so*))
> BIN_INSTALLS_Linux = $(MODULES_Linux)
>
> include $(TOP)/configure/RULES
>
>
> SupportModulesApp must be built after all otehr *App. It copies all the
> shared libraries from all support modules listed in configure/RELEASE
> and stores them in the local bin directory, so that the IOC binaries
> find them.
>
> We have been using this scheme for quite some time now. It requires *no*
> pre-installed libraries on the target host except the standard systenm
> libraries (libc, libm, etc).

When executing the IOC binary, though, this scheme requires the
working directory to be the directory containing the binary, right?
That's kind of fragile, but I guess if you just always start the IOC
in the same way, maybe it's OK.  (On Linux, I think "$ORIGIN" can be
used to reference the location of the binary, so you could potentially
make the RPATH relative to this thus eliminating the working directory
constraint.)

Also, if the working directory always has to be the directory
containing the binary, and all libraries are copied to that directory
as well, why not just make the RPATH be "." (dot)?

And then there's the issue of making the scheme portable.  I'm not
positive, but I think I read that on macOS with SIP enabled, you can't
use a relative RPATH.

Lewis

Replies:
Re: EPICS Application Package Michael Davidsaver via Tech-talk
References:
EPICS Application Package Vikram Bhagat via Tech-talk
Re: EPICS Application Package Ralph Lange
Re: EPICS Application Package Bo Jakobsen
Re: EPICS Application Package Ralph Lange
Re: EPICS Application Package Benjamin Franksen

Navigate by Date:
Prev: job opportunities at ORNL Hartman, Steven M. via Tech-talk
Next: ADSimDetector and ADURL - runtime issues with FFT and HDF5 Heesterman, Peter J 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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS Application Package Benjamin Franksen
Next: Re: EPICS Application Package 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  <20182019  2020  2021  2022  2023  2024 
ANJ, 21 Nov 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·