Open jwlodek opened 3 years ago
I have not tried this with EPICS 7 yet. Maybe I need to change something in the Makefile.
I was able to build the IOC application by editing the Makefile to the following:
TOP=.
# R3.14+
include $(TOP)/configure/CONFIG
# Want local functions non-static? Define DEBUG
#CFLAGS += -DDEBUG
# Suppress warning in EPICS 7
USR_CPPFLAGS += -DUSE_TYPED_RSET
# library
LIBRARY = s7plc
LIB_SRCS += drvS7plc.c
LIB_SRCS += devS7plc.c
HTMLS += s7plc.html
INSTALL_DBDS += $(INSTALL_DBD)/s7plcBase.dbd
INSTALL_DBDS += $(INSTALL_DBD)/s7plcCalcout.dbd
INSTALL_DBDS += $(INSTALL_DBD)/s7plcReg.dbd
# Uncomment this if you want a dynamically loadable module
#LIB_SRCS += s7plc_registerRecordDeviceDriver.cpp
# stand alone application program
PROD_DEFAULT = s7plcApp
PROD_vxWorks = -nil-
s7plcApp_SRCS += s7plcApp_registerRecordDeviceDriver.cpp
s7plcApp_SRCS += appMain.cc
s7plcApp_LIBS += s7plc
s7plcApp_LIBS += $(EPICS_BASE_IOC_LIBS)
s7plcApp_DBD += base.dbd
s7plcApp_DBD += s7plcBase.dbd
s7plcApp_DBD += s7plcCalcout.dbd
s7plcApp_DBD += s7plcReg.dbd
DBD += s7plcApp.dbd
include $(TOP)/configure/RULES
Though I am not sure if that would break compatibility with previous versions of EPICS base
I've put some time into re-organizing the module a bit to mimic some of the other epics modules I've been working with, the re-organized format builds OK on EPICS 7 as well. It is available on my fork
Hello, everyone,
this is the first time i am building the s7plc with epics 7.0.6.1 and centos 8. Unfortunately, I get the following error message from the compiler. I downloaded the S7plc driver from jwlodek /s7plc. Since I very rarely work with epics, I always have a few difficulties at the beginning. I would be very grateful for hints on troubleshooting.
make[5]: Enter directory '/home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC/s7plcApp/src/O.linux-x86_64'
/usr/bin/g++ -o s7plcApp -L/home/epics-ioc/epics-base/support/s7plc/lib/linux-x86_64 -L/home/epics-ioc/epics-base/support/s7plc/iocs/ s7plcIOC/lib/linux-x86_64 -L/home/epics-ioc/epics-base/lib/linux-x86_64 -Wl,-rpath,/home/epics-ioc/epics-base/support/s7plc/lib/linux- x86_64 -Wl,-rpath,/home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC/lib/linux-x86_64 -Wl,-rpath,/home/epics-ioc/epics-base/lib/ linux-x86_64 -rdynamic -m64 s7plcApp_registerRecordDeviceDriver.o s7plcAppMain.o -ls7plc -lcalc -ldbRecStd -ldbCore -lca -lCom
s7plcApp_registerRecordDeviceDriver.o: In function __static_initialization_and_destruction_0': /home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC/s7plcApp/src/O.linux-x86_64/s7plcApp_registerRecordDeviceDriver.cpp:107: undefined reference to
pvar_rset_swaitRSET'
/home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC/s7plcApp/src/O.linux-x86_64/s7plcApp_registerRecordDeviceDriver.cpp:107: undefined reference to `pvar_func_swaitRecordSizeOffset'
/home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC/s7plcApp/src/O.linux-x86_64/s7plcApp_registerRecordDeviceDriver.cpp:216: undefined reference to "pvar_dset_devSWaitIoEvent"
/home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC/s7plcApp/src/O.linux-x86_64/s7plcApp_registerRecordDeviceDriver.cpp:335: undefined reference to pvar_int_swaitRecordDebug
collect2: error: ld returned 1 exit status
make[5]: [/home/epics-ioc/epics-base/configure/RULES_BUILD:231:s7plcApp] Error 1
make[5]: Leave directory '/home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC/s7plcApp/src/O.linux-x86_64'
make[4]: [/home/epics-ioc/epics-base/configure/RULES_ARCHS:58:install.linux-x86_64] error 2
make[4]: Leave directory '/home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC/s7plcApp/src'
make[3]: [/home/epics-ioc/epics-base/configure/RULES_DIRS:85:src.install] error 2
make[3]: Leave directory '/home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC/s7plcApp'
make[2]: [/home/epics-ioc/epics-base/configure/RULES_DIRS:85: s7plcApp.install] Error 2
make[2]: Leave directory '/home/epics-ioc/epics-base/support/s7plc/iocs/s7plcIOC'
make[1]: [/home/epics-ioc/epics-base/configure/RULES_DIRS:85: s7plcIOC.install] Error 2
make[1]: Leave directory '/home/epics-ioc/epics-base/support/s7plc/iocs'
make: [/home/epics-ioc/epics-base/configure/RULES_DIRS:85: iocs.install] error 2
The swait record is not part of s7plc. You probably added parts of the swait record support but not everything needed. Try to build the s7plc project without swait.
Thanks Dirk, I think I got it working now
Von: Dirk Zimoch @.> Gesendet: Dienstag, 30. August 2022 15:06 An: paulscherrerinstitute/s7plc @.> Cc: Kraemer, Dirk @.>; Comment @.> Betreff: Re: [paulscherrerinstitute/s7plc] Can't find file s7plc.dbd (#5)
The swait record is not part of s7plc. You probably added parts of the swait record support but not everything needed. Try to build the s7plc project without swait.
- Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpaulscherrerinstitute%2Fs7plc%2Fissues%2F5%23issuecomment-1231641267&data=05%7C01%7Cdirk.kraemer%40research-instruments.de%7C9098c0dcf43e4d1bada508da8a88624a%7C5e27e469e17046cd838d7e6f7944402c%7C0%7C0%7C637974615616010558%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IwkBumxrAZbVqT0sTZgxYUEZ3IPlbDQjNcKpUBXufU0%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA22GWUAI2OLQZJBJ4FJ3LOLV3YBLNANCNFSM43IGZPIQ&data=05%7C01%7Cdirk.kraemer%40research-instruments.de%7C9098c0dcf43e4d1bada508da8a88624a%7C5e27e469e17046cd838d7e6f7944402c%7C0%7C0%7C637974615616010558%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3eYMjeI9MsiaGiqVoSV6%2B%2BcJoxEU4HgxxHcvi85%2BHkE%3D&reserved=0. You are receiving this because you commented.Message ID: @.**@.>>
Hello all,
this is my first time building s7plc as part of an automated pipeline we are working on for all the epics modules at NSLS2. I am building on RHEL 8, and when I clone the module into my support directory, edit the path in configure/RELEASE and run
make
, I get the following output:Likely I am just missing something since it is my first time. Base version is 7.0.5. Any help would be appreciated, Thanks!