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).
But I added a
#-ecl :load-only #-ecl t
Doesn't that make the component compiled on ECL?
Sorry for asking such a basic question.
If I copy the file to the source tree and change the ":private-file" to an ":file" everything builds and runs fine.
Kind regards,
Gunter.