Re: psql: can't get readline support

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Denis Gantsev <gantsevdenis(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: psql: can't get readline support
Date: 2020-03-25 22:12:19
Message-ID: 16386.1585174339@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Denis Gantsev <gantsevdenis(at)gmail(dot)com> writes:
> Hello psql-novice
> I am trying to compile postgres with readline support, but no luck, even if
> I am pretty sure I have readline available...

You need to look further down than this:

> checking readline/readline.h usability... yes

specifically for a line like

checking for library containing readline... -lreadline

which I imagine is reporting "no" for you.

The most usual cause of this sort of problem is forgetting to install the
devel support package for readline (on most Linuxen you need something
like readline-devel or readline-dev, not just the base readline package).

However, the devel package is usually what provides the .h files too,
so I'm a bit mystified as to what's wrong. Possibly, it'd be informative
to look into config.log to see what the underlying error report is for the
"library containing readline" test.

Also ...

denis ~/CProjects/postgres (REL_12_STABLE) $ pkg-config --libs
readline-L/usr/local/lib -lreadline

... you may need to say explicitly "--with-libraries=/usr/local/lib"
to get configure to look there for the library. The default linker
configuration on Linuxen is not that friendly to putting libraries
outside the system library directory.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Denis Gantsev 2020-03-26 22:34:49 Re: psql: can't get readline support
Previous Message Denis Gantsev 2020-03-25 21:41:35 psql: can't get readline support