Subject: Re: [SWIPL] Mac OS debs

From: Jan Wielemaker <[email-masked]>
Date: Thu, 28 Feb 2002 11:44:04 +0100

> 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