Re: PSQL anc compile errors - Mailing list pgsql-general

From Tielman J de Villiers
Subject Re: PSQL anc compile errors
Date
Msg-id E1F206EC93DCD4119A05009027A4135906493B@sbssvr.bondnet.co.za
Whole thread Raw
In response to PSQL anc compile errors  (Tielman J de Villiers <tjdevil@bondnet.co.za>)
Responses inserts on views using rules  (Stuart Robinson <stuart@zapata.org>)
Re: PSQL anc compile errors  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Thank you,

I did the following:
[root@dev postgresql-7.1.3]# ldconfig -v | grep 'readline'
        libreadline.so.4.1 -> libreadline.so.4.1
[root@dev postgresql-7.1.3]# ldconfig -v | grep 'history'
        libhistory.so.4.1 -> libhistory.so.4.1

Which, I think, means these two libraries are in the correct path when
compiling psql.

Then, if I go ldd /usr/local/pgsql/bin/psql:
        libpq.so.2 => /usr/local/pgsql/lib/libpq.so.2 (0x40018000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40029000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x40057000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4006a000)
        libdl.so.2 => /lib/libdl.so.2 (0x40081000)
        libm.so.6 => /lib/i686/libm.so.6 (0x40085000)
        libhistory.so.4.1 => /usr/lib/libhistory.so.4.1 (0x400a9000)
        libc.so.6 => /lib/i686/libc.so.6 (0x400b0000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Versus ldd /usr/local/pgsql/bin/psql.6.5.3 (the "old" one, which worked):
        libpq.so.2.0 => /usr/local/pgsql/lib/libpq.so.2.0 (0x40018000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40029000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40057000)
        libdl.so.2 => /lib/libdl.so.2 (0x4006e000)
        libm.so.6 => /lib/i686/libm.so.6 (0x40072000)
        libreadline.so.3 => /usr/lib/libreadline.so.3 (0x40096000)
        libhistory.so.3 => /usr/lib/libhistory.so.3 (0x400bc000)
        libtermcap.so.2 => /lib/libtermcap.so.2 (0x400c3000)
        libncurses.so.4 => /usr/lib/libncurses.so.4 (0x400c7000)
        libc.so.6 => /lib/i686/libc.so.6 (0x40109000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x40239000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Which would mean the new psql was NOT compiled to support readline, as you
correctly suggested.

Any more suggestions, or do I just use the "old" psql?

Tielman J de Villiers
BondNet Pty Ltd

-----Original Message-----
From: Alvaro Herrera [mailto:alvherre@atentus.com]
Sent: Thursday, November 08, 2001 9:14 PM
To: Tom Lane
Cc: Tielman J de Villiers; pgsql-general@postgresql.org
Subject: Re: [GENERAL] PSQL anc compile errors


On Thu, 8 Nov 2001, Tom Lane wrote:

> Tielman J de Villiers <tjdevil@bondnet.co.za> writes:
> > I refer to previous questions/answers with regards to psql not
> > displaying the prompt correctly (ie, as => and NOT =#) and the
> > up/down arrows not
> > working:

> On the other hand, if the up arrow doesn't bring back history, that
> definitely suggests missing or broken libreadline support.  You should
> check whether the shared library loader is loading the right version
> of libreadline.

Try ldd(1) over the psql executable. If libreadline doesn't show up, it
isn't compiled to support it. If it was compiled with libreadline support,
it wouldn't even load if it couldn't find it at runtime.

> (I'm not on a Linux box right now, but IIRC there's some configuration
> file in /etc that controls its search path, and you have to update the
> cached search results after changing the config, too... Our
> installation instructions cover this, I think.)

That'd be /etc/ld.so.conf, and you can reload cached results by means of
ldconfig(8).

--
Alvaro Herrera (<alvherre[@]atentus.com>)
"La gente vulgar solo piensa en pasar el tiempo;
el que tiene talento, en aprovecharlo"

pgsql-general by date:

Previous
From: Einar Karttunen
Date:
Subject: Re: What's the fastest way to do this?
Next
From: "Erol Öz"
Date:
Subject: Ynt: OID's as Primary Keys