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  <20182019  2020  2021  2022  2023  2024  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Build "std" against base 3.14.12.3
From: Mark Rivers <[email protected]>
To: "'Hu, Yong'" <[email protected]>, "[email protected]" <[email protected]>
Date: Thu, 16 Aug 2018 19:03:16 +0000

Hi,

 

What version of std are you checkout out from git?  The master branch or a particular tag?

 

Ø  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 problem is that the Debian distribution also includes std.  What version of std is in your Debian distribution?

 

It is tricky to try to use a new version of std when there is already a version of std in the Debian distribution. 

 

This is the command that is giving you an error:

 

/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'

 

This command is building a test application.  But note where it is searching for libraries: it is only searching in /usr/lib/epics/lib/linux-x86_64.  That is the location of the Debian distribution libraries.  So your problem is understandable, it is only finding the Debian version of libstd.so, not the version you just built in the std/ directory tree.  You have a dbd file that defines the new functions like pvar_func_doAfterIocInitRegistrar, but the old std library in Debian does not contain these.

 

What you have in std/configure/RELEASE?

 

It is possible to mix Debian libraries with newly-compiled libraries, but it is tricky.  You may find it easier to build everything from source, and not try to use the Debian packages when you need to replace one of them.

 

Mark

 

 

 

From: [email protected] <[email protected]> On Behalf Of Hu, Yong
Sent: Thursday, August 16, 2018 9:41 AM
To: [email protected]
Subject: Build "std" against base 3.14.12.3

 

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

 


References:
Build "std" against base 3.14.12.3 Hu, Yong

Navigate by Date:
Prev: Postdoc Position Opening at APS, ID Design and Tuning Xu, Joseph
Next: a simple question about pyepics 梁雅翔
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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Build "std" against base 3.14.12.3 Hu, Yong
Next: Postdoc Position Opening at APS, ID Design and Tuning Xu, Joseph
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  <20182019  2020  2021  2022  2023  2024 
ANJ, 18 Aug 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·