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

Use libgc from Alpine for building the compiler on Linux #301

Merged
merged 1 commit into from
May 3, 2024

Conversation

straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented May 2, 2024

We don't need a specially-built version of libgc anymore and can use the package from Alpine, just like with any other dependency.

Resolves part of #285

Comment on lines 37 to +42
# This overrides default CRYSTAL_LIBRARY_PATH baked into the binary (starting with 1.2.0)
# or configured via wrapper script (before 1.2.0) because we want to link against
# the newly-built libraries, not the ones shipped with the bootstrap compiler.
ENV CRYSTAL_LIBRARY_PATH=/bdwgc/.libs/
# the regularly installed libraries, not the ones shipped with the bootstrap compiler.
# This particularly affects libgc which was bundled upto Crystal 1.12
ENV CRYSTAL_LIBRARY_PATH=""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to simply remove this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using a bootstrap compiler which ships a bundled libgc.a in its CRYSTAL_LIBRARY_PATH. It's necessary to explicitly override the path to use the system library instead.
Otherwise the build would fail because the bundled library is built against glibc but we're linking musl.

@straight-shoota straight-shoota merged commit 5ae9b78 into master May 3, 2024
@straight-shoota straight-shoota deleted the feat/build-compiler-with-alpine-libgc branch May 3, 2024 18:21
@straight-shoota straight-shoota linked an issue May 3, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stop building our own libgc
2 participants