Skip to content

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

Merged
straight-shoota merged 1 commit intomasterfrom
feat/build-compiler-with-alpine-libgc
May 3, 2024
Merged

Use libgc from Alpine for building the compiler on Linux#301
straight-shoota merged 1 commit intomasterfrom
feat/build-compiler-with-alpine-libgc

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.

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