Thanks (again) Mark.
I got it to work as long as I copied the libs to my ADPCO/lib/linux_x86_64 dir.
To point the linker to the right dir I am using:
PROD_LDFLAGS +=-Wl,-rpath,/local/pco/sisw/lib64
That path does show up in the final link command, but it cannot find the libs in that dir. How does one tell a directory with PROD_SYS_LIBS?
Make file is like this:
PROD_LDFLAGS +=-Wl,-rpath,/local/pco/sisw/lib64
PROD_LIBS += pco
PROD_LIBS += cameralink caputRecorder
PROD_SYS_LIBS += clsersis display fglib5
The command is like below. The only snag at this point is that I don't know how to point the linker to the proper dir containing the PROD_SYS_LIBs.
Thanks again
T
/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/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/szip/lib -m64 -Wl,-rpath,/local/pco/sisw/lib64 pcoApp_registerRecordDeviceDriver.o pcoAppMain.o -lpco -lcameralink -lcaputRecorder -lNDPlugin -lADBase -lnetCDF -lNeXus -lcalc -lbusy -lsscan -lautosave -lasyn !
-lseq -lpv -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtools!
Ioc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom -lhdf5 -lsz -Wl,-Bdynamic -lclsersis -ldisplay -lfglib5 -ltiff -ljpeg -lxml2 -lz -lpthread -lreadline -lm -lrt -ldl -lgcc
_____________________________
From: Mark Rivers [[email protected]]
Sent: Monday, June 20, 2016 12:18 PM
To: Madden, Timothy J.
Cc: [email protected]
Subject: Re: Linking agains .so library on linux
You need to reference your vendor .so file using PROD_SYS_LIBS not PROD_LIBS.
Mark
Sent from my iPhone
On Jun 20, 2016, at 11:15 AM, Madden, Timothy J. <[email protected]<mailto:[email protected]>> wrote:
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/ADCamer!
alink/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 -lca!
lc -lbusy -lsscan -lautosave -lasyn -lseq -lpv -lrecIoc -lsoft!
DevIoc -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 Andrew Johnson
- References:
- Linking agains .so library on linux Madden, Timothy J.
- Re: Linking agains .so library on linux Mark Rivers
- Navigate by Date:
- Prev:
Re: Linking agains .so library on linux Andrew Johnson
- Next:
Re: Linking agains .so library on linux Andrew Johnson
- 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
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Linking agains .so library on linux Mark Rivers
- Next:
Re: Linking agains .so library on linux Andrew Johnson
- 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
2019
2020
2021
2022
2023
2024
|