Subject: [clisp-list] Error building MIT CLX under Linux

From: Paolo Amoroso <[email-masked]>
Date: Thu, 07 Jun 2001 09:23:58 +0200

With CLISP versions before 2.26, but I haven't tried 2.25, besides the base
and full images (with NCLX) I also built a base image with MIT CLX. After
building and installing the first two images from the source distribution,
I moved to modules/clx/mit-clx and run make on Makefile.clisp, possibly
setting the value of `prefix' in the makefile.

I have tried doing the same with CLISP 2.26 (released 2001-05-23, built
3200841159) under Red Hat Linux 6.2. The base and full (with NCLX) images
are correctly built, and the system passes both `make test' and `make
testsuite'. Here are the configuration options:

--prefix=/usr/local/clisp --with-readline --with-gettext --with-dynamic-ffi
--with-export-syscalls --with-module-wildcard --with-module-regexp
--with-module=bindings/linuxlibc6

But when I run make in modules/clx/mit-clx, compilation aborts with the
error:

[~/clisp-2.26/modules/clx/mit-clx]$ make -f Makefile.clisp 
clisp -q -c defsystem
;; Loading file /home/paolo/.clisprc ...
;; Loading of file /home/paolo/.clisprc is finished.
Compiling file /home/paolo/clisp-2.26/modules/clx/mit-clx/defsystem.lisp
...
WARNING in function COMPILE-CLX in lines 47..452 :
variable COMPILE-C is not used.
Misspelled or missing IGNORE declaration?

Compilation of file
/home/paolo/clisp-2.26/modules/clx/mit-clx/defsystem.lisp is finished.
0 errors, 1 warning
clisp -m 4MB -q -i defsystem -x '(compile-clx)'
;; Loading file /home/paolo/.clisprc ...
;; Loading of file /home/paolo/.clisprc is finished.
;; Loading file /home/paolo/clisp-2.26/modules/clx/mit-clx/defsystem.fas
...
;; Loading of file /home/paolo/clisp-2.26/modules/clx/mit-clx/defsystem.fas
is finished.
;;; Default paths: #P"" #P""

Compiling file /home/paolo/clisp-2.26/modules/clx/mit-clx/package.lisp ...

Compilation of file /home/paolo/clisp-2.26/modules/clx/mit-clx/package.lisp
is finished.
0 errors, 0 warnings
;; Loading file /home/paolo/clisp-2.26/modules/clx/mit-clx/package.fas ...
;; Loading of file /home/paolo/clisp-2.26/modules/clx/mit-clx/package.fas
is finished.
Compiling file /home/paolo/clisp-2.26/modules/clx/mit-clx/depdefs.lisp ...

Compilation of file /home/paolo/clisp-2.26/modules/clx/mit-clx/depdefs.lisp
is finished.
The following functions were used but not defined:
 MAKE-PROCESS-LOCK
0 errors, 0 warnings
;; Loading file /home/paolo/clisp-2.26/modules/clx/mit-clx/depdefs.fas ...
;; Loading of file /home/paolo/clisp-2.26/modules/clx/mit-clx/depdefs.fas
is finished.
Compiling file /home/paolo/clisp-2.26/modules/clx/mit-clx/clx.lisp ...
*** - BOOLEAN is a built-in type and may not be redefined.
make: *** [stamp.fas] Error 1

Here is the clx.lisp line that defines type BOOLEAN:

(deftype boolean () '(or null (not null)))

Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/

---

From: Sam Steingold <[email-masked]>
Date: 07 Jun 2001 13:40:45 -0400

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Error building MIT CLX under Linux"
> * Sent on Thu, 07 Jun 2001 09:23:58 +0200
> * Honorable Paolo Amoroso <[email-masked]> writes:
>

thanks - fixed.
get the patch in the same place as sources or do cvs up

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Sufficiently advanced stupidity is indistinguishable from malice.

---

From: Paolo Amoroso <[email-masked]>
Date: Fri, 08 Jun 2001 09:14:44 +0200

> get the patch in the same place as sources or do cvs up

With your patch I am able to proceed further, but then compilation stops
with the error:

[...]
Compiling file /home/paolo/clisp-2.26/modules/clx/mit-clx/display.lisp ...
WARNING in function WITH-EVENT-QUEUE-FUNCTION in lines 207..216 :
variable DISPLAY is not used.
Misspelled or missing IGNORE declaration?
WARNING in function WITH-EVENT-QUEUE-FUNCTION in lines 207..216 :
variable TIMEOUT is not used.
Misspelled or missing IGNORE declaration?

Compilation of file /home/paolo/clisp-2.26/modules/clx/mit-clx/display.lisp
is finished.
The following functions were used but not defined:
 INITIALIZE-EXTENSIONS ALLOCATE-REPLY-BUFFER START-PENDING-COMMAND
 READ-REPLY DEALLOCATE-REPLY-BUFFER STOP-PENDING-COMMAND
 REPORT-ASYNCHRONOUS-ERRORS
0 errors, 2 warnings
;; Loading file /home/paolo/clisp-2.26/modules/clx/mit-clx/display.fas ...
;; Loading of file /home/paolo/clisp-2.26/modules/clx/mit-clx/display.fas
is finished.
Compiling file /home/paolo/clisp-2.26/modules/clx/mit-clx/gcontext.lisp ...
WARNING:
(DEFCONSTANT *GCONTEXT-INDEXES*
 '(:TIMESTAMP 26 :ARC-MODE 22 :DASHES 21 :DASH-OFFSET 20 :CLIP-MASK 19
:CLIP-Y
   18 :CLIP-X 17 :EXPOSURES 16 :SUBWINDOW-MODE 15 :FONT 14 :TS-Y 13 :TS-X
12
   :STIPPLE 11 :TILE 10 :FILL-RULE 9 :FILL-STYLE 8 :JOIN-STYLE 7 :CAP-STYLE
6
   :LINE-STYLE 5 :LINE-WIDTH 4 :BACKGROUND 3 :FOREGROUND 2 :PLANE-MASK 1
   :FUNCTION 0)) redefines the constant *GCONTEXT-INDEXES*. Its old value
was 
(:TIMESTAMP 26 :ARC-MODE 22 :DASHES 21 :DASH-OFFSET 20 :CLIP-MASK 19
:CLIP-Y 18
 :CLIP-X 17 :EXPOSURES 16 :SUBWINDOW-MODE 15 :FONT 14 :TS-Y 13 :TS-X 12
 :STIPPLE 11 :TILE 10 :FILL-RULE 9 :FILL-STYLE 8 :JOIN-STYLE 7 :CAP-STYLE 6
 :LINE-STYLE 5 :LINE-WIDTH 4 :BACKGROUND 3 :FOREGROUND 2 :PLANE-MASK 1
 :FUNCTION 0).
WARNING:
(DEFCONSTANT *GCONTEXT-MASKS*
 '#(1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536
131072
    262144 524288 1048576 2097152 4194304 8912896 18874368 33570816
67108864)) redefines the constant *GCONTEXT-MASKS*. Its old value was 
#(1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072
  262144 524288 1048576 2097152 4194304 8912896 18874368 33570816
67108864).
*** - FUNCALL: the function GET-SETF-METHOD is undefined
make: *** [stamp.fas] Error 1

Paolo

---

From: Sam Steingold <[email-masked]>
Date: 08 Jun 2001 13:08:17 -0400

> * In message <WXogO20ntORPdFLT0aO15=[email-masked]>
> * On the subject of "Re: [clisp-list] Error building MIT CLX under Linux"
> * Sent on Fri, 08 Jun 2001 09:14:44 +0200
> With your patch I am able to proceed further, but then compilation
> stops with the error:

the latest patch should fix this and some other problems.
mit-clx now builds for me.
thanks for your bug reports

--
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))

---

From: Paolo Amoroso <[email-masked]>
Date: Sat, 09 Jun 2001 13:51:21 +0200

> mit-clx now builds for me.

