Thread: libedit on OS X?

libedit on OS X?

From
Tore Halset
Date:
Hello.

Is it possible to compile postgresql-7.4 on Mac OS X with libedit? Mac
OS X Panther has libedit, but postgresql configure script complains
about missing readline.

  - Tore.


Re: libedit on OS X?

From
Tom Lane
Date:
Tore Halset <halset@pvv.ntnu.no> writes:
> Is it possible to compile postgresql-7.4 on Mac OS X with libedit? Mac
> OS X Panther has libedit, but postgresql configure script complains
> about missing readline.

configure looks for libedit too; that case allegedly works on some BSD
variants.  Do you have a complete installation of libedit (headers as
well as library)?  If so, let's see the full trace of configure probing
for this feature ...

            regards, tom lane

Re: libedit on OS X?

From
Tore Halset
Date:
On Dec 7, 2003, at 21:06, Tom Lane wrote:

> configure looks for libedit too; that case allegedly works on some BSD
> variants.  Do you have a complete installation of libedit (headers as
> well as library)?  If so, let's see the full trace of configure probing
> for this feature ...

I am running a standard Mac OS X Panther with developer tools and the
10.3.1 update.

% ls -l /usr/include/*edit*
-r--r--r--  1 root  wheel  5802 13 Sep 02:23 /usr/include/histedit.h
% head -1 /usr/include/histedit.h
/*      $NetBSD: histedit.h,v 1.19 2002/03/18 16:00:54 christos Exp $
*/
% ls -l /usr/lib/*edit*
-rwxr-xr-x  1 root  wheel  85680 24 Sep 08:46 /usr/lib/libedit.2.dylib
lrwxr-xr-x  1 root  wheel     15  6 Oct 16:35 /usr/lib/libedit.dylib ->
libedit.2.dylib

% PATH=$PATH:/usr/local/apache-ant-1.5.4/bin ./configure \
    --prefix=/usr/local/postgresql \
    --with-java --with-rendezvous
[..output removed..]
checking for readline... no
configure: error: readline library not found
If you have readline already installed, see config.log for details on
the
failure.  It is possible the compiler isn't looking in the proper
directory.
Use --without-readline to disable readline support.

I have not included the huge config.log, but it can be viewed at this
URL:
http://www.pvv.ntnu.no/~halset/tmp/20031207-config.log

It tries to link with readline, doesnt find that and tries once more
with libedit. ld report that _readline are undefined. /

  - Tore.


Re: libedit on OS X?

From
Bruce Momjian
Date:
Also, I am thinking we might just ship libedit with PostgreSQL in 7.5
and get rid of the readline dependency.

---------------------------------------------------------------------------

Tore Halset wrote:
> On Dec 7, 2003, at 21:06, Tom Lane wrote:
>
> > configure looks for libedit too; that case allegedly works on some BSD
> > variants.  Do you have a complete installation of libedit (headers as
> > well as library)?  If so, let's see the full trace of configure probing
> > for this feature ...
>
> I am running a standard Mac OS X Panther with developer tools and the
> 10.3.1 update.
>
> % ls -l /usr/include/*edit*
> -r--r--r--  1 root  wheel  5802 13 Sep 02:23 /usr/include/histedit.h
> % head -1 /usr/include/histedit.h
> /*      $NetBSD: histedit.h,v 1.19 2002/03/18 16:00:54 christos Exp $
> */
> % ls -l /usr/lib/*edit*
> -rwxr-xr-x  1 root  wheel  85680 24 Sep 08:46 /usr/lib/libedit.2.dylib
> lrwxr-xr-x  1 root  wheel     15  6 Oct 16:35 /usr/lib/libedit.dylib ->
> libedit.2.dylib
>
> % PATH=$PATH:/usr/local/apache-ant-1.5.4/bin ./configure \
>     --prefix=/usr/local/postgresql \
>     --with-java --with-rendezvous
> [..output removed..]
> checking for readline... no
> configure: error: readline library not found
> If you have readline already installed, see config.log for details on
> the
> failure.  It is possible the compiler isn't looking in the proper
> directory.
> Use --without-readline to disable readline support.
>
> I have not included the huge config.log, but it can be viewed at this
> URL:
> http://www.pvv.ntnu.no/~halset/tmp/20031207-config.log
>
> It tries to link with readline, doesnt find that and tries once more
> with libedit. ld report that _readline are undefined. /
>
>   - Tore.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: libedit on OS X?

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Also, I am thinking we might just ship libedit with PostgreSQL in 7.5
> and get rid of the readline dependency.

You are?  Considering that most of the world has readline, that seems
like a fairly unnecessary bloat of our distribution.

I'm not sure why Tore's case is failing when libedit is reputed to work
for other people ... but I think we ought to find out and fix it, not
offer a brute-force solution of including someone else's library in
our distro.

            regards, tom lane

Re: libedit on OS X?

From
Bruce Momjian
Date:
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Also, I am thinking we might just ship libedit with PostgreSQL in 7.5
> > and get rid of the readline dependency.
>
> You are?  Considering that most of the world has readline, that seems
> like a fairly unnecessary bloat of our distribution.
>
> I'm not sure why Tore's case is failing when libedit is reputed to work
> for other people ... but I think we ought to find out and fix it, not
> offer a brute-force solution of including someone else's library in
> our distro.

I thought we felt libreadline was too fluid an API, and that the GPL
zealots were saying dynamic linking was a violation of the GPL and would
make PostgreSQL GPL too.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: libedit on OS X?

From
Tom Lane
Date:
Tore Halset <halset@pvv.ntnu.no> writes:
> It tries to link with readline, doesnt find that and tries once more
> with libedit. ld report that _readline are undefined. /

I fired up my beta copy of Panther and looked at libedit.  It doesn't
seem to export any of the symbols required to be a plausible readline
substitute --- no readline(), none of the rl_xxx variables, etc.  Nor
are any of the associated header files present.

So, no, you can't use this instead of readline.  I'm a bit confused
why not though, since other people claim to have working configurations
like that.  Perhaps what Apple is shipping is an ancient, un-featureful
version of libedit?  Or something unrelated that happens to have the
same name?

            regards, tom lane

Re: libedit on OS X?

From
Bruce Momjian
Date:
Tom Lane wrote:
> Tore Halset <halset@pvv.ntnu.no> writes:
> > It tries to link with readline, doesnt find that and tries once more
> > with libedit. ld report that _readline are undefined. /
>
> I fired up my beta copy of Panther and looked at libedit.  It doesn't
> seem to export any of the symbols required to be a plausible readline
> substitute --- no readline(), none of the rl_xxx variables, etc.  Nor
> are any of the associated header files present.
>
> So, no, you can't use this instead of readline.  I'm a bit confused
> why not though, since other people claim to have working configurations
> like that.  Perhaps what Apple is shipping is an ancient, un-featureful
> version of libedit?  Or something unrelated that happens to have the
> same name?

That's my guess.  libedit is a pretty generic name.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: libedit on OS X?

From
Peter Eisentraut
Date:
Tom Lane wrote:
> So, no, you can't use this instead of readline.  I'm a bit confused
> why not though, since other people claim to have working
> configurations like that.  Perhaps what Apple is shipping is an
> ancient, un-featureful version of libedit?  Or something unrelated
> that happens to have the same name?

NetBSD has added an explicit readline compatibility layer to its
libedit.  I think that has spread around to some other BSDs, but
apparently not far enough.