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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Asyn 4.8 compile error with Linux GPIB |
From: | Janet Anderson <[email protected]> |
To: | Mark Rivers <[email protected]> |
Cc: | EPICS tech-talk <[email protected]> |
Date: | Tue, 17 Jul 2007 13:48:04 -0500 |
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 beNo, 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 |