Running jwacs (lisp program) under 64 bit windows

Viewed 203

For years I have been using the javascript-preprocessor jwacs. I use it as a commandline utility (jwacs.exe). Jwacs is written in lisp. I don't know what version of lisp. The problem I have is that jwacs.exe does not work under 64 bits windows versions. It shows the following error:

validation of reserved space too short. VirtualAlloc: 0x1e7. ensure_space: failed to validate 1044480 bytes at 0x02100000 (hint: Try "ulimit -a"; maybe you should increase memory limits.)

I tried to run it in windows-xp-compatible mode, and also as administrator but nothing works. I also tried to contact the maker of jwacs, James Wright (james@chumsley.org) but he doesn't answer his mail.

Does anyone know a solution for this?

2 Answers

I can't answer this for Windows, but jwacs turns out to be easy to rebuild and use. The sources are available on github and built cleanly for me.

Indeed, jwacs is available in Quicklisp, so on a system with Quicklisp installed, the task of loading it is as simple as (ql:quickload "jwacs").

It's also surprisingly easy to rebuild the binary (it surprised me, anyway). If you check out the repo, then put a file with these contents in the top directory:

(in-package :cl-user)

#-ASDF
(error "Doomed")

(load "jwacs.asd")
(asdf:make "jwacs")

Then, if you are using SBCL for instance

$ sbcl --load build-jwacs.lisp

will result in some small noise from the compiler, and then write a binary which looks like it's what you need:

$ ./jwacs
===============================================================================
jwacs - Javascript With Advanced Continuation Support
version: 0.3
-------------------------------------------------------------------------------
jwacs: No target specified
Usage: jwacs [options] <main_source_file>
[...]

I also built it using LispWorks on a mac, and it was similarly painless.

So, once you have a working CL environment running, the problem becomes easy to solve. Unfortunately that leaves you with the problem of getting a working Lisp environment on Windows. And I can't help with that because I'm not a Windows person and I hesitate to make recommendations. However searching for Common Lisp Windows is probably useful: this must be something that plenty of people do. It does look as if Portacle might be a good place to start, although I have not used it.

I'm sorry this isn't a complete answer, but I hope it will help you find a solution.

The jwacs binary can be built on 64 Windows as follows.

Install SBCL for Windows - installer can be downloaded here.

Install curl for Windows - instructions here.

Install Quicklisp - instructions here.

Install cl-ppcre using Quicklisp - instructions here.

Install git for Windows - instructions here.

Run following commands:

git config --global core.eol lf
git config --global core.autocrlf input

Clone the jwacs repo with the following command:

git clone https://github.com/chumsley/jwacs

Cd into the jwacs folder and create a file called build-jwacs.lisp with the following contents:

(in-package :cl-user)

#-ASDF
(error "Doomed")

(load "jwacs.asd")
(asdf:make "jwacs")

Finally build executable with the following command:

sbcl --load build-jwacs.lisp
Related