Обсуждение: libreadline and Debian 5 - not missing just badly named

Поиск
Список
Период
Сортировка

libreadline and Debian 5 - not missing just badly named

От
"J. Bagg"
Дата:
I've just had the common problem with not finding the readline library
while compiling/linking 8.4.4 on a new linux (Debian 5 - lenny). Nothing
seemed to work: --with-libraries=/lib and pointing CFLAGs there all
failed to find readline. The installed packages though said that it was
present.

The problem was that this linux had libreadline.so.5.2 with the symlink
libreadline.so.5 not libreadline.so. In other words the link had too
specific a name for the configure checks.

Simple solution: create the correct symlink - libreadline.so

Also needed a similar fix for libz.

It may be a problem with some *nixes, or versions, or with the
particular packages installed/not installed.

Janet

Re: libreadline and Debian 5 - not missing just badly named

От
Tom Lane
Дата:
"J. Bagg" <j.bagg@kent.ac.uk> writes:
> I've just had the common problem with not finding the readline library
> while compiling/linking 8.4.4 on a new linux (Debian 5 - lenny). Nothing
> seemed to work: --with-libraries=/lib and pointing CFLAGs there all
> failed to find readline. The installed packages though said that it was
> present.

> The problem was that this linux had libreadline.so.5.2 with the symlink
> libreadline.so.5 not libreadline.so. In other words the link had too
> specific a name for the configure checks.

> Simple solution: create the correct symlink - libreadline.so

On Red Hat distributions, what lack of a .so symlink means is that you
forgot to install the readline-devel subpackage (or in general, the
-devel subpackage for whatever library is involved).  I believe Debian
uses a similar convention.

The -devel package also generally carries the include files (.h files)
you need to compile anything using the library, so I'd sort of expect
that you don't get too much further with just a manually created symlink.

            regards, tom lane

Re: libreadline and Debian 5 - not missing just badly named

От
Stephen Frost
Дата:
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> "J. Bagg" <j.bagg@kent.ac.uk> writes:
> > I've just had the common problem with not finding the readline library
> > while compiling/linking 8.4.4 on a new linux (Debian 5 - lenny). Nothing
> > seemed to work: --with-libraries=/lib and pointing CFLAGs there all
> > failed to find readline. The installed packages though said that it was
> > present.
>
> > The problem was that this linux had libreadline.so.5.2 with the symlink
> > libreadline.so.5 not libreadline.so. In other words the link had too
> > specific a name for the configure checks.
>
> > Simple solution: create the correct symlink - libreadline.so
>
> On Red Hat distributions, what lack of a .so symlink means is that you
> forgot to install the readline-devel subpackage (or in general, the
> -devel subpackage for whatever library is involved).  I believe Debian
> uses a similar convention.
>
> The -devel package also generally carries the include files (.h files)
> you need to compile anything using the library, so I'd sort of expect
> that you don't get too much further with just a manually created symlink.

Exactly.  On Debian, the package you're looking for is libreadline5-dev.

    Thanks,

        Stephen

Вложения

Re: libreadline and Debian 5 - not missing just badly named

От
"J. Bagg"
Дата:
Thanks for the pointer to the correct packages. I didn't realise that
the dev versions had the generic libs but, yes, you do need them for the
headers anyway.

Apologies for wasting time.

J


Re: libreadline and Debian 5 - not missing just badly named

От
Dimitri Fontaine
Дата:
"J. Bagg" <j.bagg@kent.ac.uk> writes:
> I've just had the common problem with not finding the readline library while
> compiling/linking 8.4.4 on a new linux (Debian 5 - lenny).

Tried:

  apt-get build-dep postgresql-8.4

That command will install all what you need to compile your own
PostgreSQL. Some will add "and some more", because it will care for doc
building dependencies to.

Regards,
--
dim

Re: libreadline and Debian 5 - not missing just badly named

От
"J. Bagg"
Дата:
Thanks Dim,

I didn't realise they had that package - probably because I tend to skim
over the PostgreSQL related ones, assuming they're connected with the
ready-built version. A good lesson for me.

I'm new to Debian - just switched from Red Hat as Fedora seems to be
getting monstrous and too user oriented (the machine is a small server,
mostly used headless).

J

Re: libreadline and Debian 5 - not missing just badly named

От
Adrian von Bidder
Дата:
On Thursday 03 June 2010 20.03:19 J. Bagg wrote:
> because I tend to skim
> over the PostgreSQL related ones, assuming they're connected with the
> ready-built version.

I'm just curious: why are you compiling your own?

If you want to stick with lenny and need 8.4: It's in backports.org (package
posgtgresql-8.4).  On the other hand, squeeze (what is to become the next
Debian version any month now) is already quite stable, so you could update
to squeeze.

If you need some extensions or contrib modules: have you looked through all
pstgres packages, the postgresql-8.3 (or postgresql) packages only pull in a
core set, additional stuff is packaged, and to compile you own extensions,
just install postgresql-server-dev-8.4.

(Of course there are valid reasons to compile your own, but for me as a pg
user and not developer, I've not met them in a long time...)

cheers
-- vbi

--
Umlaut Zebra über alles!

Вложения