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:
This issue derives from an understandable concern in this Reddit thread. Essentially it can be summed up as follows:
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 ifcross
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 theaarch64-unknown-linux-gnu
target: