Skip to content

Hardcode or specify a glibc version for compilation #6

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

Open
rnag opened this issue Mar 23, 2022 · 0 comments
Open

Hardcode or specify a glibc version for compilation #6

rnag opened this issue Mar 23, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@rnag
Copy link
Owner

rnag commented Mar 23, 2022

This issue derives from an understandable concern in this Reddit thread. Essentially it can be summed up as follows:

[...] I'm just worried that this is just working so far by chance, because if the aarch64-unknown-linux-gnu default glibc version ever increases to a version higher than the AL2 glibc then everything will stop working.

So basically, in our case it would be a good idea to specify the glibc version - when running zigbuild at least, I'm not sure if cross supports it.

It might be worth it to hardcode glibc=2.26, as I believe that's what the docs on amazon linux 2 seem to indicate is the version of glibc that the AL2 runtime uses.

Resolution

As suggested in the same Reddit thread, we easily specify glibc version when running zigbuild - for example, to compile for glibc 2.26 (which is what AL2 uses) with the aarch64-unknown-linux-gnu target:

cargo zigbuild --target aarch64-unknown-linux-gnu.2.26
@rnag rnag changed the title Hard-code the glibc version for compilation Hardcode the glibc version for compilation Mar 23, 2022
@rnag rnag added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 23, 2022
@rnag rnag changed the title Hardcode the glibc version for compilation Hardcode or specify a glibc version for compilation Mar 23, 2022
@rnag rnag added the enhancement New feature or request label Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant