Обсуждение: Re: [PORTS] Failed install - libgen.so doesn't exist

Поиск
Список
Период
Сортировка

Re: [PORTS] Failed install - libgen.so doesn't exist

От
Peter Eisentraut
Дата:
Tom Lane wrote:
> should be working towards a project policy that AC_CHECK_LIB calls
> shalt not use "main", but must name some symbol exported by the
> expected library. If we can't find out what symbols the library is
> expected to provide, it's time to dike it out.

I took a first swing at this and rearranged some of these calls.

A couple of other findings:

nsl -- This might contain socket functions on some older platforms.

ipc, IPC, lc -- unknown

ld -- On AIX at least this seems to be some magic library but doesn't 
have an obvious testable symbol.

compat -- could be anything, obviously

bsd, BSD -- I seem to recall that these and possibly compat are used by 
Solaris to switch to BSD semantics on certain functions, but I don't 
think we rely on that (anymore).

gen -- "generic" or "general", so this could be a lot, but it might 
contain syslog on some platforms at least.

PW -- might be a compatibility library but none of the functions I found 
are used by PostgreSQL.

resolv -- I don't think we need that.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


Re: [PORTS] Failed install - libgen.so doesn't exist

От
Martijn van Oosterhout
Дата:
On Sat, Feb 04, 2006 at 01:54:52AM +0100, Peter Eisentraut wrote:
> I took a first swing at this and rearranged some of these calls.

Cool. I actually went through a while ago trying to work out which
libraries were needed for which platforms. Comments below.

> A couple of other findings:
>
> nsl -- This might contain socket functions on some older platforms.

This appears to always be paired with -lsocket on solaris and svr4. In
theory -lsocket should pull in -lnsl automatically but maybe there are
linker issues.

> ipc, IPC, lc -- unknown

-lipc was apparently for bsdi, nextstep. Don't know about the others.

> ld -- On AIX at least this seems to be some magic library but doesn't
> have an obvious testable symbol.

Indeed, appears to be AIX only.

> compat -- could be anything, obviously

I have it listed as only needed for PRE_BSDI_2_1. I don't really know
though.

> bsd, BSD -- I seem to recall that these and possibly compat are used by
> Solaris to switch to BSD semantics on certain functions, but I don't
> think we rely on that (anymore).

