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

Subject: Re: Linking agains .so library on linux
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Mon, 20 Jun 2016 12:35:41 -0500
Hi Tim,

On 06/20/2016 12:15 PM, Madden, Timothy J. wrote:
> 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?

I don't see how you're still getting the -Wl,-Bstatic flag with the
above CONFIG_SITE file, unless something else is overriding the setting
STATIC_BUILD=NO such as your application's own configure/CONFIG_SITE file.

Mark's suggestion that you should use PROD_SYS_LIBS instead of PROD_LIBS
to link this vendor library is correct and may help, but doesn't explain
the above issue.

- Andrew


> 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

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

References:
Linking agains .so library on linux Madden, Timothy J.

Navigate by Date:
Prev: Re: Linking agains .so library on linux Mark Rivers
Next: RE: Linking agains .so library on linux Madden, Timothy J.
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  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Linking agains .so library on linux Andrew Johnson
Next: IOCs under procServ as system services under systemd? Ralph Lange
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  2021  2022  2023  2024 
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 ·