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: RE: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory
From: Mark Rivers via Tech-talk <[email protected]>
To: 'Valentyn Stadnytskyi' <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Mon, 18 Nov 2019 12:52:33 +0000

I can confirm what Valentyn reports.  I just followed the exact instructions in the link he references below.  I used copy and paste from the document to be sure I did not make any typos.

 

I found 2 problems:

 

The second makeBaseApp command asks a question about the name of the IOC to boot:

 

(base) [epics@corvette testIoc]$ makeBaseApp.pl -i -t example testIoc

Using target architecture linux-x86_64 (only one available)

The following applications are available:

    testIoc

What application should the IOC(s) boot?

The default uses the IOC's name, even if not listed above.

Application name?

 

The instructions do not mention this, but I think they should.

 

More importantly, this is the st.cmd file generated. 

 

**********

(base) [epics@corvette ioctestIoc]$ more st.cmd

chmod u+x st.cmdstIoc_64/make

 

chmod u+x st.cmd to something else

#- everywhere it appears in this file

 

< envPaths

 

cd "${TOP}"

 

## Register all support components

chmod u+x st.cmd.dbd"ake

make_cd_iocBoot_ioctestIoc_chmod_u_x_st_cmd_registerRecordDeviceDriver pdbbase

 

## Load record instances

dbLoadTemplate "db/user.substitutions"

chmod u+x st.cmdVersion.db", "user=epics"

dbLoadRecords "db/dbSubExample.db", "user=epics"

 

#- Set this to see messages from mySub

#var mySubDebug 1

 

#- Run this to trace the stages of iocInit

#traceIocInit

 

cd "${TOP}/iocBoot/${IOC}"

iocInit

 

## Start any sequence programs

#seq sncExample, "user=epics"

(base) [epics@corvette ioctestIoc]$ more st.cmd

chmod u+x st.cmdstIoc_64/make

 

chmod u+x st.cmd to something else

#- everywhere it appears in this file

 

< envPaths

 

cd "${TOP}"

 

## Register all support components

chmod u+x st.cmd.dbd"ake

make_cd_iocBoot_ioctestIoc_chmod_u_x_st_cmd_registerRecordDeviceDriver pdbbase

 

## Load record instances

dbLoadTemplate "db/user.substitutions"

chmod u+x st.cmdVersion.db", "user=epics"

dbLoadRecords "db/dbSubExample.db", "user=epics"

 

#- Set this to see messages from mySub

#var mySubDebug 1

 

#- Run this to trace the stages of iocInit

#traceIocInit

 

cd "${TOP}/iocBoot/${IOC}"

iocInit

 

## Start any sequence programs

#seq sncExample, "user=epics"

 

*******

 

Note that as Valentyn says, it uses {} rather than () around macro parameters and so an attempt to follow the next step in the instructions leads to this error:

 

(base) [epics@corvette ioctestIoc]$ ./st.cmd

cd: bad interpreter: No such file or directory

 

In EPICS/epics-base/templates/makeBaseApp/top/iocBoot/ioc/st.cmd@Common contains this:

 

********

#!../../bin/_ARCH_/_APPNAME_

 

#- You may have to change _APPNAME_ to something else

#- everywhere it appears in this file

 

< envPaths

 

cd "${TOP}"

 

## Register all support components

dbLoadDatabase "dbd/_APPNAME_.dbd"

_CSAFEAPPNAME__registerRecordDeviceDriver pdbbase

 

## Load record instances

#dbLoadRecords("db/xxx.db","user=_USER_")

 

cd "${TOP}/iocBoot/${IOC}"

iocInit

 

## Start any sequence programs

#seq sncxxx,"user=_USER_"

********

 

So the template file contains {} rather than ().  But I don’t know enough perl to know if this is the problem, or if makeBaseApp.pl is supposed to be replacing those {} with ()?

 

Mark

 

From: Valentyn Stadnytskyi <[email protected]>
Sent: Sunday, November 17, 2019 9:40 PM
To: Mark Rivers <[email protected]>
Cc: Michael Davidsaver <[email protected]>; [email protected]
Subject: Re: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory

 

Thank you Mark!

 

On a similar note:

If one does everything according to these instructions from https://epics-controls.org/resources-and-support/documents/getting-started/

mkdir -p $HOME/EPICS/TEST/testIoc
cd $HOME/EPICS/TEST/testIoc
makeBaseApp.pl -t example testIoc
makeBaseApp.pl -i -t example testIoc
make
cd iocBoot/ioctestIoc
chmod u+x st.cmd

You get a st.cmd file with curly brackets instead of parenthesis for {TOP} and {IOC}. I don’t know where this is generated and where to report the bug. See the file below. This is minor but for someone who does it for the first time and never seen EPICS shell but be a big slowdown.

 

~/EPICS/IOCs/testIoc/iocBoot/ioctestIoc$ more st.cmd

#!../../bin/linux-x86_64/testIoc

 

#- You may have to change testIoc to something else

#- everywhere it appears in this file

 

< envPaths

 

cd "${TOP}"

 

## Register all support components

dbLoadDatabase "dbd/testIoc.dbd"

testIoc_registerRecordDeviceDriver pdbbase

 

## Load record instances

dbLoadTemplate "db/user.substitutions"

dbLoadRecords "db/testIocVersion.db", "user=femtoland"

dbLoadRecords "db/dbSubExample.db", "user=femtoland"

 

#- Set this to see messages from mySub

#var mySubDebug 1

 

#- Run this to trace the stages of iocInit

#traceIocInit

 

cd "${TOP}/iocBoot/${IOC}"

iocInit

 

## Start any sequence programs

#seq sncExample, "user=femtoland"

-----------------------------------

Valentyn Stadnytskyi

 

 

 



On Nov 17, 2019, at 9:27 PM, Mark Rivers <[email protected]> wrote:

 

I helped Valentyn fix this today. It was a simple problem with testIoc vs testIOC. Changing the case fixed it.

Mark

Sent from my iPhone


On Nov 17, 2019, at 9:17 PM, Michael Davidsaver via Tech-talk <[email protected]> wrote:


On 11/17/19 12:06 PM, Valentyn Stadnytskyi via Tech-talk wrote:
:~/EPICS/epics-base/test/testIoc/iocBoot/ioctestIoc$ ./st.cmd
-bash: ./st.cmd: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory


What happens if you instead run the following from the same directory?


$ ../../bin/linux-x86_64/testIOC st.cmd

 


Replies:
RE: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory Mark Rivers via Tech-talk
References:
../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory Valentyn Stadnytskyi via Tech-talk
Re: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory Michael Davidsaver via Tech-talk
Re: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory Mark Rivers via Tech-talk
Re: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory Valentyn Stadnytskyi via Tech-talk

Navigate by Date:
Prev: Re: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory Valentyn Stadnytskyi via Tech-talk
Next: RE: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory 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: Re: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory Valentyn Stadnytskyi via Tech-talk
Next: RE: ../../bin/linux-x86_64/testIOC: bad interpreter: No such file or directory 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, 18 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·