Unhelpful MSI error message and behaviour

Bug #1839657 reported by Eric Norum
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
New
Undecided
Unassigned

Bug Description

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.