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  2021  2022  <20232024  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  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: Compiling IOC with sequencer from scratch. seq command not found.
From: "Marco A. Barra Montevechi Filho via Tech-talk" <tech-talk at aps.anl.gov>
To: Mark Rivers <rivers at cars.uchicago.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Fri, 20 Jan 2023 20:18:07 +0000
No, i didnt. Im unfortunately not very familiar with this command.

Im looking at this documentation right now to try to understand exactly what it expects as argument: https://epics.anl.gov/base/R3-15/5-docs/AppDevGuide/IOCShell.html. It seems to me it creates the proper ioc shell function, which is exactly what i want. But its not clear to me where does the compilation gets the source from and what should my argument be.

I added a file called Kinematics.dbd to my src folder, added 

SoftKin_DBD += Kinematics.dbd

To my makefile, but whatever i try to put inside the .dbd file generates compilation error. I tried:

registrar(sncExampleRegistrar)
registrar(sncKinematics)
registrar(sncKinematicsRegistrar)
registrar(sncSoftKin)
registrar(sncSoftKinRegistrar)
etc...

Compilation error:

marco@docker:~/work/cnpem_git/IMB/SoftKin$ make
make -C ./configure install
make[1]: Entering directory '/home/marco/work/cnpem_git/IMB/SoftKin/configure'
make -C O.linux-x86_64 -f ../Makefile TOP=../.. \
    T_A=linux-x86_64 install
make[2]: Entering directory '/home/marco/work/cnpem_git/IMB/SoftKin/configure/O.linux-x86_64'
perl -CSD /usr/local/epics-nfs/base/R7.0.7/bin/linux-x86_64/convertRelease.pl checkRelease
make[2]: Leaving directory '/home/marco/work/cnpem_git/IMB/SoftKin/configure/O.linux-x86_64'
make[1]: Leaving directory '/home/marco/work/cnpem_git/IMB/SoftKin/configure'
make -C ./SoftKinApp install
make[1]: Entering directory '/home/marco/work/cnpem_git/IMB/SoftKin/SoftKinApp'
make -C ./src install
make[2]: Entering directory '/home/marco/work/cnpem_git/IMB/SoftKin/SoftKinApp/src'
make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \
    T_A=linux-x86_64 install
make[3]: Entering directory '/home/marco/work/cnpem_git/IMB/SoftKin/SoftKinApp/src/O.linux-x86_64'
Creating dbd file SoftKin.dbd
perl -CSD /usr/local/epics-nfs/base/R7.0.7/bin/linux-x86_64/dbdExpand.pl   -I. -I.. -I../O.Common -I../../../dbd -I/usr/local/epics-nfs/base/R7.0.7/dbd -I/usr/local/epics-nfs/modules/R7.0.7/synApps_6_2/synApps/support/seq-2-2-9//dbd -o SoftKin.dbd base.dbd Kinematics.dbd
perl -CSD /usr/local/epics-nfs/base/R7.0.7/bin/linux-x86_64/registerRecordDeviceDriver.pl   -I. -I.. -I../O.Common -I../../../dbd -I/usr/local/epics-nfs/base/R7.0.7/dbd -I/usr/local/epics-nfs/modules/R7.0.7/synApps_6_2/synApps/support/seq-2-2-9//dbd    -o SoftKin_registerRecordDeviceDriver.cpp ../O.Common/SoftKin.dbd SoftKin_registerRecordDeviceDriver /home/marco/work/cnpem_git/IMB/SoftKin
/usr/bin/g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE           -D_X86_64_  -DUNIX  -Dlinux      -O3 -g   -Wall      -mtune=generic      -m64  -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/usr/local/epics-nfs/base/R7.0.7/include/compiler/gcc -I/usr/local/epics-nfs/base/R7.0.7/include/os/Linux -I/usr/local/epics-nfs/base/R7.0.7/include   -I/usr/local/epics-nfs/modules/R7.0.7/synApps_6_2/synApps/support/seq-2-2-9//include        -MM -MF SoftKin_registerRecordDeviceDriver.d  SoftKin_registerRecordDeviceDriver.cpp
Installing created dbd file ../../../dbd/SoftKin.dbd
/usr/bin/g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE           -D_X86_64_  -DUNIX  -Dlinux      -O3 -g   -Wall      -mtune=generic      -m64  -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/usr/local/epics-nfs/base/R7.0.7/include/compiler/gcc -I/usr/local/epics-nfs/base/R7.0.7/include/os/Linux -I/usr/local/epics-nfs/base/R7.0.7/include   -I/usr/local/epics-nfs/modules/R7.0.7/synApps_6_2/synApps/support/seq-2-2-9//include        -c SoftKin_registerRecordDeviceDriver.cpp
/usr/bin/g++ -o SoftKin  -L/home/marco/work/cnpem_git/IMB/SoftKin/lib/linux-x86_64 -L/usr/local/epics-nfs/base/R7.0.7/lib/linux-x86_64 -L/usr/local/epics-nfs/modules/R7.0.7/synApps_6_2/synApps/support/seq-2-2-9/lib/linux-x86_64 -Wl,-rpath,/home/marco/work/cnpem_git/IMB/SoftKin/lib/linux-x86_64 -Wl,-rpath,/usr/local/epics-nfs/base/R7.0.7/lib/linux-x86_64 -Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.7/synApps_6_2/synApps/support/seq-2-2-9/lib/linux-x86_64           -rdynamic -m64         SoftKin_registerRecordDeviceDriver.o Kinematics.o SoftKinMain.o    -lseq -lpv -ldbRecStd -ldbCore -lca -lCom  
/usr/bin/ld: SoftKin_registerRecordDeviceDriver.o: in function `SoftKin_registerRecordDeviceDriver':
/home/marco/work/cnpem_git/IMB/SoftKin/SoftKinApp/src/O.linux-x86_64/SoftKin_registerRecordDeviceDriver.cpp:280: undefined reference to `pvar_func_sncExampleRegistrar'
collect2: error: ld returned 1 exit status
make[3]: *** [/usr/local/epics-nfs/base/R7.0.7/configure/RULES_BUILD:231: SoftKin] Error 1
make[3]: Leaving directory '/home/marco/work/cnpem_git/IMB/SoftKin/SoftKinApp/src/O.linux-x86_64'
make[2]: *** [/usr/local/epics-nfs/base/R7.0.7/configure/RULES_ARCHS:58: install.linux-x86_64] Error 2
make[2]: Leaving directory '/home/marco/work/cnpem_git/IMB/SoftKin/SoftKinApp/src'
make[1]: *** [/usr/local/epics-nfs/base/R7.0.7/configure/RULES_DIRS:85: src.install] Error 2
make[1]: Leaving directory '/home/marco/work/cnpem_git/IMB/SoftKin/SoftKinApp'
make: *** [/usr/local/epics-nfs/base/R7.0.7/configure/RULES_DIRS:85: SoftKinApp.install] Error 2

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: 20 January 2023 16:52
To: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>
Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: RE: Compiling IOC with sequencer from scratch. seq command not found.
 

Did you remember to add the registrar command for your sequencer program to your application dbd file?

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Marco A. Barra Montevechi Filho via Tech-talk
Sent: Friday, January 20, 2023 1:50 PM
To: tech-talk at aps.anl.gov
Subject: Compiling IOC with sequencer from scratch. seq command not found.

 

Hello all, good evening.

