-ltermcap needed for psql client build on OpenBSD 2.9

Started by Tom Stowellover 24 years ago4 messagesbugs
Jump to latest
#1Tom Stowell
jts@deforest.k12.wi.us

Doing a default ./configure (no additional options) on a freshly installed OpenBSD 2.9 results in a 'psql' binary that isn't linked to termcap. The error looks like this:

$ ./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/librea
dline.so.0.0 at 0x40088964
$

-----snip-----

"_tgetent" is a termcap symbol, and simply appending

-ltermcap

...to the final gcc command during the 'psql' make fixes the problem. This should probably work w/o human intervention, however. :-)

PostgreSQL rocks!

Tom Stowell

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Tom Stowell (#1)
Re: -ltermcap needed for psql client build on OpenBSD 2.9

"Tom Stowell" <jts@deforest.k12.wi.us> writes:

"_tgetent" is a termcap symbol, and simply appending
-ltermcap
...to the final gcc command during the 'psql' make fixes the problem.
This should probably work w/o human intervention, however. :-)

Indeed. The configure script should have deduced the need to do this;
could you look into why it fails to do so on your platform?

regards, tom lane

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Stowell (#1)
Re: -ltermcap needed for psql client build on OpenBSD 2.9

Tom Stowell writes:

"_tgetent" is a termcap symbol, and simply appending

-ltermcap

...to the final gcc command during the 'psql' make fixes the problem. This should probably work w/o human intervention, however. :-)

We have disqualified this as a linker bug pending OS developer feedback.
See NetBSD PR 13486:

http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=13486

No reponses yet. Feel free to post this to an OpenBSD forum.

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Peter Eisentraut (#3)
Re: -ltermcap needed for psql client build on OpenBSD 2.9

Tom Stowell writes:

In the link you gave, it looked like provisions have been made in the
development version of PostgreSQL 7.2 to work around this.

Not that I know of.

Kind of a dumb linker bug... but our *BSD friends seem to think it's a
feature. :-)

We'll have to beat them into submission then. I mean, the simplest thing
in the world would be to link libreadline against -lcurses, so the
dependency is recorded and the users of libreadline won't have to remember
it.

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter