Summary: PostgreSQL with GNU readline on HP-UX

From: Giles Lean <giles(at)nemeton(dot)com(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: Summary: PostgreSQL with GNU readline on HP-UX
Date: 2003-01-10 02:27:33
Message-ID: 23216.1042165653@hpchs.cup.hp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi all,

I was contacted off-list about a problem building and running
PostgreSQL on HP-UX using a shared GNU readline library. I'm posting
a summary of the problem and solution so that it is available in the
archives.

The build configuration was PostgreSQL 7.3.1, gcc 3.2, and a shared
library build of readline-4.3. The compiler (gcc or HP ANSI C) and
PostgreSQL versions aren't important. "Out of the box" libreadline
is built as an archive library, and that works too. Only the shared
library build is problematic.

When PostgreSQL is linked with a faulty build of libreadline psql
will dump core at startup:

| /usr/lib/dld.sl: Unresolved symbol: tgetent (code) from
| /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.1/../../../libreadline.sl
| Abort(coredump)

This is caused by the shared library libreadline.sl needing to be
linked with -lcurses.

There are three common ways to install readline on HP-UX:

1. build from GNU source

If built as an archive library (which is the default) there
is no problem.

If a shared library is built the generated shlib/Makefile needs to
be edited after configure is run and before make:

./configure
... edit shlib/Makefile as below ...
make

The change to shlib/Makefile is:

< SHLIB_LIBS =
---
> SHLIB_LIBS = -lcurses

If someone familiar with autoconf and configure can tell me what
the fix to shlib/Makefile.in should be I'd be pleased to hear. I
don't understand autoconf. :-(

2. install the binary depot from the HP-UX Porting and Archive Center

http://hpux.cs.utah.edu

This package (as at 2003-01-10) is built incorrectly. If you
install it I recommend removing /usr/local/lib/libreadline.sl
and /usr/local/lib/libreadline.sl.old. This leaves the working
archive library only.

3. build from the ported source distribution from the HP-UX Porting
and Archive Centre

Unfortunately this package has been munged to install shared
libraries by default. The same fix to shlib/Makefile as documented
in #1 for building a shared library is appropriate.

Regards,

Giles

Browse pgsql-general by date

  From Date Subject
Next Message Williams, Travis L, NPONS 2003-01-10 03:16:57 sequence question
Previous Message Feite Brekeveld 2003-01-09 23:20:39 unsubscribe