Re: libtool and --rpath



lduperval@sprint.ca wrote:
> I have a system where I compile and install programs in one
> directory, and then I link those files to
> /usr/local/{bin,lib,man,...}. It used to work fine until recently
> when I started having problems with ldd not finding (certain) new
> libraries. I narrowed it (I believe) to the use of --rpath in
> libtool. How can I tell libpath to encode -Wl,/usr/local/lib when
> compiling but have it install the actual files elsewhere? Right now,
> I do:
> 
> configure --prefix=/my/dir
> 
> Then I edit the libtool script to put -Wl,/usr/local/lib but I'm sure
> there's a better way to do this. Any help is appreciated.

You need to build the files as if they are to be installed in the place
you want ld.so to see them.  Whether you use `make install', a bunch of
links or a custom program to arrange for them to be present at that
destination is irrelevant.

Try this:
	configure --prefix=/usr/local
	make
	make install prefix=/my/dir
	
and then make your soft links from /usr/local to /my/dir.

I used to do this often with a package manager I used to organize
/usr/local, so I know it works.  IIRC the DESTDIR environment variable
can be used with automake to do something similar.

Cheers,
	Gary V. Vaughan.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]