Re: foreign key from array element - Mailing list pgsql-general

From Rafal Pietrak
Subject Re: foreign key from array element
Date
Msg-id 1348085135.21898.301.camel@localhost.localdomain
Whole thread Raw
In response to Re: foreign key from array element  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Tue, 2012-09-18 at 18:39 -0400, Tom Lane wrote:
> Rafal Pietrak <rafal@zorro.isa-geek.com> writes:
> > postmaster/postmaster.o: In function `PostmasterMain':^M
> > postmaster.c:(.text+0x4bc8): undefined reference to `optreset'^M
> > tcop/postgres.o: In function `process_postgres_switches':^M
> > postgres.c:(.text+0x1422): undefined reference to `optreset'^M
> > utils/misc/ps_status.o: In function `set_ps_display':^M
> > ps_status.c:(.text+0xd4): undefined reference to `setproctitle'^M
> > collect2: ld returned 1 exit status^M
> > make[2]: *** [postgres] Error 1^M
>
> We've heard of this happening as a result of libedit pulling in libbsd,
> which provides (broken) versions of these symbols and thus confuses
> configure into thinking they're present.  The "-ledit" in your link line
> suggests that you are linking to libedit, but the rest of that is just
> guesswork.  I'd suggest installing readline to see if the problem goes
> away.
>
> Here's a previous report:
> http://archives.postgresql.org/pgsql-general/2011-11/msg00790.php
>
>             regards, tom lane

Thenx. The readline trail worked for me too, but in a somewhat different
way (I haven't read the full thread before trying):

1. in my case: this is debian-squeeze, not ubuntu; but this should not
really matter.

2. initially, I've pulled all the build dependencies for postgresql-8.4,
as they are in debian source package. This installed libedit-dev, and
consequently my initial failure.

3. so after having this libedit/readline hint, I've purged libedit-dev,
and installed readline6-dev instead (didn't have to build it from
sources).

4. this didn't help

5. but running ./configure --with-readline did. and the build ended up
cleanly.

What puzzles me, is that in "configure.in:675", the selection of libedit
v.s. readline is commented with a timemark dated 2004 - since then
things should have changed in those libs, shouldn't they? And then, the
comment proceeds a test which is only taken on win32 architecture, but
then follows libedit preference for everybody. Was this libedit/readline
issue just the case for win32? and is it still valid?

-R



pgsql-general by date:

Previous
From: Mike Roest
Date:
Subject: Re: initial sync of multiple streaming slaves simultaneously
Next
From: hubert depesz lubaczewski
Date:
Subject: Why csvlog logs contexts without leading tab?