From jan@swi.psy.uva.nl Thu Feb 28 11:45:58 2002
Received: from gollem.swi.psy.uva.nl (root@gollem.swi.psy.uva.nl [145.18.152.30])
	by swi.psy.uva.nl (8.11.6/8.11.2) with ESMTP id g1SAjwu05215;
	Thu, 28 Feb 2002 11:45:58 +0100 (MET)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.11.6/8.11.6/SuSE Linux 0.5) id g1SAi4k31180;
	Thu, 28 Feb 2002 11:44:04 +0100
Date: Thu, 28 Feb 2002 11:44:04 +0100
Message-Id: <200202281044.g1SAi4k31180@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: [SWIPL] Mac OS debs
To: Jacobo Myerston <jacunix@cantv.net>, prolog-request@swi.psy.uva.nl
Phone: +31 - 20 - 525 6121
Cc: Paulo Moura <pmoura@noe.ubi.pt>, prolog@swi.psy.uva.nl

> On Wednesday, February 27, 2002, at 07:23 PM, Jacobo Myerston wrote:
> 
> > I already wrote a deb(fink) script for personal use. But there is a 
> > issue with it; Fink has readline 4.2,  and  swi-prolog does not compile 
> > in my box  with this version of readline.   That is what I get 
> > compiling swi-prolog in Fink:
> >
> > cc -c -I. -I. -I./rc -Wall -O2  -no-cpp-precomp pl-rec.c -o pl-rec.o
> > cc -c -I. -I. -I./rc -Wall -O2  -no-cpp-precomp pl-rl.c -o pl-rl.o
> > pl-rl.c: In function `event_hook':
> > pl-rl.c:177: warning: implicit declaration of function `rl_set_prompt'
> > pl-rl.c: In function `Sread_readline':
> > pl-rl.c:269: `rl_readline_state' undeclared (first use in this function)
> > pl-rl.c:269: (Each undeclared identifier is reported only once
> > pl-rl.c:269: for each function it appears in.)
> > pl-rl.c:274: `RL_STATE_INITIALIZED' undeclared (first use in this 
> > function)
> > pl-rl.c: In function `prolog_completion':
> > pl-rl.c:365: warning: implicit declaration of function 
> > `rl_completion_matches'
> > pl-rl.c:366: `rl_filename_completion_function' undeclared (first use in 
> > this function)
> > pl-rl.c:366: warning: assignment makes pointer from integer without a 
> > cast
> > pl-rl.c:369: warning: assignment makes pointer from integer without a 
> > cast
> > make: *** [pl-rl.o] Error 1
> > ### (cd failed, exit code 2
> > Failed: compiling swi-prolog-5.0.2-1 failed
> 
> Strange. I'm compiling the CVS version from some time now with readline 
> 4.2 (compiled by myself from the sources) without any problem. Not sure 
> there is not any warning but it compiles (and seams to work) fine.
> 
> Are you sure that compiler finds the readline library? Any possible path 
> problems?

I think I agree with Paulos observations.  I installed libreadline 4.2a
on my Linux machine and it all configures, builds and runs like a dream.

Things to check:

	* Is there any configure cache around (use make distclean prior
	  to configure)?

	* (My assumption) the library and include files are taken from
	  different versions.  If configure examines the library for
	  symbols, but uses an older version of the include files the
	  above could result.  Do:

		export CIFLAGS=-I/path/to/include
	  	export LDFLAGS=-L/path/lib/lib

	  before running configure

Hope this helps

	--- Jan

