Hello everyone,
I got the EPICS module “std” from github (git clone
https://github.com/epics-modules/std.git). From its configure/RELEASE, my initial thought was that the module should work with base-3.15.3 & asyn-R4-30. I tried that out and indeed the module “std” is built
successfully against base-3.15.3.
Since we are still using base 3.14.12.3 at NSLS-II and we have lots of Debian packages already built for EPICS, I’d like to take the advantage of this existing infrastructure so that I am trying to build "std"
against base 3.14.12.3 (provided by the Debian packages). The build failed when it tried to build the ioc application “stdApp”. It seems the library “libstd.*” is not found (not included in the path) although I can clearly see “lib/linux-x86_64/libstd.*” is
actually generated.
/usr/bin/g++ -c -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_X86_64_ -DUNIX -D_BSD_SOURCE -Dlinux -D_REENTRANT -O3 -Wall -m64 -fPIC -MMD -I. -I../O.Common -I.
-I.. -I../../../include/os/Linux -I../../../include -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include ../delayCmd.cpp
/usr/bin/ar -rc libstd.a scalerRecord.o devScalerAsyn.o drvScalerSoft.o drvScaler974.o epidRecord.o devEpidSoft.o devEpidSoftCallback.o devEpidFast.o timestampRecord.o throttleRecord.o devTimeOfDay.o
pvHistory.o femto.o delayDo.o delayCmd.o
/usr/bin/ranlib libstd.a
/usr/bin/g++ -o libstd.so -shared -fPIC -Wl,-soname,libstd.so -Wl,-hlibstd.so -L/usr/lib/epics/lib/linux-x86_64 -Wl,-rpath,/usr/lib/epics/lib/linux-x86_64 -m64 scalerRecord.o devScalerAsyn.o
drvScalerSoft.o drvScaler974.o epidRecord.o devEpidSoft.o devEpidSoftCallback.o devEpidFast.o timestampRecord.o throttleRecord.o devTimeOfDay.o pvHistory.o femto.o delayDo.o delayCmd.o -lasyn -lseq -lpv -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtoolsIoc
-lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom -lpthread -lreadline -lm -lrt -ldl -lgcc
Installing shared library ../../../lib/linux-x86_64/libstd.so
mkdir ../../../lib
mkdir ../../../lib/linux-x86_64
Installing library ../../../lib/linux-x86_64/libstd.a
perl /usr/lib/epics/bin/linux-x86_64/registerRecordDeviceDriver.pl ../O.Common/std.dbd std_registerRecordDeviceDriver /epics/iocs/vme-03idc-testing/std > std.tmp
mv std.tmp std_registerRecordDeviceDriver.cpp
/usr/bin/g++ -c -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_X86_64_ -DUNIX -D_BSD_SOURCE -Dlinux -D_REENTRANT -O3 -Wall -m64 -MMD -I. -I../O.Common -I. -I..
-I../../../include/os/Linux -I../../../include -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include std_registerRecordDeviceDriver.cpp
/usr/bin/g++ -c -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_X86_64_ -DUNIX -D_BSD_SOURCE -Dlinux -D_REENTRANT -O3 -Wall -m64 -MMD -I. -I../O.Common -I. -I..
-I../../../include/os/Linux -I../../../include -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include -I/usr/lib/epics/include/os/Linux -I/usr/lib/epics/include ../stdMain.cpp
/usr/bin/g++ -o stdApp -L/usr/lib/epics/lib/linux-x86_64 -Wl,-rpath,/usr/lib/epics/lib/linux-x86_64 -m64 std_registerRecordDeviceDriver.o stdMain.o -lstd -lseq -lpv -lasyn -lrecIoc -lsoftDevIoc
-lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom
std_registerRecordDeviceDriver.o: In function `std_registerRecordDeviceDriver':
std_registerRecordDeviceDriver.cpp:(.text+0xc8): undefined reference to `pvar_func_doAfterIocInitRegistrar'
std_registerRecordDeviceDriver.cpp:(.text+0xd2): undefined reference to `pvar_func_delayDoRegistrar'
std_registerRecordDeviceDriver.o: In function `_GLOBAL__sub_I_std_registerRecordDeviceDriver':
std_registerRecordDeviceDriver.cpp:(.text.startup+0x3a3): undefined reference to `pvar_rset_throttleRSET'
std_registerRecordDeviceDriver.cpp:(.text.startup+0x3b1): undefined reference to `pvar_func_throttleRecordSizeOffset'
collect2: error: ld returned 1 exit status
make[3]: *** [stdApp] Error 1
make[3]: Leaving directory `/epics/iocs/vme-03idc-testing/std/stdApp/src/O.linux-x86_64'
make[2]: *** [install.linux-x86_64] Error 2
make[2]: Leaving directory `/epics/iocs/vme-03idc-testing/std/stdApp/src'
make[1]: *** [src.install] Error 2
make[1]: Leaving directory `/epics/iocs/vme-03idc-testing/std/stdApp'
make: *** [stdApp.install] Error 2
$ ls -lht lib/linux-x86_64/
total 1000K
-r--r--r-- 1 yhu yhu 633K Aug 16 09:36 libstd.a
-r-xr-xr-x 1 yhu yhu 355K Aug 16 09:36 libstd.so
yhu@xf03idc-ioc1:/epics/iocs/vme-03idc-testing/std
Then, I typed “make” again. The built passed and the ioc application “stdApp” was generated. See below. During the second “make”, we can see a new path (-L/epics/iocs/vme-03idc-testing/std/lib/linux-x86_64)
is added and that path is where the generated libraries “libstd.*” are located.
$ make
make -C ./configure install
make[1]: Entering directory `/epics/iocs/vme-03idc-testing/std/configure'
make -C O.linux-x86_64 -f ../Makefile TOP=../.. T_A=linux-x86_64 install
make[2]: Entering directory `/epics/iocs/vme-03idc-testing/std/configure/O.linux-x86_64'
perl /usr/lib/epics/bin/linux-x86_64/convertRelease.pl checkRelease
make[2]: Leaving directory `/epics/iocs/vme-03idc-testing/std/configure/O.linux-x86_64'
make -C O.RTEMS-mvme3100 -f ../Makefile TOP=../.. T_A=RTEMS-mvme3100 install
make[2]: Entering directory `/epics/iocs/vme-03idc-testing/std/configure/O.RTEMS-mvme3100'
perl /usr/lib/epics/bin/linux-x86_64/convertRelease.pl checkRelease
make[2]: Leaving directory `/epics/iocs/vme-03idc-testing/std/configure/O.RTEMS-mvme3100'
make[1]: Leaving directory `/epics/iocs/vme-03idc-testing/std/configure'
make -C ./stdApp install
make[1]: Entering directory `/epics/iocs/vme-03idc-testing/std/stdApp'
make -C ./src install
make[2]: Entering directory `/epics/iocs/vme-03idc-testing/std/stdApp/src'
make -C O.linux-x86_64 -f ../Makefile TOP=../../.. T_A=linux-x86_64 install
make[3]: Entering directory `/epics/iocs/vme-03idc-testing/std/stdApp/src/O.linux-x86_64'
/usr/bin/g++ -o stdApp -L/epics/iocs/vme-03idc-testing/std/lib/linux-x86_64 -L/usr/lib/epics/lib/linux-x86_64 -Wl,-rpath,/epics/iocs/vme-03idc-testing/std/lib/linux-x86_64 -Wl,-rpath,/usr/lib/epics/lib/linux-x86_64
-m64 std_registerRecordDeviceDriver.o stdMain.o -lstd -lseq -lpv -lasyn -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom
Installing script ../../../bin/linux-x86_64/showBurtDiff
mkdir ../../../bin
mkdir ../../../bin/linux-x86_64
Installing script ../../../bin/linux-x86_64/wrapCmd
Installing script ../../../bin/linux-x86_64/wrapper
Installing created file ../../../bin/linux-x86_64/stdApp
make[3]: Leaving directory `/epics/iocs/vme-03idc-testing/std/stdApp/src/O.linux-x86_64'
I guess there must be some changes/improvements on the Base build rules. I searched in tech-talk and tried all kinds of configurations as discussed at
https://epics.anl.gov/tech-talk/2016/msg01063.php, but still could not build the module “std” by the first “make”.
Could anyone tell me how to solve this build problem if I really want to build “std” against base 3.14.12.3?
Best,
Yong Hu
NSLS-II Controls Group