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

From Peter Eisentraut
Subject Re: NetBSD 1.4.2/i386 needs to link psql with -ltermcap
Date
Msg-id Pine.LNX.4.30.0103221753090.1208-100000@peter.localdomain
Whole thread Raw
In response to NetBSD 1.4.2/i386 needs to link psql with -ltermcap  (Giles Lean <giles@nemeton.com.au>)
Responses Re: NetBSD 1.4.2/i386 needs to link psql with -ltermcap
List pgsql-bugs
Giles Lean writes:

> 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:

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

This should be detected by configure.  E.g., on my system I get

| checking for readline... yes (-lreadline -ltermcap)

(-lreadline and -ledit are equivalent for computational purposes).
config.log shows:

| configure:3143: checking for readline
| configure:3165: gcc -o conftest -O2 -g     conftest.c -lreadline  1>&5
[ tries without termcap]
| /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libreadline.so: undefined reference to `tgetnum'
[snip]
| configure:3165: gcc -o conftest -O2 -g     conftest.c -lreadline -ltermcap  1>&5
[ tries with termcap, success ]

Can you check around these areas why it doesn't behave as expected?

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Tests randomly failed
Next
From: Peter Eisentraut
Date:
Subject: Re: Tests randomly failed