EPICS Home

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  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 
<== Date ==> <== Thread ==>

Subject: Problems with ioc app building with asyn
From: 黄佳伟 via Tech-talk <tech-talk@aps.anl.gov>
To: tech-talk@aps.anl.gov <tech-talk@aps.anl.gov>
Date: Mon, 15 Jul 2019 19:15:42 +0800
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

Navigate by Date:
Prev: Re: areaDetector ADProsilica dbJLinkDebug undefined reference Ralph Lange via Tech-talk
Next: Fwd: Problems with ioc app building with asyn 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 
Navigate by Thread:
Prev: Re: areaDetector ADProsilica dbJLinkDebug undefined reference Ralph Lange via Tech-talk
Next: Fwd: Problems with ioc app building with asyn 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