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  <20212022  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS_DB_INCLUDE_PATH
From: Simon Rose via Tech-talk <tech-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>, Ralph Lange <ralph.lange at gmx.de>
Cc: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Thu, 16 Dec 2021 08:34:50 +0000
Hello -

In e3, the database files that are installed with a module will always be installed at the location $(module_DB) (an environment variable set by require when loading a module).

In general the e3 team at ESS recommends referencing the database file paths explicitly as opposed to relying on or manipulating EPICS_DB_INCLUDE_PATH; given that there are many modules installed together, it seems you could end up loading the "wrong" one in a possibly annoying to trace way.

Similarly, if database files are located relative to the current startup command, it would be best to explicitly reference the file as

dbLoadRecords($(E3_CMD_TOP)/path/to/database.db)

so as to remove ambiguity.

Cheers,

Simon Rose

On 2021-12-15, 18:52, "Tech-talk on behalf of Michael Davidsaver via Tech-talk" <tech-talk-bounces at aps.anl.gov on behalf of tech-talk at aps.anl.gov> wrote:

    On 12/15/21 4:35 AM, Ralph Lange via Tech-talk wrote:
    > On Wed, 15 Dec 2021 at 07:52, Alfio Rizzo via Tech-talk <tech-talk at aps.anl.gov <mailto:tech-talk at aps.anl.gov>> wrote:
    > 
    >     So my conclusion is that giving this limitation of 256 chars of maclib parser,
    >     It is wise then to never use EPICS_DB_INCLUDE_PATH in a snippet to add
    >     local db path, since if you have a long list of require you may hit into trouble.
    > 
    >  
    > So, indirectly, this is related to ESS's E3 development environment that keeps all dependency modules in separate locations (with long paths).
    
    It might be reasonable feature for E3 to assemble $EPICS_DB_INCLUDE_PATH
    at the same place (I think) it assembles $LD_LIBRARY_PATH.
    
    
    > Using other environments and/or deployment mechanisms that don't allow parallel use of multiple versions of modules, shared things get installed into a single location, so your EPICS_DB_INCLUDE_PATH stays as short as "$(TOP)/db:$(SHARED)/db".
    
    
    I sometimes begin st.cmd with a variation on the following
    to avoid a need for st.cmd to change directory.
    
    > epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(TOP)/db")
    
    or
    
    > epicsEnvSet("EPICS_DB_INCLUDE_PATH", "$(PWD)/../../db")
    
    or
    
    > epicsEnvSet("EPICS_DB_INCLUDE_PATH", ".:../../db")
    
    (I sometimes put instance specific .db files under "iocBoot/*/" )
    
    
    And I also prefer to make use of DB_INSTALLS+= in my App/db/Makefile [1]
    to copy in external db files and fragments at build time, so that the
    resulting IOC (if statically linked) is self-contained.
    
    (I mentions this because both $EPICS_DB_INCLUDE_PATH and DB_INSTALLS
    seem to be fairly obscure)
    
    
    [1] https://github.com/mdavidsaver/pyDevSup/blob/ea5f0d62412085dfc941e8fe758695abdfdab548/devsupApp/Db/Makefile#L17-L23
    


Replies:
Re: EPICS_DB_INCLUDE_PATH Ralph Lange via Tech-talk
References:
EPICS_DB_INCLUDE_PATH Alfio Rizzo via Tech-talk
Re: EPICS_DB_INCLUDE_PATH Michael Davidsaver via Tech-talk
RE: EPICS_DB_INCLUDE_PATH Alfio Rizzo via Tech-talk
Re: EPICS_DB_INCLUDE_PATH Ralph Lange via Tech-talk
Re: EPICS_DB_INCLUDE_PATH Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: netDev v1.1.0 released Shuei YAMADA via Tech-talk
Next: Re: EPICS_DB_INCLUDE_PATH Ralph Lange 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS_DB_INCLUDE_PATH Ralph Lange via Tech-talk
Next: Re: EPICS_DB_INCLUDE_PATH Ralph Lange 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  <20212022  2023  2024 
ANJ, 16 Dec 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·