-----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