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

fix pkgsMusl.rustc build #141972

Closed
wants to merge 2 commits into from
Closed

fix pkgsMusl.rustc build #141972

wants to merge 2 commits into from

Conversation

yu-re-ka
Copy link
Contributor

@yu-re-ka yu-re-ka commented Oct 17, 2021

Motivation for this change

Note that pkgsMusl.cargo build currently still fails

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Oct 17, 2021
@yu-re-ka
Copy link
Contributor Author

Thanks for the comments, will add the darwin conditionals

@yu-re-ka yu-re-ka requested a review from Mic92 October 17, 2021 12:18
buildInputs = [ bash ]
++ lib.optionals (!stdenv.isDarwin) [ gcc.cc.lib zlib ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer the libgcc derivation if it works here.

Suggested change
++ lib.optionals (!stdenv.isDarwin) [ gcc.cc.lib zlib ]
++ lib.optionals (!stdenv.isDarwin) [ libgcc zlib ]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not seem to work:

autoPatchelfHook could not satisfy dependency libgcc_s.so.1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, right libgcc_s :|

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I resolve this conversation?

@ofborg ofborg bot removed 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild 10.rebuild-linux-stdenv This PR causes stdenv to rebuild labels Oct 17, 2021
@yu-re-ka yu-re-ka marked this pull request as draft October 18, 2021 16:40
@yu-re-ka
Copy link
Contributor Author

yu-re-ka commented Oct 18, 2021

Switched to draft status since this is not really useful on its own and the remaining fixes are still WIP.

See yu-re-ka@c3ff994
We need patches on rustc or it will produce binaries that segfault, because in the Rust world it is assumed that musl => statically linked and bundled libc.
Also need to build cargo with our own rustc (the one with patches) instead of the binary one, or it won't build.

@yu-re-ka yu-re-ka closed this Dec 7, 2021
@alyssais alyssais mentioned this pull request Jul 1, 2022
@yu-re-ka yu-re-ka mentioned this pull request Aug 13, 2022
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants