Re: uuid type for postgres

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org, nathan wagner <nw(at)hydaspes(dot)if(dot)org>
Subject: Re: uuid type for postgres
Date: 2005-09-07 19:00:43
Message-ID: 20050907190043.GG5953@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

On Wed, Sep 07, 2005 at 06:48:41PM +0100, Patrick Welche wrote:
> On Wed, Sep 07, 2005 at 09:45:17AM -0700, Josh Berkus wrote:
> > > Nathan wrote:
> >
> > > Quite a list. I wonder what readline is doing there.
> >
> > Readline is for PSQL command completion and history. As for the rest, they
> > are *optional* modules that apparently your RPM builder chose to include; I
> > build from source and my only dependencies are bison, flex, gcc and perl.
>
> Still seems odd to me: I would expect psql to have readline, not postgres.

It's an issue with the linker. I seem to remember that 8.1 uses the
--as-needed flag to ld, which means it will only link the libraries that
each executable actually uses.

Hmm, poking my build, this doesn't seem to be the case:

$ ldd `which postgres`
linux-gate.so.1 => (0xffffe000)
libz.so.1 => /usr/lib/libz.so.1 (0x41c54000)
libreadline.so.5 => /lib/libreadline.so.5 (0xb7f51000)
libcrypt.so.1 => /lib/tls/libcrypt.so.1 (0xb7f23000)
libresolv.so.2 => /lib/tls/libresolv.so.2 (0x41c6a000)
libnsl.so.1 => /lib/tls/libnsl.so.1 (0x41c25000)
libdl.so.2 => /lib/tls/libdl.so.2 (0x4118f000)
libm.so.6 => /lib/tls/libm.so.6 (0x41153000)
libc.so.6 => /lib/tls/libc.so.6 (0x41019000)
libncurses.so.5 => /lib/libncurses.so.5 (0xb7ee0000)
/lib/ld-linux.so.2 (0x41000000)

This is a fairly recent 8.1, maybe post-beta1. Not sure what happened.
I certainly don't see the --as-needed in LDFLAGS:

$ pg_config | grep LDFLA
LDFLAGS = -Wl,-rpath,/pg/install/00orig/lib
LDFLAGS_SL =

--
Alvaro Herrera -- Valdivia, Chile Architect, www.EnterpriseDB.com
"¿Que diferencia tiene para los muertos, los huérfanos, y aquellos que han
perdido su hogar, si la loca destrucción ha sido realizada bajo el nombre
del totalitarismo o del santo nombre de la libertad y la democracia?" (Gandhi)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2005-09-07 19:01:32 Re: PostgreSQL from source using MinGW
Previous Message John DeSoi 2005-09-07 18:56:46 Re: PostgreSQL from source using MinGW

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-09-07 19:45:31 Re: uuid type for postgres
Previous Message Bob Ippolito 2005-09-07 18:47:23 Re: uuid type for postgres