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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | softIoc compiling-in relative path to softIoc.dbd |
From: | "Daykin, Evan via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Wed, 30 Mar 2022 12:55:44 +0000 |
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? -
Add a compile-time flag to insist on an absolute path? -
Something else? Thank you, Evan |