and the code uses opt_arguments/3 to parse the command-line arguments, then PositionalArgs contains the executable as the first value (that is, PositionalArgs=[foo, 'positional-param']).
then PositionalArgs doesn’t contain the executable (that is, PositionalArgs=['positional-param']).
Is there a way to make the behavior of opt_arguments/3 the same for both saved state and non-saved state? (I could, of course, add a dummy arg when running under swipl …)
The build succeeded after I did mkdir ../man/archive; and the test succeeded. Thank-you!
(PS: I did give you all the information you needed in my first message; it showed the options I used for building the saved state. But in making a reproducible bug, I did some tracing through opt_arguments and noticed that current_prolog_flag(argv, Argv) wasn’t what I expected, so I added that to my test.)
(PPS: is there a “standard” extension for a saved state? cf: .qof)
You should have installed the package (submodule) archive. If new problems like this arise, do a git submodule update -init to get all modules installed. Watch out for conflicts and resolve these before continuing the build. These are commonly caused by old files that prohibit creating the submodule.
Next run the CMake in a clean directory.
Saved states are executables, so the convention depends on the platform. On Windows the system adds .exe. On other systems there is typically no convention. If you intend to load them explicitly into an embedded Prolog or using swipl -x state it might make sense to give them some extension. The system calls them .prc (boot.prc). Forgot why