Re: PL compilations ignores LDFLAGS

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL compilations ignores LDFLAGS
Date: 2009-04-23 18:14:19
Message-ID: 1240510459.1275.222.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Tom Lane píše v čt 23. 04. 2009 v 11:42 -0400:
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> > Tom Lane píše v čt 23. 04. 2009 v 11:11 -0400:
> >> What *specific* problem are you having, on what
> >> platform?
>
> > I have problem with setup builfarm member on Solaris 10. I need to pass
> > -R<path> (rpath). I can do it by LD_OPTIONS as we do it for package
> > building. I had only doubt if it is correct behavior.
>
> Well, $(rpath) is included into SHLIB_LINK on every platform, so the
> question is why that's not getting set.

I went through the makefiles and it is set correctly. I expected that
--with-libs automatically adds path into $(rpath), but it is --libdir
what is used. If I run ldd -rU on any libs or pl*.so then I got:

unused search path=/usr/postgres/8.3/lib (RUNPATH/RPATH from file /usr/postgres/8.3/lib/cube.so)
unused search path=/usr/postgres/8.3/lib (RUNPATH/RPATH from file /usr/postgres/8.3/lib/libpgtypes.so)
unused search path=/usr/postgres/8.3/lib (RUNPATH/RPATH from file /usr/postgres/8.3/lib/libpq.so)
unused search path=/usr/postgres/8.3/lib (RUNPATH/RPATH from file /usr/postgres/8.3/lib/pgcrypto.so)
unused search path=/usr/postgres/8.3/lib (RUNPATH/RPATH from file /usr/postgres/8.3/lib/pltcl.so)
unused search path=/usr/postgres/8.3/lib (RUNPATH/RPATH from file /usr/postgres/8.3/lib/sslinfo.so)

Which is wrong. I already discussed this issue with Peter a moth ago
without any result. But I find now that plperl.so override rpathdir and
it could be used in other libs too.

I supposed to do something like this for libpq, libpgtypes and so on.

*** pgsql.orig.d976d4abedca/src/interfaces/libpq/Makefile 2009-04-23 20:07:21.178749132 +0200
--- pgsql.orig/src/interfaces/libpq/Makefile 2009-04-23 20:07:21.194173674 +0200
***************
*** 65,70 ****
--- 65,71 ----
endif

SHLIB_EXPORTS = exports.txt
+ rpath = ""

all: all-lib

For plctl.so I suggest to use path to libtcl.so which can be detect in configure.

Zdenek

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bill Moran 2009-04-23 18:46:49 Re: Why do we let CREATE DATABASE reassign encoding?
Previous Message Heikki Linnakangas 2009-04-23 18:09:25 Re: Why do we let CREATE DATABASE reassign encoding?