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  <20162017  2018  2019  2020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: Linking agains .so library on linux
From: "Madden, Timothy J." <tmadden@aps.anl.gov>
To: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 20 Jun 2016 17:15:21 +0000
Dear EPICS:


I want to link an IOC against an .so supplied by a vendor. The compile seems to only look for .a type libraries.
Also I notice that on linking, -Bstatic is turned on. (I am using linux).
I have epics base CONFIG_SITE file set to:
SHARED_LIBRARIES=YES

#  Build client objects statically ?
#        must be either YES or NO
#
STATIC_BUILD=NO

This seems like it should work.

How do I get rid of the -Bstatuc on my link, so it will look for .so files on link?

Here is the failing command:

/usr/bin/g++ -o pcoApp -Wl,-Bstatic -L/local/pco/EPICS/base-3.14.12.5/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/areaDetector/ADCameralink/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/areaDetector/ADCore/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/areaDetector/ADPCO/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/asyn4-26/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/autosave-4-7/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/busy-1-3/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/calc-2-8/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/caputRecorder-1-4-2/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/seq-2-2-3/lib/linux-x86_64 -L/local/pco/EPICS/synApps_5_5/support/sscan-2-6-6/lib/linux-x86_64 -L/local/pco/hdf/lib -L/local/pco/sisw/lib64 -L/local/pco/szip/lib -Wl,-rpath,/local/pco/EPICS/base-3.14.12.5/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/areaDetector/ADCameralink/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/areaDetector/ADCore/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/areaDetector/ADPCO/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/asyn4-26/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/autosave-4-7/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/busy-1-3/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/calc-2-8/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/caputRecorder-1-4-2/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/seq-2-2-3/lib/linux-x86_64 -Wl,-rpath,/local/pco/EPICS/synApps_5_5/support/sscan-2-6-6/lib/linux-x86_64 -Wl,-rpath,/local/pco/hdf/lib -Wl,-rpath,/local/pco/sisw/lib64 -Wl,-rpath,/local/pco/szip/lib        -m64                pcoApp_registerRecordDeviceDriver.o pcoAppMain.o   -lpco -lcameralink -lcaputRecorder -lclsersis -lNDPlugin -lADBase -lnetCDF -lNeXus -lcalc -lbusy -lsscan -lautosave -lasyn -lseq -lpv -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom -lhdf5 -lsz -Wl,-Bdynamic -ltiff -ljpeg -lxml2 -lz -lpthread   -lreadline -lm -lrt -ldl -lgcc
/usr/bin/ld: cannot find -lclsersis
collect2: ld returned 1 exit status



Tim Madden
Argonne

Replies:
Re: Linking agains .so library on linux Mark Rivers
Re: Linking agains .so library on linux Andrew Johnson

Navigate by Date:
Prev: RE: seq 2.3.0 with dynamic PV-array assignment? Laznovsky Michael (PSI)
Next: Re: Linking agains .so library on linux Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020 
Navigate by Thread:
Prev: asyn port driver written in Python Wang Xiaoqiang (PSI)
Next: Re: Linking agains .so library on linux Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·