Bill Allombert on Mon, 2 Jun 2003 20:50:49 +0200

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

Re: . in the library path

On Mon, Jun 02, 2003 at 02:05:24PM -0400, Igor Schein wrote:
> Hi,
> I noticed that during the configure stage when locatelib searches the
> path to locate a shared library, '.' is relative to config directory,
> while during the linking stage, it's relative to Oxxx-xxx directory.
> This inconsistency comes into play when you try to build on a machine
> which 
> a) is missing some shared library links on which pari (unfortunately,
> IMO) relies

I do not understand. PARI/GP should build fine without readline/X11
etc... Is there a Configure bug ?

> b) you don't have root access on 
> c) you don't want ( for whatever reason ) to recompile readline and ncurses 
> Here're the steps I had to do on a SuSe machine which satisfies all 3
> conditions above:
> % ln -s /lib/ config/
> % ln -s /lib/ config/
> % env CC="gcc -L../config" ./Configure --with-readline-include=/tmp/readline-4.3
> I still had to download the readline distribution for include files
> So this additional -L../config is the hack which was needed.
> Any comment?  Any cleaner solutions?

Use an absolute path! Relying on relative path is seldom safe.

dpkg allow to extract .deb packages in a directory.
So I unpack libreadline-dev in $HOME/deb and then use
./Configure --with-readline=$HOME/deb/usr

This works also for libreadline, if librealine is not installed.

I suppose rpm has similar feature (--prefix ?).