Re: Relocatable installs - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Relocatable installs
Date
Msg-id 200405181907.i4IJ7oC09140@candle.pha.pa.us
Whole thread Raw
In response to Re: Relocatable installs  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: Relocatable installs  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Jan Wieck wrote:
> > Static linking of our binaries?  Hmmm.  Makes sense.  We would need a
> > special flag for that.  I can add it to the TODO.
> > 
> > Seems my testing was flawed because I didn't clean out my hard-coded
> > directory properly.  I see now:
> > 
> >     $ bin/initdb
> >     bin/initdb: can't load library 'libpq.so.3'
> > 
> > and I see in my initdb link line:
> > 
> >     -Wl,-rpath,/usr/local/pgsql/lib
> 
> If I remore the whole -rpath thing, and remove the two -L options and 
> the -lpq and -lpgport, and add the libpq.a and libpgport.a explicitly to 
> the linker call, the psql executable on my Linux box grows from 421761 
> to 677682 bytes in size. It is still shared linked against libc, libz, 
> libreadline and a bunch of otheres, but all of them are in /lib or 
> /usr/lib, so they are standard or system libraries. It does not depend 
> on a libpq.so any more, and that is what we want.

We already have --disable-rpath.  Seems we would just need something to
use the *.a files.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Call for 7.5 feature completion
Next
From: Greg Stark
Date:
Subject: Re: Relocatable installs