[mkcl-devel] Native compilation on Windows

Jean-Claude Beaudoin jean.claude.beaudoin at gmail.com
Sun Nov 4 20:59:08 UTC 2012


On Wed, Oct 24, 2012 at 10:24 AM, Ralph Möritz <ralph.moeritz at outlook.com>wrote:

> I just downloaded MKCL-1.1.0 & tried compiling a small "Hello, world"
> program on Windows without success. Here's what I tried:
>
> 1. Add "C:\Program Files\MKCL 1.1\bin" to my PATH.
> 2. Run `mkcl -not-fasl-p -compile hello.lisp` which produces lisp.o
> 3. Now what? I've tried (...) `mkcl -o hello.exe -link hello.o` which
> produces the following error:
>
>     build-program failed: Unknown keyword :LISP-FILES
>
>
MKCL 1.1.1 is now available (on common-lisp.net) with the fix for that
problem.

So you will have now the problem of running "hello.exe" per se.  In that
you are likely
to hit against two annoyances: (1) location of MKCL's runtime object code
shared library,
(2) location of MKCL's loadable modules directory.

(1) can be taken care of by proper setting of the "path" environment
variable on MS-Windows
and by some equivalent setting of LD_LIBRARY_PATH on Linux and other unixes.

(2) is usually found as a relative path from the MKCL startup executable,
i.e: "<executable location>\..\lib\mkcl-1.1.1".  So, given an executable of
say
"c:\foo\bar\hello.exe" then MKCL will look for its support files/modules in
"c:\foo\bar\..\lib\mkcl-1.1.1".  If that fails then MKCL tries to look at
its logical
device "SYS" which has a default value set at MKCL's build time which can
be overridden through environment variable MKCL_LIBDIR.

Since it is most likely that "hello.exe" will not reside at the required
relative path
of the needed loadable modules directory, then the use of MKCL_LIBDIR
is most likely necessary.  With MKCL 1.1.1 and earlier,  an invalid value
of MKCL_LIBDIR (combined with an unlucky executable location) will most
likely
manifest itself through the cryptic message:

MKCL: Unable to open Unicode character database file: c:\<your path
here>\lib\mkcl-1.1.1\ucd.dat

In MS-Windows, the solution will be to do something like:
     set MKCL_LIBDIR=c:\<proper path here>\lib\mkcl-1.1.1
or to do the equivalent environment variable setting on Linux and others.

The "ucd.dat" file and the MKCL_LIBDIR environment variable are legacy
devices
whose role, location and proper existence will need to be significantly
reassessed (soon?)
but can be accommodated with for the time being.

I hope this is useful for you.

Cheers,

Jean-Claude Beaudoin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/mkcl-devel/attachments/20121104/72fadae4/attachment.html>


More information about the mkcl-devel mailing list