Subject: [SWIPL] compile SWI Prolog on cygwin?

From: [email-masked]
Date: Thu, 10 May 2001 15:57:53 -0700

I've attempted to compile pl-4.0.4 under cygwin 1.3.1-1
(the most recent).

Readline gave me a problem, namely, the last part of
the make output was:

----
gcc  -o pl -Lrc pl-atom.o pl-wam.o pl-stream.o pl-error.o pl-arith.o
pl-bag.o pl
-comp.o pl-rc.o pl-dwim.o pl-ext.o pl-file.o pl-flag.o pl-fmt.o pl-funct.o
pl-gc
.o pl-glob.o pl-itf.o pl-list.o pl-load.o pl-modul.o pl-op.o pl-os.o
pl-prims.o
pl-pro.o pl-proc.o pl-prof.o pl-read.o pl-rec.o pl-rl.o pl-setup.o pl-sys.o
pl-t
able.o pl-trace.o pl-util.o pl-wic.o pl-write.o pl-term.o pl-buffer.o
pl-thread.
o pl-xterm.o pl-feature.o pl-ctype.o pl-main.o pl-extend.o frame.o -lrc
-lreadli
ne -lncurses -lm
pl-rl.o(.text+0x1c1):pl-rl.c: undefined reference to `rl_event_hook'
pl-rl.o(.text+0x1ce):pl-rl.c: undefined reference to `rl_event_hook'
collect2: ld returned 1 exit status
make: *** [pl] Error 1

----

This is beyond my depth.  I got it to go past this by monkeying with
the declaration of rl_event_hook, but since I didn't know what I was
doing, I restored the original pl-rl.c, did a make clean, removed
config.cache, and started over with ./configure -disable-readline.

Now I get:

---
ar x `gcc -print-libgcc-file-name` frame.o
gcc  -o pl -Lrc pl-atom.o pl-wam.o pl-stream.o pl-error.o pl-arith.o pl-bag.o pl
-comp.o pl-rc.o pl-dwim.o pl-ext.o pl-file.o pl-flag.o pl-fmt.o pl-funct.o pl-gc
.o pl-glob.o pl-itf.o pl-list.o pl-load.o pl-modul.o pl-op.o pl-os.o pl-prims.o
pl-pro.o pl-proc.o pl-prof.o pl-read.o pl-rec.o pl-rl.o pl-setup.o pl-sys.o pl-t
able.o pl-trace.o pl-util.o pl-wic.o pl-write.o pl-term.o pl-buffer.o pl-thread.
o pl-xterm.o pl-feature.o pl-ctype.o pl-main.o pl-extend.o frame.o -lrc -lncurse
s -lm
./pl -O -o pl.prc -b ../boot/init.pl
[FATAL ERROR:
        mprotect() failed at 0x502d000 for 16384 bytes: Permission denied
]
make: *** [pl.prc] Error 2

---

Any ideas?

By the way, SWI prolog is very impressive.  I always liked it, but
stopped using it sometime ago for reasons I won't try to explain
now :-)

Best regards,

John Velman
[email-masked]