Apparently -lbsd is used on AIX but it contains pow() which is the
wrong one (the comment wasn't clear). -lBSD was for hpux. Linux used to
use it but not anymore.

> gen -- "generic" or "general", so this could be a lot, but it might
> contain syslog on some platforms at least.

No info on this one.

> PW -- might be a compatibility library but none of the functions I found
> are used by PostgreSQL.

Listed for old SCO. No idea what for though.

> resolv -- I don't think we need that.

Probably included because some other library required it but didn't
include it in its link line, requiring every user of the library to do
it. The same way -ltermcap is required on a default -lreadline install.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Re: [PORTS] Failed install - libgen.so doesn't exist

От
Bruce Momjian
Дата:
Martijn van Oosterhout wrote:
> > compat -- could be anything, obviously
> 
> I have it listed as only needed for PRE_BSDI_2_1. I don't really know
> though.

We can drop support for pre-2.1 BSDI.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


Re: [PORTS] Failed install - libgen.so doesn't exist

От
Chris Browne
Дата:
kleptog@svana.org (Martijn van Oosterhout) writes:
> On Sat, Feb 04, 2006 at 01:54:52AM +0100, Peter Eisentraut wrote:
>> I took a first swing at this and rearranged some of these calls.
>
>> ld -- On AIX at least this seems to be some magic library but doesn't 
>> have an obvious testable symbol.
>
> Indeed, appears to be AIX only.

Further, it appears to be AIX pre-4.3 only, when using it for dlopen()
replacement...

It would be an attractive idea to have configure detect not whether
it's open, but rather whether it is needed, and leave it out for AIX
4.3 and "better"...

> Apparently -lbsd is used on AIX but it contains pow() which is the
> wrong one (the comment wasn't clear). -lBSD was for hpux. Linux used to
> use it but not anymore.

Seneca didn't notice it being picked up; it may be that it is only
detected and used on old versions of AIX...

>> PW -- might be a compatibility library but none of the functions I found 
>> are used by PostgreSQL.
>
> Listed for old SCO. No idea what for though.

Apparently this is for compatibility with the AT&T Programmers
Workbench toolkit; probably not too relevant to anyone these days...

On AIX, it gets detected, but functions are never used.  I'll bet the
same is true on some other platforms (Solaris, HP/UX, and such).
-- 
"cbbrowne","@","acm.org"
http://cbbrowne.com/info/nonrdbms.html
Smith's Test for Artificial Life:
When animal-rights activists and right-to-life protesters are marching
outside your laboratory, then you know you've definitely made progress
in your artificial life research.  -- Donald A. Smith


Re: [PORTS] Failed install - libgen.so doesn't exist

От
Martijn van Oosterhout
Дата:
On Mon, Feb 06, 2006 at 04:45:11PM -0500, Chris Browne wrote:
> Further, it appears to be AIX pre-4.3 only, when using it for dlopen()
> replacement...
>
> It would be an attractive idea to have configure detect not whether
> it's open, but rather whether it is needed, and leave it out for AIX
> 4.3 and "better"...

That's kinda the point of these discussions, to answer the question:
what is in those libraries we need? Which symbol did we want? Rather
than trying to detect versions, is there some change in the library
(added or removed symbol) that we can base our decision on?

Does that library (ld) actually provide dlopen() or something else?

Thanks for the info.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Re: [PORTS] Failed install - libgen.so doesn't exist

От
Seneca Cunningham
Дата:
Martijn van Oosterhout wrote:
> On Mon, Feb 06, 2006 at 04:45:11PM -0500, Chris Browne wrote:
> 
>>Further, it appears to be AIX pre-4.3 only, when using it for dlopen()
>>replacement...
>>
>>It would be an attractive idea to have configure detect not whether
>>it's open, but rather whether it is needed, and leave it out for AIX
>>4.3 and "better"...
> 
> 
> That's kinda the point of these discussions, to answer the question:
> what is in those libraries we need? Which symbol did we want? Rather
> than trying to detect versions, is there some change in the library
> (added or removed symbol) that we can base our decision on?
> 
> Does that library (ld) actually provide dlopen() or something else?

libld.a does not provide dlopen(), libdl.a does.  libld.a provides
functions like ldopen() needed by src/backend/port/dynloader/aix.c for
the dl*() substitutes built on AIX versions that lack dlopen and
libdl.a, which appears to be versions prior to 4.3.

-- 
Seneca Cunningham
scunning@ca.afilias.info


Re: [PORTS] Failed install - libgen.so doesn't exist

От
Martijn van Oosterhout
Дата:
On Tue, Feb 07, 2006 at 10:04:38AM -0500, Seneca Cunningham wrote:
> libld.a does not provide dlopen(), libdl.a does.  libld.a provides
> functions like ldopen() needed by src/backend/port/dynloader/aix.c for
> the dl*() substitutes built on AIX versions that lack dlopen and
> libdl.a, which appears to be versions prior to 4.3.

Right, so the configure test should be (sample):

if ! HAVE_DLOPEN then AC_CHECK_LIB(ld, load)
fi

So it only tries to look for -lld if it can't find dlopen elsewhere...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Re: [PORTS] Failed install - libgen.so doesn't exist

От
Tom Lane
Дата:
> Martijn van Oosterhout wrote:
>> That's kinda the point of these discussions, to answer the question:
>> what is in those libraries we need? Which symbol did we want? Rather
>> than trying to detect versions, is there some change in the library
>> (added or removed symbol) that we can base our decision on?

I finally got around to investigating this on HPUX, which has three of
the libraries we are wondering about: libPW, libBSD, libld.

libPW includes nothing we need.  It contains alloca(), which I think we
once used, but not anymore.

libBSD includes a 4.2BSD-compatible version of signal(), which we aren't
invoking anymore because we HAVE_POSIX_SIGNALS on this platform.  The
HPUX man page deprecates the use of this library altogether.

libld includes a bunch of functions that have no man pages, but look
like they are intended to manipulate .a-style libraries: ldopen,
ldnextofile, etc.  The only references I can find to them in our
source code are in backend/port/dynloader/aix.c.

I recommend we remove libPW and libBSD from configure's list, and
modify the libld entry to probe for "ldopen".  I've confirmed we
build and pass regression on HPUX without these.

Also, since libgen is the thing that started this thread, why don't we
remove that too and see what happens?
        regards, tom lane