With your latest patch I am able to correctly build MIT CLX. Thanks,

Paolo

---

From: Paolo Amoroso <[email-masked]>
Date: Mon, 11 Jun 2001 09:46:23 +0200

> mit-clx now builds for me.

Although it is now possible to build MIT CLX, it apparently exports only a
handful of symbols from the XLIB package:

[~]$ clisp-clx
  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2001

;; Loading file /home/paolo/.clisprc ...
;; Loading of file /home/paolo/.clisprc is finished.
[1]> (lisp-implementation-version)
"2.26 (released 2001-05-23) (built 3200841159) (memory 3201068271)"
[2]> *features*
(:CLX-MIT-R5 :CLX-MIT-R4 :XLIB :CLX :CLX-LITTLE-ENDIAN
 :HAVE-WITH-STANDARD-IO-SYNTAX :HAVE-CLCS :HAVE-DECLAIM
 :HAVE-PRINT-UNREADABLE-OBJECT :CLOS :LOOP :COMPILER :CLISP :ANSI-CL
 :COMMON-LISP :LISP=CL :INTERPRETER :SOCKETS :GENERIC-STREAMS
 :LOGICAL-PATHNAMES :FFI :GETTEXT :UNICODE :BASE-CHAR=CHARACTER :SYSCALLS
 :PC386 :UNIX)
[3]> (list-all-packages)
(#<PACKAGE GSTREAM> #<PACKAGE GRAY> #<PACKAGE I18N> #<PACKAGE SOCKET>
 #<PACKAGE POSIX> #<PACKAGE FFI> #<PACKAGE SCREEN> #<PACKAGE CUSTOM>
 #<PACKAGE EXT> #<PACKAGE CLOS> #<PACKAGE CHARSET> #<PACKAGE KEYWORD>
 #<PACKAGE SYSTEM> #<PACKAGE COMMON-LISP-USER> #<PACKAGE COMMON-LISP>
 #<PACKAGE XLIB>)
[4]> (do-external-symbols (symbol "XLIB") (print symbol))

XLIB:DESCRIBE-REPLY 
XLIB:SUSPEND-DISPLAY-TRACING 
XLIB:DESCRIBE-TRACE 
XLIB:DESCRIBE-EVENT 
XLIB:DESCRIBE-ERROR 
XLIB:UNTRACE-DISPLAY 
XLIB:DESCRIBE-REQUEST 
XLIB:DISPLAY-TRACE 
XLIB:TRACE-DISPLAY 
XLIB:SHOW-TRACE 
XLIB:RESUME-DISPLAY-TRACING 
NIL
[5]> 

Paolo

---

From: Sam Steingold <[email-masked]>
Date: 11 Jun 2001 11:28:50 -0400

> * In message <[email-masked]>
> * Sent on Mon, 11 Jun 2001 09:46:23 +0200
> Although it is now possible to build MIT CLX, it apparently exports
> only a handful of symbols from the XLIB package:

should be finally fixed.
thanks!

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Please wait, MS Windows are preparing the blue screen of death.

---

From: Ben Hyde <[email-masked]>
Date: Mon, 11 Jun 2001 13:42:32 -0400 (EDT)

Is this approprate forum for discussing the
porting of FFI?  I compiled *-rs6000.c into
.s files; after a certain amount of hand work.
It now fails the tests for float and 'long long'.
I think what I need to make progress is somebody
who thinks they know what their doing :-); or
somebody who knows were in the cc sources the
argument passing is documented.

You have to compile three files into assembler
versions; ala:
  cc- S -o avcall-rs6000-darwin.s -O -traditional-cpp avcall-rs6000.c
and modify the Makefile.in to include a clause
to use those .s file.s

It then chokes when you makemake --with-dynamic-ffi
and it gets into some testing.

  - ben

---

From: Paolo Amoroso <[email-masked]>
Date: Tue, 12 Jun 2001 10:26:38 +0200

> should be finally fixed.

Now MIT CLX works--really--fine. Thanks,

Paolo