[Openmcl-devel] Error Compiling CLIM2

Rainer Joswig joswig at lisp.de
Wed Jul 27 13:27:25 PDT 2016


To add a little bit to it: When porting old portable code to Clozure CL. Code which was originally written for a bunch of different Common Lisp implementations, including Macintosh Common Lisp.

Here, portions of the CLIM code ran in Lucid CL (a Lisp for Unix), Allegro CL (for Unix-like and Windows), LIspWorks (for Windows and Unix-like), Symbolics Genera, MCL (for old Macs / old Mac OS), ...

Note that MCL evolved over time with new functionalities and ports. For example MCL ran only on Motorola-68k-based Macs and a later version then worked also on PPC-based Macs. Thus the code might have different versions for some parts, for different MCL versions. Thus the difference CCL feature, inherited from the original Coral Common Lisp name.

But that code might not run in Clozure CL or OpenMCL (that's an older name for Clozure CL).
Clozure CL also uses the CCL feature, but with a different numbering scheme.

Clozure CL  has its roots in MCL, but it has a lot of differences and some new functionality. MCL was written only for Macs and originally for the older Mac OS (not the OSX as we know it now). MCL for example did not have preemptive scheduled threads (processes in Lisp speak).

What's probably different:

* functionality late in the ANSI CL standard process
* processes
* streams
* CLOS MOP
* pathnames, syntax
* logical pathnames
* Unix functionality new in Clozure CL
* Mac toolbox no longer used in Clozure CL
* everything using the FFI
* feature names
* GUI / IDE
* probably some stream code
* characters / strings / files -> Unicode support
* Intel processor big-endian -> little endian
* timers
...

So, code written for MCL needs to be ported to Clozure CL. You want to make sure that code written specifically for MCL   using  #+ccl   now does not get executed in Clozure CL. Make sure that you use a feature expression which will work only for MCL.

Then you need to create a new version for Clozure CL. Here you should use a feature expression which makes it only run in Clozure CL.

Then there is the case of different code versions for different implementations and default or error code:

#+lispworks ...
#+ccl-2...
#+excl ...

#-(or lispworks ccl-2 excl) (error "foo not implemented in your Lisp, needs to be ported first")

This should be later something like this:

#+lispworks ...
#+(and ccl-2 mcl)...
#+excl ...
#+clozure-common-lisp ...

#-(or lispworks (and ccl-2 mcl) excl clozure-cl) (error "foo not implemented)

It's kind of tricky to get it right - everywhere -  for all cases...

While we are at it, but this is unrelated to the CLIM code. There is another Common Lisp implementation which used/uses the CCL feature: Codemist Common Lisp. Luckily this implementation was/is not widely used. But in rare circumstances this creates more confusion. ;-)


Regards,

Rainer


> Am 27.07.2016 um 20:45 schrieb Craig Lanning <craig.t.lanning at gmail.com>:
> 
> Attached is the backtrace.
> 
> The symbols in the CLSM package are part of my system management
> package.
> 
> Craig
> 
> On Wed, 2016-07-27 at 14:05 -0400, Craig Lanning wrote:
>> While compiling CLIM, I ran into this error:
>> 
>> ;; Compiling clim:clim;completer.lisp.newest
>>> 
>>> Error: The value COMPILE-FILE is not of the expected type
>> CCL::LEXICAL-ENVIRONMENT.
>>> 
>>> While executing: CCL::DEFINITION-ENVIRONMENT, in process
>>> listener(1).
>>> Type :POP to abort, :R for a list of available restarts.
>>> Type :? for other options.
>> 1 > 
>> 
>> It appears to be some kind of disconnect between the compilation
>> environment and the compiling the file.  I'm not sure what to look at
>> to figure out what is really wrong.  Any suggestions?
>> 
>> Craig
> <backtrace.txt>_______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com <mailto:Openmcl-devel at clozure.com>
> https://lists.clozure.com/mailman/listinfo/openmcl-devel <https://lists.clozure.com/mailman/listinfo/openmcl-devel>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20160727/256a3a59/attachment.htm>


More information about the Openmcl-devel mailing list