Re: [PATCHES] Linking on AIX (Was: Fix linking of OpenLDAP libraries )

Lists: pgsql-hackers
From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Rocco Altier *EXTERN*" <RoccoA(at)Routescape(dot)com>, "Tom Lane *EXTERN*" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Linking on AIX (Was: Fix linking of OpenLDAP libraries )
Date: 2006-09-13 15:51:12
Message-ID: 52EF20B2E3209443BC37736D00C3C1380A592D03@EXADV1.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> The patch did not work for me :-(
>
> My buildfarm members failed in local testing to execute the
> install-check, because initdb failed to find libpq.so.
>
> Make check did succeed, so I think there is a possibility of
> getting it
> working, but it won't be as simple as adding -brtl to the template.

I suspect that up to now the buildfarm had a static build of
PostgreSQL. What is the output of 'ldd initdb' when it builds
and runs correctly?

Is libpq.so in a non-standard directory? If yes, one either
has to export LIBPATH in the environment or link with
-L/location/of/libpq for the executable to find it
(similar to RPATH in Linux).

Yours,
Laurenz Albe


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
Cc: "Rocco Altier *EXTERN*" <RoccoA(at)Routescape(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] Linking on AIX (Was: Fix linking of OpenLDAP libraries )
Date: 2006-09-13 22:18:14
Message-ID: 18130.1158185894@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at> writes:
>> The patch did not work for me :-(

> Is libpq.so in a non-standard directory? If yes, one either
> has to export LIBPATH in the environment or link with
> -L/location/of/libpq for the executable to find it
> (similar to RPATH in Linux).

libpq will definitely be in a nonstandard directory in buildfarm usage.
It sounds like we should add the local equivalent of RPATH for AIX.

Now I'm pretty dubious that -L is what we want --- -L should have the
semantics of "this is where to find the library right now". RPATH is
used to point to an expected installation directory that might not
contain the library at the time of linking ... or worse, might contain
an old incompatible version of it. Does AIX have a true RPATH
equivalent?

regards, tom lane