Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repairs and improvements for building with external dependencies #807

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

LiberalArtist
Copy link
Contributor

@LiberalArtist LiberalArtist commented Feb 27, 2024

This patch series repairs and improves support for configuring Chez Scheme to use external copies of some dependencies normally included as submodules. Overall, these changes let Chez Scheme be built in ways that already worked to build older versions of Chez Scheme and the copy of Chez Scheme distributed with Racket (because the configure script in the Racket sources tried less hard to make sure the dependencies were really present).

  1. The first patch fixes the checks for the zlib and lz4 submodules, which are currently noops, to actually perform checks unless configured with ZLIB=<zlib> or LZ4=<lz4>, respectively.
  2. The second patch adds an analogous ZUO=<zuo> argument. Rather than simply skip the submodule check and require the user then to build with make ZUO=zuo (or to use Zuo directly), this patch records the configuration choice in Mf-config and slightly adjusts Makefile.in to adapt more gracefully to this mode.
  3. The final patch similarly adds an STEXLIB=<stex> argument to configure and updates build.zuo as I had considered in Guix-related build system enhancements racket/racket#4203 (comment) after racket/racket@d897379:

    The only way to use an installed Stex up to this point has been running make STEXLIB= with GNU Make or some other make that will propagate it as needed. I have only adjusted the Zuo script to recognize an STEXLIB passed that way: I haven't tried to support setting STEXLIB via configure or other mechanisms. There would be some uniformity in doing so, but it wouldn't be useful for Guix packaging unless it were also supported upstream, since we try to share as much as possible between the package definitions for the two Chez Schemes.

In fact, with these changes cherry-picked as downstream patches, my draft update of the Guix package to Chez Scheme 10 is able to share its entire build recipe exactly with our chez-scheme-for-racket package (which we used for the architectures newly supported in version 10 and will continue to use for bootstrapping).

Conditionals to skip the submodule checks were using the wrong
variable names, so the checks were always skipped. The correct
behavior is to perform the check unless given `ZLIB=<zlib>` or
`LZ4=<lz4>`, as applicable.
Supplying `ZUO=<zuo>` skips the submodule check in `configure`
and configures the generated makefile not to build or remove Zuo.
For compatibility with older scripts, when not explicitly configured,
continue to honor the `STEXLIB` environment variable at build time.
@mflatt
Copy link
Contributor

mflatt commented Feb 27, 2024

This looks good to me. I'll wait a day or two before merging to see whether others detect an issue, though.

@mflatt mflatt merged commit b8838c3 into cisco:main Feb 29, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants