[Ecls-list] I need a little help please

Paul Bowyer pbowyer at olynet.com
Thu Nov 17 23:45:45 UTC 2011


Hello Juanjo:

I've been running ECL in slime to experiment with some CLX test code.

In a fresh instance of slime, the first compilation of the code produces:

;;; Compiling /home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=3
;;;
;;; Loading "/usr/local/lib/ecl-11.1.1/clx.asd"
;;; Loading "/usr/local/lib/ecl-11.1.1/clx.fas"
;;; End of Pass 1.
;;; Note:
;;;   Unknown type (VALUES NUMBER). Assuming it is T.
;;; Note:
;;;   Unknown type (VALUES REAL). Assuming it is T.
;;; Note:
;;;   Invoking external command:
;;;   gcc -I. -I/usr/local/include/ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-g -O2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux 
-O2 -w -c LispCode/XLibStuff/xlib-test-ecl.c -o 
LispCode/XLibStuff/xlib-test-ecl.o
;;; Note:
;;;   Invoking external command:
;;;   gcc -o LispCode/XLibStuff/xlib-test-ecl.fas -L/usr/local/lib/ 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.o 
-Wl,--rpath,/usr/local/lib/ -shared -lecl -ldl -lm
;;; Finished compiling 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;;
;;;
;;; Compiling /home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;; OPTIMIZE levels: Safety=3, Space=0, Speed=3, Debug=3
;;;
;;; End of Pass 1.
;;; Note:
;;;   Invoking external command:
;;;   gcc -I. -I/usr/local/include/ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-g -O2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux 
-O2 -w -c LispCode/XLibStuff/xlib-test-ecl.c -o 
LispCode/XLibStuff/xlib-test-ecl.o
;;; Note:
;;;   Invoking external command:
;;;   gcc -o LispCode/XLibStuff/xlib-test-ecl.fas -L/usr/local/lib/ 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.o 
-Wl,--rpath,/usr/local/lib/ -shared -lecl -ldl -lm
;;; Finished compiling 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;;

The 2nd compilation produces:

;;;
;;; Compiling /home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;; OPTIMIZE levels: Safety=3, Space=0, Speed=3, Debug=3
;;;
;;; End of Pass 1.
;;; Note:
;;;   Invoking external command:
;;;   gcc -I. -I/usr/local/include/ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-g -O2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux 
-O2 -w -c LispCode/XLibStuff/xlib-test-ecl.c -o 
LispCode/XLibStuff/xlib-test-ecl.o
;;; Note:
;;;   Invoking external command:
;;;   gcc -o LispCode/XLibStuff/xlib-test-ecl.fas -L/usr/local/lib/ 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.o 
-Wl,--rpath,/usr/local/lib/ -shared -lecl -ldl -lm
;;; Finished compiling 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;;
;;;
;;; Compiling /home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;; OPTIMIZE levels: Safety=3, Space=0, Speed=3, Debug=3
;;;
;;; End of Pass 1.
;;; Note:
;;;   Invoking external command:
;;;   gcc -I. -I/usr/local/include/ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-g -O2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux 
-O2 -w -c LispCode/XLibStuff/xlib-test-ecl.c -o 
LispCode/XLibStuff/xlib-test-ecl.o
;;; Note:
;;;   Invoking external command:
;;;   gcc -o LispCode/XLibStuff/xlib-test-ecl.fas -L/usr/local/lib/ 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.o 
-Wl,--rpath,/usr/local/lib/ -shared -lecl -ldl -lm
;;; Finished compiling 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;;

Then the command to compile and load produces:

;;;
;;; Compiling /home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;; OPTIMIZE levels: Safety=3, Space=0, Speed=3, Debug=3
;;;
;;; End of Pass 1.
;;; Note:
;;;   Invoking external command:
;;;   gcc -I. -I/usr/local/include/ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-g -O2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux 
-O2 -w -c LispCode/XLibStuff/xlib-test-ecl.c -o 
LispCode/XLibStuff/xlib-test-ecl.o
;;; Note:
;;;   Invoking external command:
;;;   gcc -o LispCode/XLibStuff/xlib-test-ecl.fas -L/usr/local/lib/ 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.o 
-Wl,--rpath,/usr/local/lib/ -shared -lecl -ldl -lm
;;; Finished compiling 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;;
;;;
;;; Compiling /home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;; OPTIMIZE levels: Safety=3, Space=0, Speed=3, Debug=3
;;;
;;; End of Pass 1.
;;; Note:
;;;   Invoking external command:
;;;   gcc -I. -I/usr/local/include/ -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-g -O2 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fPIC -Dlinux 
-O2 -w -c LispCode/XLibStuff/xlib-test-ecl.c -o 
LispCode/XLibStuff/xlib-test-ecl.o
;;; Note:
;;;   Invoking external command:
;;;   gcc -o LispCode/XLibStuff/xlib-test-ecl.fas -L/usr/local/lib/ 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.o 
-Wl,--rpath,/usr/local/lib/ -shared -lecl -ldl -lm
;;; Finished compiling 
/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.lisp.
;;;
;;; Loading "/home/pfb/Documents/LispCode/XLibStuff/xlib-test-ecl.fas"


Running the code with (xapp:main) produces an error:
Asynchronous ID-CHOICE-ERROR in request 11 (last request was 13)  Code 
55.0 [CreateGC] ID #x1
    [Condition of type XLIB:ID-CHOICE-ERROR]

and I get the following from the describe output in the code:

#<gcontext :0 1> is an instance of class GCONTEXT
XLIB::ID :    1
XLIB:DISPLAY :    #<display :0 (The X.Org Foundation R96)>
XLIB:DRAWABLE :    #<window :0 ad>
XLIB::CACHE-P :    T
XLIB::SERVER-STATE :    #(3 4294967295 255 0 0 0 1 0 0 0 NIL NIL 0 0 NIL 
0 1 0 0 0
                        0 4 1 NIL NIL NIL 1)
XLIB::LOCAL-STATE :    #(3 4294967295 255 0 0 0 1 0 0 0 NIL NIL 0 0 NIL 
0 1 0 0 0
                       0 4 1 NIL NIL NIL 1)
XLIB::PLIST :    NIL
XLIB::NEXT :    NIL

I configured ECL thusly when I buiilt it:
./configure --prefix=/usr/local --enable-shared=yes 
--enable-boehm=included --with-clx=builtin

It seems like I'm not able to access the CLX functions even though the 
code compiles, although I don't know what the initial Unknown type 
messages are all about. Do I need to take more steps to access the CLX 
functions?

Thanks,

Paul

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xlib-test-ecl.lisp
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20111117/2041fbbf/attachment.ksh>


More information about the ecl-devel mailing list