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: softIoc compiling-in relative path to softIoc.dbd
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: "Daykin, Evan" <daykin at frib.msu.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 30 Mar 2022 08:54:54 -0700
On 3/30/22 05:55, Daykin, Evan via Tech-talk wrote:
Hi tech-talk,

I am finishing up a Debian package for base 7.0.6. In the finished product, I discovered that the compiled-in path to softIoc.dbd is not what I expect. I would like the path to be /usr/lib/epics/dbd/softIoc.dbd, but it is instead always pointing to <pwd>/../../dbd/softIoc.dbd, no matter where the softIoc executable resides. This causes an issue, since the Debian package drops the executables in /usr/bin, with symlinks to those executables in /usr/lib/epics. Thus, the calculated DBD path is /usr/bin/../../dbd/softIoc.dbd, which points to nothing.

If I understand correctly, this is happening like so:

1.modules/database/src/std/softIoc/RULES generates epicsInstallDir.h by calling makeInstallDir.pl “$(FINAL_LOCATION)”. (resolves to /usr/lib/epics)

2.softMain.cpp pulls in the EPICS_BASE #define macro from epicsInstallDir.h.

3.softMain.cpp creates a constant DBD_FILE, defined as EPICS_BASE/dbd/softIoc.dbd

4.softMain.cpp’s main method attempts to calculate a relative path based on DBD_FILE, and this is ultimately what is used.

So my question is, what is the preferred course of action here?

-Re-arrange the package to drop executables in $(EPICS_BASE)/bin/$(EPICS_HOST_ARCH), and link to them from /usr/bin?

This seems preferable to me.


-Add a compile-time flag to insist on an absolute path?

-Something else?

* Patch softMain.cpp to use a static, absolute, path for softIoc.dbd.


Thank you,

Evan



Replies:
RE: softIoc compiling-in relative path to softIoc.dbd Daykin, Evan via Tech-talk
References:
softIoc compiling-in relative path to softIoc.dbd Daykin, Evan via Tech-talk

Navigate by Date:
Prev: Re: Static Build on armv7 Michael Davidsaver via Tech-talk
Next: RE: softIoc compiling-in relative path to softIoc.dbd Daykin, Evan 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: softIoc compiling-in relative path to softIoc.dbd Daykin, Evan via Tech-talk
Next: RE: softIoc compiling-in relative path to softIoc.dbd Daykin, Evan 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 ·