Experimental Physics and Industrial Control System
CC’ing tech-talk
Mark
Sent from my iPhone
Begin forwarded message:
From: 黄佳伟 <[email protected]<mailto:[email protected]>>
Date: July 15, 2019 at 8:13:39 AM EDT
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Subject: Re: Problems with ioc app building with asyn
Thanks a lot!
I referenced the symbol in my dbd file by the command name, not the registrar function.
Huang
On 7/15/2019 20:09,Mark Rivers<[email protected]><mailto:[email protected]> wrote:
Hi,
asynTest_registerRecordDeviceDriver.o: In function `asynTest_registerRecordDeviceDriver':
/home/jasper/asynTest/asynTestApp/src/O.linux-x86_64/asynTest_registerRecordDeviceDriver.cpp:350: undefined reference to `pvar_func_testAsynConfigure'
The undefined symbol should be defined is an epicsExportRegisterRecordDeviceDriver statement like this one from testAsynPortDriver:
epicsExportRegistrar(testAsynPortDriverRegister);
That produces this symbol in libtestAsynPortDriverSupport.a
corvette:asyn/testAsynPortDriverApp/src>nm ../../lib/linux-x86_64/libtestAsynPortDriverSupport.a | grep pvar
0000000000000000 D pvar_func_testAsynPortDriverRegister
That is referenced in a dbd file like this:
registrar("testAsynPortDriverRegister")
I suspect you are not being consistent in the names between your .cpp file and your dbd file.
Mark
________________________________
From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> on behalf of 黄佳伟 via Tech-talk <[email protected]<mailto:[email protected]>>
Sent: Monday, July 15, 2019 6:15 AM
To: [email protected]<mailto:[email protected]>
Subject: Problems with ioc app building with asyn
Hello,
I'm new to EPICS and EPICS asyn module. Now I'm writing an IOC app in imitation of the `testAsynPortDriver` to be familiar with asyn module. But I get some make error when I make in my <top>:
make -C ./configure install
make[1]: Entering directory '/home/jasper/asynTest/configure'
perl -CSD /home/jasper/EPICS/epics-base/bin/linux-x86_64/makeMakefile.pl O.linux-x86_64 ../..
mkdir -p O.Common
make -C O.linux-x86_64 -f ../Makefile TOP=../.. \
T_A=linux-x86_64 install
make[2]: Entering directory '/home/jasper/asynTest/configure/O.linux-x86_64'
perl -CSD /home/jasper/EPICS/epics-base/bin/linux-x86_64/convertRelease.pl checkRelease
make[2]: Leaving directory '/home/jasper/asynTest/configure/O.linux-x86_64'
make[1]: Leaving directory '/home/jasper/asynTest/configure'
make -C ./asynTestApp install
make[1]: Entering directory '/home/jasper/asynTest/asynTestApp'
make -C ./src install
make[2]: Entering directory '/home/jasper/asynTest/asynTestApp/src'
perl -CSD /home/jasper/EPICS/epics-base/bin/linux-x86_64/makeMakefile.pl O.linux-x86_64 ../../..
mkdir -p O.Common
make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \
T_A=linux-x86_64 install
make[3]: Entering directory '/home/jasper/asynTest/asynTestApp/src/O.linux-x86_64'
/usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/home/jasper/EPICS/epics-base/include/compiler/gcc -I/home/jasper/EPICS/epics-base/include/os/Linux -I/home/jasper/EPICS/epics-base/include -I/home/jasper/EPICS/synApps/support/asyn-R4-33/include -MM -MF asynTest.d ../asynTest.cpp
/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/home/jasper/EPICS/epics-base/include/compiler/gcc -I/home/jasper/EPICS/epics-base/include/os/Linux -I/home/jasper/EPICS/epics-base/include -I/home/jasper/EPICS/synApps/support/asyn-R4-33/include -MM -MF asynTestMain.d ../asynTestMain.cpp
Expanding dbd file ../asynTestInclude.dbd
perl -CSD /home/jasper/EPICS/epics-base/bin/linux-x86_64/dbdExpand.pl -I. -I.. -I../O.Common -I../../../dbd -I/home/jasper/EPICS/epics-base/dbd -I/home/jasper/EPICS/synApps/support/asyn-R4-33/dbd -o asynTest.dbd ../asynTestInclude.dbd
perl -CSD /home/jasper/EPICS/epics-base/bin/linux-x86_64/registerRecordDeviceDriver.pl -I. -I.. -I../O.Common -I../../../dbd -I/home/jasper/EPICS/epics-base/dbd -I/home/jasper/EPICS/synApps/support/asyn-R4-33/dbd -o asynTest_registerRecordDeviceDriver.cpp ../O.Common/asynTest.dbd asynTest_registerRecordDeviceDriver /home/jasper/asynTest
/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/home/jasper/EPICS/epics-base/include/compiler/gcc -I/home/jasper/EPICS/epics-base/include/os/Linux -I/home/jasper/EPICS/epics-base/include -I/home/jasper/EPICS/synApps/support/asyn-R4-33/include -MM -MF asynTest_registerRecordDeviceDriver.d asynTest_registerRecordDeviceDriver.cpp
Installing created dbd file ../../../dbd/asynTest.dbd
/usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -mtune=generic -m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/home/jasper/EPICS/epics-base/include/compiler/gcc -I/home/jasper/EPICS/epics-base/include/os/Linux -I/home/jasper/EPICS/epics-base/include -I/home/jasper/EPICS/synApps/support/asyn-R4-33/include -c ../asynTest.cpp
/usr/bin/ar -rc libasynTestSupport.a asynTest.o
/usr/bin/ranlib libasynTestSupport.a
/usr/bin/g++ -o libasynTestSupport.so -shared -fPIC -Wl,-hlibasynTestSupport.so -L/home/jasper/asynTest/lib/linux-x86_64 -L/home/jasper/EPICS/epics-base/lib/linux-x86_64 -L/home/jasper/EPICS/synApps/support/asyn-R4-33/lib/linux-x86_64 -Wl,-rpath,/home/jasper/asynTest/lib/linux-x86_64 -Wl,-rpath,/home/jasper/EPICS/epics-base/lib/linux-x86_64 -Wl,-rpath,/home/jasper/EPICS/synApps/support/asyn-R4-33/lib/linux-x86_64 -rdynamic -m64 asynTest.o -lasyn -ldbRecStd -ldbCore -lca -lCom -lpthread -lreadline -lm -lrt -ldl -lgcc
Installing shared library ../../../lib/linux-x86_64/libasynTestSupport.so
Installing library ../../../lib/linux-x86_64/libasynTestSupport.a
/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/home/jasper/EPICS/epics-base/include/compiler/gcc -I/home/jasper/EPICS/epics-base/include/os/Linux -I/home/jasper/EPICS/epics-base/include -I/home/jasper/EPICS/synApps/support/asyn-R4-33/include -c asynTest_registerRecordDeviceDriver.cpp
/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/home/jasper/EPICS/epics-base/include/compiler/gcc -I/home/jasper/EPICS/epics-base/include/os/Linux -I/home/jasper/EPICS/epics-base/include -I/home/jasper/EPICS/synApps/support/asyn-R4-33/include -c ../asynTestMain.cpp
/usr/bin/g++ -o asynTest -L/home/jasper/asynTest/lib/linux-x86_64 -L/home/jasper/EPICS/epics-base/lib/linux-x86_64 -L/home/jasper/EPICS/synApps/support/asyn-R4-33/lib/linux-x86_64 -Wl,-rpath,/home/jasper/asynTest/lib/linux-x86_64 -Wl,-rpath,/home/jasper/EPICS/epics-base/lib/linux-x86_64 -Wl,-rpath,/home/jasper/EPICS/synApps/support/asyn-R4-33/lib/linux-x86_64 -rdynamic -m64 asynTest_registerRecordDeviceDriver.o asynTestMain.o -lasynTestSupport -lasyn -ldbRecStd -ldbCore -lca -lCom
asynTest_registerRecordDeviceDriver.o: In function `asynTest_registerRecordDeviceDriver':
/home/jasper/asynTest/asynTestApp/src/O.linux-x86_64/asynTest_registerRecordDeviceDriver.cpp:350: undefined reference to `pvar_func_testAsynConfigure'
collect2: error: ld returned 1 exit status
/home/jasper/EPICS/epics-base/configure/RULES_BUILD:206: recipe for target 'asynTest' failed
make[3]: *** [asynTest] Error 1
make[3]: Leaving directory '/home/jasper/asynTest/asynTestApp/src/O.linux-x86_64'
/home/jasper/EPICS/epics-base/configure/RULES_ARCHS:58: recipe for target 'install.linux-x86_64' failed
make[2]: *** [install.linux-x86_64] Error 2
make[2]: Leaving directory '/home/jasper/asynTest/asynTestApp/src'
/home/jasper/EPICS/epics-base/configure/RULES_DIRS:84: recipe for target 'src.install' failed
make[1]: *** [src.install] Error 2
make[1]: Leaving directory '/home/jasper/asynTest/asynTestApp'
/home/jasper/EPICS/epics-base/configure/RULES_DIRS:84: recipe for target 'asynTestApp.install' failed
make: *** [asynTestApp.install] Error 2
Here is my directory tree:
.
├── asynTestApp
│ ├── Db
│ │ ├── asynTest.db
│ │ └── Makefile
│ ├── Makefile
│ └── src
│ ├── asynTest.cpp
│ ├── asynTest.h
│ ├── asynTestInclude.dbd
│ ├── asynTestMain.cpp
│ └── Makefile
├── configure
│ ├── CONFIG
│ ├── CONFIG_SITE
│ ├── Makefile
│ ├── RELEASE
│ ├── RULES
│ ├── RULES_DIRS
│ ├── RULES.ioc
│ └── RULES_TOP
├── iocBoot
│ ├── iocasynTest
│ │ ├── asynTest.substitution
│ │ ├── Makefile
│ │ └── st.cmd
│ └── Makefile
└── Makefile
Here is my Makefile in `./asynTestApp/src/Makefile`:
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
#=============================
# Asyn Support
LIBRARY_IOC += asynTestSupport
asynTestSupport_SRCS += asynTest.cpp
asynTestSupport_LIBS += asyn
asynTestSupport_LIBS += $(EPICS_BASE_IOC_LIBS)
# Build the IOC application
PROD_IOC = asynTest
# asynTest.dbd will be created and installed
DBD += asynTest.dbd
# asynTest.dbd will be made up from these files:
# asynTest_DBD += base.dbd
# Include dbd files from all support applications:
# asynTest_DBD += asyn.dbd
# Add all the support libraries needed by this IOC
asynTest_LIBS += asynTestSupport asyn
# asynTest_registerRecordDeviceDriver.cpp derives from asynTest.dbd
asynTest_SRCS += asynTest_registerRecordDeviceDriver.cpp
# Build the main IOC entry point on workstation OSs.
asynTest_SRCS_DEFAULT += asynTestMain.cpp
asynTest_SRCS_vxWorks += -nil-
# Add support from base/src/vxWorks if needed
#asynTest_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
# Finally link to the EPICS Base libraries
asynTest_LIBS += $(EPICS_BASE_IOC_LIBS)
#===========================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
My version of EPICS base is 3.16.2 and asyn is from synApps 6.0.
Could someone tell me where's the bug? Thank you.
Jiawei Huang
- References:
- Problems with ioc app building with asyn 黄佳伟 via Tech-talk
- Navigate by Date:
- Prev:
Problems with ioc app building with asyn 黄佳伟 via Tech-talk
- Next:
Re: updating ADAndor from RHEL6 to RHEL7 ben.bradnick--- 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
2023
2024
- Navigate by Thread:
- Prev:
Problems with ioc app building with asyn 黄佳伟 via Tech-talk
- Next:
Re: Problems with ioc app building with asyn 黄佳伟 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
2023
2024