EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Asyn 4.8 compile error with Linux GPIB
From: "Mark Rivers" <[email protected]>
To: "Janet Anderson" <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Tue, 17 Jul 2007 15:43:57 -0500
So it seems to me that SYS_LIBS IS the appropriate option for libgpib.a, because that normally would reside in one of the linkers default library search paths.
 
Mark
 


From: Janet Anderson [mailto:[email protected]]
Sent: Tuesday, July 17, 2007 1:48 PM
To: Mark Rivers
Cc: Andrew Johnson; EPICS tech-talk
Subject: Re: Asyn 4.8 compile error with Linux GPIB

The difference between SYS_LIBS and LIBS is that users don't have to provide
a  <libname>_DIR in the Makefile for SYS_LIBS libraries and the build rules dont
try to create an -L<dirname>  option for SYS_LIBS libraries. A SYS_LIBS library
is assumed to reside in one of the linker's default library search paths.

Janet



Mark Rivers wrote:
The Application Developer's Guide does not explain the difference
between asyn_LIBS and asyn_SYS_LIBS, except for the order in which they
are passed to the linker.  What is the difference?  I have always used
SYS_LIBS for libraries that are not in the EPICS directories.  I think
one difference is that when building a static application that shareable
versions of SYS_LIBS are still used, while all non SYS_LIBS libraries
are statically built into the binary, right?  Is this documented
anywhere?

Mark


  
-----Original Message-----
From: Andrew Johnson [mailto:[email protected]] 
Sent: Tuesday, July 17, 2007 10:49 AM
To: Mark Rivers
Cc: Jiro Fujita; EPICS tech-talk
Subject: Re: RE: Asyn 4.8 compile error with Linux GPIB

Hi Mark,

    
The line 

asyn_LIBS += gpib

tells the EPICS build system to look for libgpib.a in the EPICS 
directories.  This does not seem to be correct, that is a system 
library, not an EPICS library.  So I think that line should be
      
No, setting asyn_LIBS like that tells the build system to 
link the asyn binary with libgpib (it results in the link 
line having -lgpib added to it). If libgpib is not being 
found you can explicitly tell the build system where it is by 
setting the gpib_DIR variable in the Makefile.  Alternatively 
and more generally you can tell the linker to look in 
/usr/local/lib automatically by listing that directory in 
/etc/ld.so.conf or by creating a file in /etc/ld.so.com.d 
with the appropriate setting.

    
Note, I think that LD_LIBRARY_PATH is used only at run-time to find 
.so files, not when building applications, so I would not expect it 
to work.  
      
Sorry, but you're wrong there too; having LD_LIBRARY_PATH set 
at build-time is actually frowned upon nowadays because if 
it's set at link time its value will be saved in the binary 
and the path re-used at runtime, which is contrary to how 
most Linux package management systems like to work (they 
build in a different location to their final runtime 
location, so their link-time paths will not be valid at runtime).

    
I don't think you have explained how libgpib.a got in the asyn 
tree, if it really is there.
      
I agree, I think that file should be deleted.

- Andrew

    
  


Replies:
Re: Asyn 4.8 compile error with Linux GPIB Andrew Johnson
References:
Re: Asyn 4.8 compile error with Linux GPIB Janet Anderson

Navigate by Date:
Prev: Re: MEDM enum not displaying correctly? Benjamin Franksen
Next: Re: Asyn 4.8 compile error with Linux GPIB Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Asyn 4.8 compile error with Linux GPIB Janet Anderson
Next: Re: Asyn 4.8 compile error with Linux GPIB Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·