Re: psql: can't get readline support

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

On Wed, 25 Mar 2020 at 23:12, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

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

Hi Tom,
Thanks for help, I solved my issue... Which was indeed related with my own
environment.
I looked more thoroughly into compilation log, which helped: I kept using
the wrong binary. Also,
I had multiple readline installed (from sources), that added to confusion.

Regards
Denis

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message gmail Vladimir Koković 2020-03-28 13:21:39 chr(3) and 3::text
Previous Message Tom Lane 2020-03-25 22:12:19 Re: psql: can't get readline support