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  <20192020  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Unhelpful MSI error message and behaviour
From: Eric Norum via Tech-talk <[email protected]>
To: [email protected]
Date: Fri, 9 Aug 2019 10:43:40 -0700
msi was acting up  on a new application I was developing.    When I ran make in my support module Db source directory I got:
wenorum@xildev4 488> make      
perl -CSD /eda/epics/R3.15.5/base/bin/linux-x86_64/makeMakefile.pl O.linux-x86_64 ../../..
mkdir O.Common
make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \
    T_A=linux-x86_64 install
make[1]: Entering directory `/home/lxusers/w/wenorum/src/siocPowerSupplyPWM/powerSupplyPWMSup/Db/O.linux-x86_64'
/eda/epics/R3.15.5/base/bin/linux-x86_64/msi -D    -I. -I.. -I../O.Common -I../../../db -I/eda/epics/R3.15.5/modules/instrument/QF2preMonitor/head/db -I/eda/epics/R3.15.5/modules/soft/asyn/asyn4-31/db -I/eda/epics/R3.15.5/modules/soft/autosave/autosave-5-8/db -I/eda/epics/R3.15.5/modules/soft/iocExit/iocExit-2-0/db -I/eda/epics/R3.15.5/base/db -o ../O.Common/powerSupplyPWMSup.db -S../powerSupplyPWMSup.substitutions  > powerSupplyPWMSup.db.d
msi: No template file
Usage: msi [options] [template]
  stdin is used if neither template nor substitution file is given
  options:
    -h        Print this help message
    -D        Output file dependencies, not substitutions
    -V        Undefined macros generate an error
    -g        All macros have global scope
    -o<FILE>  Send output to <FILE>
    -I<DIR>   Add <DIR> to include file search path
    -M<SUBST> Add <SUBST> to (global) macro definitions
              (<SUBST> takes the form VAR=VALUE,...)
    -S<FILE>  Expand the substitutions in FILE
Inflating database from ../powerSupplyPWMSup.substitutions 
/eda/epics/R3.15.5/base/bin/linux-x86_64/msi    -I. -I.. -I../O.Common -I../../../db -I/eda/epics/R3.15.5/modules/instrument/QF2preMonitor/head/db -I/eda/epics/R3.15.5/modules/soft/asyn/asyn4-31/db -I/eda/epics/R3.15.5/modules/soft/autosave/autosave-5-8/db -I/eda/epics/R3.15.5/modules/soft/iocExit/iocExit-2-0/db -I/eda/epics/R3.15.5/base/db -o powerSupplyPWMSup.db -S../powerSupplyPWMSup.substitutions 
msi: No template file
Usage: msi [options] [template]
  stdin is used if neither template nor substitution file is given
  options:
    -h        Print this help message
    -D        Output file dependencies, not substitutions
    -V        Undefined macros generate an error
    -g        All macros have global scope
    -o<FILE>  Send output to <FILE>
    -I<DIR>   Add <DIR> to include file search path
    -M<SUBST> Add <SUBST> to (global) macro definitions
              (<SUBST> takes the form VAR=VALUE,...)
    -S<FILE>  Expand the substitutions in FILE
make[1]: *** [../O.Common/powerSupplyPWMSup.db] Error 1
make[1]: Leaving directory `/home/lxusers/w/wenorum/src/siocPowerSupplyPWM/powerSupplyPWMSup/Db/O.linux-x86_64'
make: *** [install.linux-x86_64] Error 2
wenorum@xildev4 489> 

But the msi runs seemed to have succeeded:
wenorum@xildev4 489> ls O.linux-x86_64/
Makefile  powerSupplyPWMSup.db  powerSupplyPWMSup.db.d
Running msi again produced a .db file in the support module <TOP>/db/ directory.

The problem was an extra closing brace in the substitutions file:
wenorum@xildev4 491> cat powerSupplyPWMSup.substitutions 
file "perFPGA.template"
{ pattern
{    P,      R,      PORT  }
{"\$(P)","\$(R)","\$(PORT)" }
}

file "perBridge.template"
{ pattern
{    P,      R,      PORT,   C }
{"\$(P)","\$(R)","\$(PORT)", 0 }}
}


So the error was in my code, but the error message produced by msi was pretty unhelpful.  Something like “powerSupplyPWMSup.substitutions:10 — syntax error" would have been a lot more useful.  Also it would probably be better if msi  and/or the make system could remove any output file when the source contains syntax errors.

Any chance of these changes making it in to the next release?

I’d also like to send my thanks to Andrew Johnson for providing the extra set of eyes that caught my typo in the substitutions file!
-- 

Navigate by Date:
Prev: Re: EPICS 'isegHAL' module Ralph Lange via Tech-talk
Next: New releases of mca, measComp, and modbus modules Mark Rivers 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: areaDetector R3-7 released Mark Rivers via Tech-talk
Next: New releases of mca, measComp, and modbus modules Mark Rivers 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  <20192020  2021  2022  2023  2024 
ANJ, 09 Aug 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·