Re: Problems with Perl

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Kevin O'Gorman" <kogorman(at)pacbell(dot)net>, PGSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problems with Perl
Date: 2000-11-10 22:55:29
Message-ID: Pine.LNX.4.21.0011102324150.775-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:

> A bigger problem is that if interfaces/perl5 builds itself to refer to
> an installed libpq to begin with, there'll be no way to run its selftest
> without installing libpq first.

Actually, there are only a few platforms where this does work at all,
namely on AIX, FreeBSD <2.2, HPUX, SunOS 4, and Unixware 2. (information
decoded from Libtool sources) These platforms record the path where the
library was originally found. On all other platforms, shared libraries
are only searched in explicitly specified locations ("rpath") or some
default places (/usr/lib), *not* in the place it was found at link-time.

Furthermore, in order to run the self-test you need a running postmaster,
and you probably have libpq installed by the time you have a postmaster
up.

> The real issue here is that make install builds new files in the source
> tree. Perhaps "make install" should do a "make clean" after rebuilding
> and installing.

Building new files during install is certainly unclean, but the real
problem is that you need to be root to install the Perl module, but not
for the rest (necessarily), so the rebuilt files are root-owned. Running
clean after install ought to work, but we could probably do better.

In fact, it would generally be better to get the rpath in there for any
platform, because otherwise we're back to ground zero where people need to
set up LD_LIBRARY_PATH in order for the Perl module to work.

> Bear in mind that if we ever start using libtool, we will have this
> problem all over the tree, not just in interfaces/perl5. At least on
> HPUX, libtool's standard behavior is to relink just before install.
> I would imagine that the other platforms with rpath capability would
> do the same thing. So a perl-only solution may be pointless.

On my system (Linux) and on FreeBSD 4.1.1 (hub.org) libtool does exactly
what our code does: it installs the library file and creates two
symlinks. Relinking will only happen on the platforms listed above.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-11-10 23:20:18 Re: Horology failure on UW711/cc...
Previous Message Larry Rosenman 2000-11-10 22:55:12 NEW Inet/Cidr