[OPEN-ILS-DEV] PATCH: link with -rpath (was: LD_LIBRARY_PATH Discussion)

Dan Scott denials at gmail.com
Mon May 28 22:22:14 EDT 2007


On 14/05/07, Jeroen Ruigrok van der Werven <asmodai at in-nomine.org> wrote:
> -On [20070514 21:10], Dan Wells (dbw2 at calvin.edu) wrote:
> >The alternative variables I listed were from Mac dlopen man page, sorry about
> >that.  I guess that shows they are not exactly standard...
>
> LD_LIBRARY_PATH is pretty universal nowadays.
>
> --
> Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
> イェルーン ラウフロック ヴァン デル ウェルヴェン
> http://www.in-nomine.org/ | http://www.rangaku.org/
> If you are not happy here and now, you never will be...
>

Based on the preceding discussion, as well as a rehash of the
discussion tonight with Mike on IRC, here's a little patch that uses
the -rpath linker option to prevent users from either having to
specify LD_LIBRARY_PATH or the full path to the shared object in the
<implementation> elements of opensrf.xml for C applications.

Tested against HEAD with great success :)

Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I have
the right to submit it under the open source license indicated in the
file; or
(b) The contribution is based upon previous work that, to the best of
my knowledge, is covered under an appropriate open source license and
I have the right under that license to submit that work with
modifications, whether created in whole or in part by me, under the
same open source license (unless I am permitted to submit under a
different license), as indicated in the file; or
(c) The contribution was provided directly to me by some other person
who certified (a), (b) or (c) and I have not modified it; and
(d) In the case of each of (a), (b), or (c), I understand and agree
that this project and the contribution are public and that a record of
the contribution (including all personal information I submit with it,
including my sign-off) is maintained indefinitely and may be
redistributed consistent with this project or the open source license
indicated in the file.

-- 
Dan Scott
Laurentian University
-------------- next part --------------
Index: OpenSRF/src/Makefile
===================================================================
RCS file: /cvs/ILS/OpenSRF/src/Makefile,v
retrieving revision 1.45
diff -c -r1.45 Makefile
*** OpenSRF/src/Makefile	23 Mar 2007 14:12:46 -0000	1.45
--- OpenSRF/src/Makefile	29 May 2007 02:16:28 -0000
***************
*** 9,15 ****
  export INCLUDEDIR		= $(PREFIX)/include
  
  export LDLIBS			+= 
! export LDFLAGS			+= -L $(TMPDIR) -L . -L /opt/lib
  export CFLAGS			+= -pipe -g -Wall -O2 -fPIC -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) \
  								-I$(LIBXML2_HEADERS)/libxml  -I$(TMP) \
  								-I$(APR_HEADERS) -I$(TMPDIR)
--- 9,15 ----
  export INCLUDEDIR		= $(PREFIX)/include
  
  export LDLIBS			+= 
! export LDFLAGS			+= -Wl,-rpath=$(LIBDIR) -L $(TMPDIR) -L . -L /opt/lib
  export CFLAGS			+= -pipe -g -Wall -O2 -fPIC -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) \
  								-I$(LIBXML2_HEADERS)/libxml  -I$(TMP) \
  								-I$(APR_HEADERS) -I$(TMPDIR)


More information about the Open-ils-dev mailing list