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

Subject: Re: Galil device support - static build
From: "Mooney, Tim M. via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, John Dobbins <john.dobbins at cornell.edu>
Date: Mon, 13 Apr 2020 16:03:32 +0000
We found that a systematic way to avoid link problems like this is to list them in opposing order: 
$(DBD_NAME)_DBD
 += stdSupport.dbd
$(PROD_NAME)_LIBS := std $($(PROD_NAME)_LIBS)
For DBD files, a name must be defined before it is referenced.  For LIB files, a name must be referenced before the library containing it is searched.


Tim Mooney (mooney at anl.gov) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of John Dobbins via Tech-talk <tech-talk at aps.anl.gov>
Sent: Monday, April 13, 2020 9:31 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Galil device support - static build
 

All,


Doing a static build of Galil 3-6 device support I ran into the problem described below. Solved by changing order of libraries.


John Dobbins





For static build of Galil 3-6


In galil/3-6/GalilTestApp/src


I changed Makefile from 


GalilTest_LIBS += asyn motor calc sscan autosave busy

GalilTest_LIBS += GalilSupport

GalilTest_LIBS += $(EPICS_BASE_IOC_LIBS)


to


GalilTest_LIBS += GalilSupport

GalilTest_LIBS += asyn motor calc sscan autosave busy

GalilTest_LIBS += $(EPICS_BASE_IOC_LIBS)



because of link error:


/usr/bin/g++ -o GalilTest -Wl,-Bstatic -L/nfs/chess/user/jad22/epics/support/galil/3-6/lib/linux-x86_64 -L/nfs/chess/epics/release/base/base-7.0.2/lib/linux-x86_64 -L/nfs/chess/epics/release/synApps_6_1/support/asyn-R4-38/lib/linux-x86_64 -L/nfs/chess/epics/release/synApps_6_1/support/autosave-R5-10/lib/linux-x86_64 -L/nfs/chess/epics/release/synApps_6_1/support/busy-R1-7-2/lib/linux-x86_64 -L/nfs/chess/epics/release/synApps_6_1/support/calc-R3-7-3/lib/linux-x86_64 -L/nfs/chess/epics/release/synApps_6_1/support/motor-R7-1/lib/linux-x86_64 -L/nfs/chess/epics/release/synApps_6_1/support/sscan-R2-11-3/lib/linux-x86_64            -rdynamic -m64 GalilTest_registerRecordDeviceDriver.o GalilTestMain.o -lasyn -lmotor -lcalc -lsscan -lautosave -lbusy -lGalilSupport -ldbRecStd -ldbCore -lca -lCom -Wl,-Bdynamic -lpthread -lreadline -lm -lrt -ldl -lgcc

/nfs/chess/user/jad22/epics/support/galil/3-6/lib/linux-x86_64/libGalilSupport.a(GalilController.o): In function `GalilCreateAxis':

/nfs/chess/user/jad22/epics/support/galil/3-6/GalilSup/src/O.linux-x86_64/../GalilController.cpp:7242: undefined reference to `findAsynPortDriver(char const*)'


[When you specify multiple inter-dependent static libraries via -l flag  dependents must go first, then their dependencies.]

Replies:
Re: Galil device support - static build Ben Franksen via Tech-talk
References:
Galil device support - static build John Dobbins via Tech-talk

Navigate by Date:
Prev: Re: Filtering messages print on the IOC shell console J. Lewis Muir via Tech-talk
Next: Announcing PVXS Michael Davidsaver via Tech-talk
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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Galil device support - static build John Dobbins via Tech-talk
Next: Re: Galil device support - static build Ben Franksen via Tech-talk
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  <20202021  2022  2023  2024 
ANJ, 14 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·