Boot files with compiled libraries fail to load
A.ss:
(library (A)
(export A)
(import (scheme))
(define A 12))
% scheme
Chez Scheme Version 9.4.1
Copyright 1984-2016 Cisco Systems, Inc.
> (compile-file "A")
compiling A.ss with output to A.so
> (make-boot-file "A.boot" '("scheme") "A.so")
> (exit)
% scheme -b ./A.boot
Exception in compiler-internal: install-library/rt-code: unable to install invoke code for non-existant library #{A eldnidvc3vkegxvd5huz435gj-0}
This worked in Chez Scheme 8.4.1. Also, non-existent is misspelled.
Perhaps the load procedure in c/scheme.c does not handle the library/rt-info and library/ct-info records that run-inner of do-load-binary in s/7.ss does?
That's correct. The c-coded boot-file loader has no way to talk with the Scheme-coded library manager. One way to fix this would be to switch from the C-coded loader to the Scheme-coded loader once the latter is in place. It might also be possible to have the C-coded loader invoke Scheme-coded library-manager procedures. I don't know whether there are other issues with compiled libraries in boot files.
The first commit on this branch is a quick stab at this. I restricted it to the non-procedure case of non-base boot files to limit overhead in the common case.
Thanks, pull request https://github.com/cisco/ChezScheme/pull/288 fixed this.
The load and handle_visit_revisit code in scheme.c silently ignore unexpected values, but my change has us now going through run-inner, which is not so forgiving.
Should $make-load-binary take a for-boot? flag that makes run-inner tolerate unexpected values?
Is this issue resolved?