Subject: Getting xlib to work in Clisp

From: Fred Cohen <[email-masked]>
Date: Wed, 2 Dec 1998 13:39:06 -0800 (PST)

I am trying to get garnet working on a Slackware Linux box - which means
that I have to get clue, clio, pcl, clx, and gcl working (or some such
combination.  I have run into a problem in that xlib::hello-world
produces an error - it can't find xlib.  Now I am running X11, Tk works
from within with-wish - so somehow X11 is interacting with lisp (allbeit
through a surrogate).  I looked in the documentation but could not find
information on how to get xlib:: available.  I have and built the full
clisp distribution from cons - have other programs working, and so
forth.  Does anyone know how to proceed from here?

Alternatively, is there anohter interface that will allow me to
graphically desribe networks and do drag and drop and things like that?

FC

--
  Fred Cohen & Associates: http://all.net - [email-masked] - tel/fax:925-454-0171
				Have a great day!!!

Per the official policy of Sandia National Laboratories, the reader should be
aware that:
  - Fred Cohen of Fred Cohen & Associates is the same Fred Cohen who is a
    Principal Member of Technical Staff at Sandia National Laboratories.
  - Fred Cohen & Associates - is owned and operated by Fred Cohen and is
    separate and independent from the work done by Fred Cohen at Sandia
    National Laboratories.

---

From: Gilbert Baumann <[email-masked]>
Date: 03 Dec 1998 08:42:46 +0100

Moin, Moin,

Fred Cohen <[email-masked]> writes:
> combination.  

  Garnet needs: CLX, Common Lisp
  CLIO needs: CLUE
  CLUE needs: CLX, CLOS and Common Lisp
  PCL is a CLOS implementation; CLISP has a native CLOS implementation.

> I have run into a problem in that xlib::hello-world

  There are two alternative CLX implementations for CLISP.

  .../clisp/modules/clx/mit-clx 

  The original thing implemented in LISP. To build this one is easy --
  a simple `make' in the directory should do the trick.

  .../clisp/modules/clx/new-clx

  This is an implementation of CLX, I hacked some time ago in C for
  speed. Building this one is a bit more tricky. Say:

    $ cd .../clisp/src/      # or where you built CLISP
    $ ln -s ../modules/clx/new-clx .
    $ clisp-link add-module-set new-clx base base+new-clx

  There are two little demo programs provided with new-clx. Look at
  the docu.

> graphically desribe networks and do drag and drop and things like that?

  This sounds like Garnet is the right tool. I found CLIO barely
  working or useful. I personally settled on CLM, a Lisp interface to
  Motif, for Lisp GUI stuff, but that is just me.

  Hope this helps,
            Gilbert.

-- 
;;; You know you have hacked Lisp too much, when you m-c-x in a C buffer.

---

From: Fred Cohen <[email-masked]>
Date: Sat, 5 Dec 1998 14:23:31 -0800 (PST)

>   .../clisp/modules/clx/mit-clx 

I did get this to work.

>   .../clisp/modules/clx/new-clx

I couldn't get this to compile correctly.

>     $ clisp-link add-module-set new-clx base base+new-clx

ln -s ../modules/clx/new-clx .
fast:/u/fc/clisp/clisp-1998-09-09/src/clx/new-clx>clisp-link add-module-set new-clx base base+new-clx
bash: clisp-link: command not found
fast:/u/fc/clisp/clisp-1998-09-09/src/clx/new-clx>make
cc -O -I../../ -c clx.c
In file included from clx.e:384:
lispbibl.d:7488: warning: register used for two global register variables
clx.e: In function `xlib_error_handler':
clx.e:9869: parse error before `SURES'
clx.e:9870: parse error before `ap'
clx.e: In function `C_xpm_read_file_to_pixmap':
clx.e:10283: `XpmColorError' undeclared (first use this function)
clx.e:10283: (Each undeclared identifier is reported only once
clx.e:10283: for each function it appears in.)
clx.e:10286: `XpmSuccess' undeclared (first use this function)
clx.e:10289: `XpmOpenFailed' undeclared (first use this function)
clx.e:10292: `XpmFileInvalid' undeclared (first use this function)
clx.e:10295: `XpmNoMemory' undeclared (first use this function)
clx.e:10298: `XpmColorFailed' undeclared (first use this function)
clx.e:10301: warning: unreachable code at beginning of switch statement
make: *** [clx.o] Error 1

>   Motif, for Lisp GUI stuff, but that is just me.

I couldn't find CLM anywhere. Do you know where to look for it?

FC