Dear All, after quite a while I came back to running maxima on abcl becaus there is an increasing interest in incorporationg maxima in Java based projects. Some time ago Mark explained that in principal loadinf form jars can be done, but it seems that it ned some time to twea maxima-load.lisp so that it loadsfrom a jar containing all the abcl files. Has anything happend on this in the meantime? Reinhard
On 2/27/11 9:10 AM, Reinhard Oldenburg wrote:
Dear All, after quite a while I came back to running maxima on abcl becaus there is an increasing interest in incorporationg maxima in Java based projects. Some time ago Mark explained that in principal loadinf form jars can be done, but it seems that it ned some time to twea maxima-load.lisp so that it loadsfrom a jar containing all the abcl files. Has anything happend on this in the meantime?
I couldn't find 'maxima-load.lisp' in the CVS HEAD version of the sources. Is this file located somewhere else, perhaps in a secondary packaging mechanism/
We can currently load ASDF2 systems composed of source pretty easily from jar files.
I just packaged Maxima this way by the following steps:
1. From CVS HEAD I patched 'src/maxima.asd' to get rid of the incompatible with ABCL's ASDF2 jar translation rules.
Index: src/maxima.asd =================================================================== RCS file: /cvsroot/maxima/maxima/src/maxima.asd,v retrieving revision 1.18 diff -u -r1.18 maxima.asd --- src/maxima.asd 2 Jan 2011 06:11:33 -0000 1.18 +++ src/maxima.asd 27 Feb 2011 09:28:47 -0000 @@ -9,9 +9,9 @@ ;; Don't try to optimize so much in ECL. ;; Therefore functions can be redefined (essential for share libraries). #+ecl (declaim (optimize (debug 2))) - +#+nil (defvar *binary-output-dir* "binary-ecl") - +#+nil (defmethod output-files :around ((operation compile-op) (c source-file)) (let* ((source (component-pathname c)) (source-dir (pathname-directory source))
2. Then I zipped up the contents of the 'src' directory in 'maxima.jar'
unix$ zip -r maxima.jar src
3. Then I pushed the JAR-PATHNAME containing the location of the directory containing 'maxima.asd' to the ASDF *CENTRAL-REGISTRY*
CL-USER> (pushnew #P"jar:file:/Users/evenson/work/maxima/maxima.jar!/src/" asdf:*central-registry*)
Now, I can load Maxima from the JAR via (ASDF:LOAD-SYSTEM :maxima), which will compile the FASLS on first load according to the ASDF2 TRANSLATE-OUTPUT-LOCATION rules.
Since you probably want to include the FASL (i.e. the '*.abcl') files in your distribution JAR, we have to come up with a way to coax ASDF2 looking for such a cache in 'maxima.jar'. This is the piece that is missing to my knowledge, although Alan Ruttenberg might have posted a patch about a year ago to have this work. There was also much useful discussion on getting such a mechanism to load FASLs as part of the ASDF2 definition for ECL, as one might not have access to the gcc compiler at runtime.
armedbear-devel@common-lisp.net