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