Hey Gunter,
I don't know mk-defsystem, but I have an idea what is wrong.
Since 2 of the lisp files containing (defparameter) commands are generated by the build scripts
the short answer is that these files need to be part of the build. See longer answer below.
- the build process is started in the directory the output will end
up in
- an (mk:add-registry-location "$(top_srcdir)/src/") informs
defsystem where to find the source tree and
- in maxima.system all files that are in the build tree instead are
marked as private-file:
(:module final :source-pathname "" ;; These are not compiled, for whatever reason #-ecl :load-only #-ecl t :components ((:file "autol") (:file "max_ext") :private-file "share-subdirs") (:file "init-cl")))))
This seems to work fine in sbcl, clisp, ecl, openmcl, gcl and cmucl. And with ECL maxima seems to build fine, as well. But when I start a maxima that was compiled with ECL it generates a runtime error that the variables share-subdirs defines are not bound.
ECL (and I'd suspect GCL has a similar problem) does not have image save utility. That means there is no such thing as save-lisp-and-die, so all alterations to the system (i.e from repl) at runtime are not part of the final executable.
When building executables ECL compiles all files in a system definition and (optionally) produces a single executable composed of these objects. Your compilation may depend on some parameters and if you define them from REPL, they will be available during build time, but if you start the executable you start with bare Common Lisp and then you add all things which are part of compiled files. If your files are only loaded during compilation, then they are not in the "bare" image when you start the executable. So if your application depends on some parameters, they must be defined in one of your compiled components (or their dependencies).
Best regards, Daniel