-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Cross compile on aarch64 from MacOS/darwin to aarch64-unknown-linux-musl is failing with undefined symbol: readdir64 #179
Comments
cc @haohaolee Looks like the weak symbol list isn't complete? https://github.com/search?q=repo%3Abminor%2Fmusl%20_LARGEFILE64_SOURCE&type=code |
@reubenmiller IMO it should be easy to fix by adding more LFS64 functions to cargo-zigbuild/src/linux/mod.rs Lines 22 to 27 in 846edea
Happy to accept a PR to do that. |
I can confirm that the build experienced will be fixed once #180 is merged. |
I wanted to be conservative so I tried to modify as few symbols as possible in #172, I was afraid that too many adds lead to other issues. Hi @reubenmiller does your project rely on Please let me know if this is the case, thanks |
I have managed to figure out this, I did miss some symbols in my PR #172:
At least these are the symbols needed.
It would be better to have a test for this regression. |
No we don't use anything from the libc crate, we use musl builds for portability reasons. |
@reubenmiller No worries. Ignore me, I was asking a wrong question. I have checked your build and I think I have a better understanding now, this issue has nothing to do with the In short, you need to satisfy those undefined symbols in ps: musl is a kinda libc, and your project does depend on |
When building with the newly release cargo-zigbuild version 0.17.2, the build fails with the following errors. From a quick inspection it looks to be related to #172 (though it is just a guess). Reverting back to cargo-zigbuild 0.17.1 resolves the issue.
The error that I get when cross compiling from MacOS M1 to
aarch64-unknown-linux-musl
is:Version information
The text was updated successfully, but these errors were encountered: