-
Notifications
You must be signed in to change notification settings - Fork 21
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
Static feature flag doesn't actually work #38
Comments
You need to actually have a static lib to link against. Ideally it would fail if not found, not sure if I can make cargo do that though. |
Ah, doesn't Arch Linux provide a static one by default? Perhaps just documenting this somewhere might be good enough? (I sure hope this hasn't already been done and I just missed it) |
Yeah if that's not mentioned it should be. pacman-static from the aur has one and alpm.rs will know to look for it if installed. |
I gave it a try today with pacman-static from AUR, but I ran into two different errors. First when using mold as a linker
Then I got this error
When I commented out that config I got:
I'm building with This can also be reproduced with a simple: cargo new reproducer
cd reproducer
cargo add alpm --features=static
cargo build
cargo build So maybe this needs musl (since pacman-static is linked with musl), but I don't seem to have a sysroot for that:
I normally cross compile using cross-rs but that uses Debian based docker containers, not Arch. So that won't work here. I do believe that the docs need to be improved on how to actually use the static flag. It probably needs a dedicated section in the README. |
I built with alpm/static but it doesn't seem to actually do anything:
If I build with my Arch Linux backend disabled I get:
This is unfortunate as my plans involve making a cross platform binary that you can run on any (supported) distro and will set up your preferred packages and configs (I'm tired of having to remember what I need to install on new systems)
The text was updated successfully, but these errors were encountered: