NetBSD 1.4.2/i386 needs to link psql with -ltermcap - Mailing list pgsql-bugs

From Giles Lean
Subject NetBSD 1.4.2/i386 needs to link psql with -ltermcap
Date
Msg-id 25084.985249338@nemeton.com.au
Whole thread Raw
Responses Re: NetBSD 1.4.2/i386 needs to link psql with -ltermcap
List pgsql-bugs
[ Slightly edited take #2: I wasn't subscribed (again :-() to the
  -bugs list.  Moderator -- you can kill any postings of mine in the
  queue, if you care to. :-]

Hi,

Today I built postgresql-7.1beta6 on NetBSD-1.4.2/i386, which uses
a.out binary format.  (NetBSD 1.5/i386 uses ELF.)

I found that psql needs to be linked with -ltermcap or else psql will
fail with a runtime error when used interactively:

$ psql ...
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

/usr/libexec/ld.so: Undefined symbol "_tgetent" called from psql:/usr/lib/libedit.so.2.2 at 0x400892ac

I added -ltermcap to the "LIBS = ..." line in Makefile.global and
rebuilt psql after which it worked without problems.

Builds on NetBSD-1.5/i386 and NetBSD-1.5/alpha included -ltermcap in
LIBS automatically.

Thanks to those who enabled libedit -- history editing is nice.

Regards,

Giles

pgsql-bugs by date:

Previous
From: Richard Ellis
Date:
Subject: 7.0.3 postmaster memory leak with aborted transactions
Next
From: Giles Lean
Date:
Subject: 7.1beta6 on NetBSD-1.5/i386 fails geometry test in 'make check'