Im sorry if the doubt is trivial, but i cant find what the problem is.
Since makeBaseApp.pl -t example ioc generates several things that i dont need in my application, im trying to compile a sequencer stateMachine from scratch, with makeBaseApp -t ioc. Following the documentation (https://www-csr.bessy.de/control/SoftDist/sequencer/Installation.html#configure-and-build) i did:

> makeBaseApp.pl -t ioc SoftKin
> makeBaseApp.pl -i -t ioc SoftKin

Added the path to my sequencer installation as SNCSEQ in configure/RELEASE file. Added an example state machine file called Kinematics.stt in SoftKinApp/src/ folder and in the Makefile:

SoftKin_SRCS += Kinematics.stt
SoftKin_LIBS += seq pv

I compiled it and it went OK. Kinematics.stt was clearly transformed into a cpp code and then compiled.

However, when starting the IOC, at the end of my cmd file i get:

seq Kinematics,"BLP=SOL:,HP=S:,MP=m1"
st.cmd line 22: Command seq not found.

Am i forgetting something in the Makefiles? I tried using the examples of makeBaseApp.pl to understand what is missing but i think im getting lost in application name conversions. I append cmd file, configure/RELEASE and SoftKin/src/Makefil at the end of this e-mail.

Thanks for any suggestions,

Marco

###############CONFIGURE/RELEASE:

EPICS_BASE = /usr/local/epics-nfs/base/R7.0.7

SNCSEQ = /usr/local/epics-nfs/modules/R7.0.7/synApps_6_2/synApps/support/seq-2-2-9/

 

# Set RULES here if you want to use build rules from somewhere

# other than EPICS_BASE:

#RULES = $(MODULES)/build-rules

 

# These lines allow developers to override these RELEASE settings

# without having to modify this file directly.

-include $(TOP)/../RELEASE.local

-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local

-include $(TOP)/configure/RELEASE.local

################SOFTKINAPP/SRC/MAKEFILE:
TOP=../..

 

include $(TOP)/configure/CONFIG

#----------------------------------------

#  ADD MACRO DEFINITIONS AFTER THIS LINE

#=============================

 

#=============================

# Build the IOC application

 

PROD_IOC = SoftKin

# SoftKin.dbd will be created and installed

DBD += SoftKin.dbd

 

# SoftKin.dbd will be made up from these files:

SoftKin_DBD += base.dbd

 

# Include dbd files from all support applications:

#SoftKin_DBD += xxx.dbd

 

# Add all the support libraries needed by this IOC

#SoftKin_LIBS += xxx

 

# SoftKin_registerRecordDeviceDriver.cpp derives from SoftKin.dbd

SoftKin_SRCS += SoftKin_registerRecordDeviceDriver.cpp

####SoftKin_SRCS += Kinematics.stt

 

# Build the main IOC entry point on workstation OSs.

SoftKin_SRCS_DEFAULT += SoftKinMain.cpp

SoftKin_SRCS_vxWorks += -nil-

 

# Add support from base/src/vxWorks if needed

#SoftKin_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary

 

#####ADD Sequencer

#SoftKin_DBD +=

#SoftKinSupport_LIBS += seq pv

SoftKin_SRCS += Kinematics.stt

SoftKin_LIBS += seq pv

 

# Finally link to the EPICS Base libraries

SoftKin_LIBS += $(EPICS_BASE_IOC_LIBS)

#SoftKin_LIBS += seq pv

 

#===========================

 

include $(TOP)/configure/RULES

#----------------------------------------

#  ADD RULES AFTER THIS LINE

############ CMD FILE:

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

 

#- You may have to change SoftKin to something else

#- everywhere it appears in this file

 

< envPaths

 

cd "${TOP}"

 

## Register all support components

dbLoadDatabase "dbd/SoftKin.dbd"

SoftKin_registerRecordDeviceDriver pdbbase

 

## Load record instances

#dbLoadRecords("db/SoftKin.db","user=marco")

dbLoadTemplate("${TOP}/SoftKinApp/Db/Kinematics.substitutions")

 

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

iocInit

 

## Start any sequence programs

seq Kinematics,"BLP=SOL:,HP=S:,MP=m1"

 

Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.

Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.


Replies:
Re: Compiling IOC with sequencer from scratch. seq command not found. Marco A. Barra Montevechi Filho via Tech-talk
References:
Compiling IOC with sequencer from scratch. seq command not found. Marco A. Barra Montevechi Filho via Tech-talk
RE: Compiling IOC with sequencer from scratch. seq command not found. Mark Rivers via Tech-talk

Navigate by Date:
Prev: RE: Compiling IOC with sequencer from scratch. seq command not found. Mark Rivers via Tech-talk
Next: Re: Compiling IOC with sequencer from scratch. seq command not found. Marco A. Barra Montevechi Filho 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  2021  2022  <20232024 
Navigate by Thread:
Prev: RE: Compiling IOC with sequencer from scratch. seq command not found. Mark Rivers via Tech-talk
Next: Re: Compiling IOC with sequencer from scratch. seq command not found. Marco A. Barra Montevechi Filho 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  2021  2022  <20232024 
ANJ, 20 Jan 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·