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

Add support for Alpine(musllinux) #264

Merged
merged 3 commits into from
Mar 6, 2024
Merged

Add support for Alpine(musllinux) #264

merged 3 commits into from
Mar 6, 2024

Conversation

perklet
Copy link
Collaborator

@perklet perklet commented Mar 5, 2024

No description provided.

@perklet
Copy link
Collaborator Author

perklet commented Mar 5, 2024

@bjia56 Do you have any idea why linking to musl libcurl-impersonate failed? I have verified that the curl-impersonate binary works.

Here is the failed build.

/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: /root/.local/lib/libz.a(zutil.o): relocation R_X86_64_PC32 against symbol `z_errmsg' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: final link failed: bad value

@bjia56
Copy link
Contributor

bjia56 commented Mar 5, 2024

It looks like Zig may have built the archives statically. Can you try adding the -fPIC flag to the Zig flags list? Alternatively, see if libcurl-impersonate.so is usable instead?

@perklet
Copy link
Collaborator Author

perklet commented Mar 5, 2024

Added -fPIC, the x86_64 whl works, however the aarch64 one does not work, weird.

@bjia56
Copy link
Contributor

bjia56 commented Mar 5, 2024

Seems like the compiler is not including certain symbols when building the wrapper so. I found this, perhaps see if it helps? rust-lang/git2-rs#706 (comment)

@perklet perklet linked an issue Mar 6, 2024 that may be closed by this pull request
@perklet perklet marked this pull request as ready for review March 6, 2024 08:19
@perklet perklet merged commit c2c39a2 into main Mar 6, 2024
12 checks passed
@perklet perklet deleted the feature/alpine branch March 6, 2024 08:41
@perklet
Copy link
Collaborator Author

perklet commented Mar 6, 2024

Dynamic linking works, cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't install with pip in alpine
2 participants