Re: pkglibdir versus libdir?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: pkglibdir versus libdir?
Date: 2003-07-31 09:01:35
Message-ID: Pine.LNX.4.56.0307310942260.1729@krusty.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:

> Peter, I'm a little confused about the difference between the libdir and
> pkglibdir settings created by configure. What's supposed to go where?

libdir is for build-time linkable libraries, anything that you might want
to pass as -lxxx. So typical locations are /usr/lib, /usr/local/lib, or
/usr/local/pgsql/lib. pkglibdir is for dynamically loadable libraries, or
in general any architecture-specific files that don't need to be in a
particular place, the intent being to keep them out of shared directories
like /usr/lib. Typical locations are /usr/lib/postgresql or
/usr/local/lib/postgresql. There is the additional trick that if libdir
already contains the string "postgres", that is, you have already
configured libdir to be a private directory, then pkglibdir is equal to
libdir. This was mainly meant as a transition scheme (from formerly
having everything in libdir); if it's too confusing we can take it out.

> I got a complaint from a Red Hat person that the regression tests failed
> on a 64-bit machine. Some investigation revealed that the problem was
> that plpgsql.so got installed into $libdir while pg_regress.sh expected
> to find it in $pkglibdir.

Umm... from src/pl/plpgsql/src/Makefile:

install: installdirs all
ifeq ($(enable_shared), yes)
$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/plpgsql$(DLSUFFIX)
else
@echo "*****"; \
echo "* PL/pgSQL was not installed due to lack of shared library support."; \
echo "*****"
endif

> (The fact that they were different was an RPM configuration bug, but if
> we are going to have two variables we certainly ought to support their
> being different...) I don't know how to decide which one is wrong.

In an RPM installation they certainly should be different.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-07-31 09:01:45 Re: version mismatch message
Previous Message Oleg Bartunov 2003-07-31 08:59:17 how to dump all tables with pg_dump ?