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

Static build #155

Open
eamsden opened this issue Dec 1, 2023 · 2 comments
Open

Static build #155

eamsden opened this issue Dec 1, 2023 · 2 comments
Assignees
Labels
CI Changes are needed to CI

Comments

@eamsden
Copy link
Collaborator

eamsden commented Dec 1, 2023

Right now we link c dependencies (most notably Urcrypt and its transitive dependencies) by building them with Nix. This defaults to dynamic linking. An executable built this way cannot be distributed independently as it depends on shared objects from the Nix store. We should build a statically linked binary, but this is complicated by conflicting opinions in our dependencies:

  • Rust really does not want to link statically against glibc (though it can allegedly be convinced), but will happily link statically against musl. However musl is a Tier-2 support target for Rust!
  • urcrypt's dependencies are very difficult to properly statically link at all (looking at you libaes_siv), and pitch a bigger fit when the libc in question is musl
  • Nix really only offers a static package set linked against musl.
@eamsden
Copy link
Collaborator Author

eamsden commented Dec 16, 2023

Depends on #156

@eamsden
Copy link
Collaborator Author

eamsden commented Dec 22, 2023

Verified that we can do this after #189 so long as we make sure a static glibc is available.

@eamsden eamsden added the CI Changes are needed to CI label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Changes are needed to CI
Projects
None yet
Development

No branches or pull requests

1 participant