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

perl536Packages: cross fixes #225086

Closed
wants to merge 27 commits into from

Conversation

apfelkuchen6
Copy link
Contributor

Description of changes

This fixes the cross compilation of several perl packages that are in the closure of biber.

Most of these fixes are simply adding buildPackages.perl to nativeBuildInputs. This doesn't change anything for native builds since these pull in perl anyway. Cross builds use a minimal perl copy perl.mini (this does not exist for native), which suffices for bootstrapping perl and running simple build scripts, but not for the builds scripts of the derivations changed here: They mostly fail with error messages like

perl says : Can't load module B, dynamic loading not available in this perl
  (You may need to build a new perl executable which either supports
  dynamic loading or has the B module statically linked into it.)
 at (eval 11) line 1.

I can split this into multiple PRs if desirable, but most of the builds cannot be tested indepentently because of many inter-dependencies.

Things done
  • Built on platform(s)
    • x86_64-linux (native and for aarch64).
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 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.

@@ -255,6 +255,7 @@ let
url = "mirror://cpan/authors/id/P/PL/PLICEASE/Alien-Build-2.37.tar.gz";
hash = "sha256-MAC8vphIJkP3a7z/zkL9SPJMY6ZFf4qiwWlfSBrJ7VE=";
};
nativeBuildInputs = [ buildPackages.perl ];
Copy link
Contributor

Choose a reason for hiding this comment

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

We should provide a comment to this hack and the assignment (which is an implicit override of perl.mini) should only be done for cross-compilation (to document the intention).

Copy link
Contributor Author

@apfelkuchen6 apfelkuchen6 Apr 8, 2023

Choose a reason for hiding this comment

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

My thought process behind not guarding was "a full perl is also required for native builds, so this is just more explicit". On the other hand, guarding this with /nix/store/av8clvjy4d91ybmsc92lgaxnvlif4g6l-perl5.36.0-Alien-Build-2.37-i686-unknown-linux-gnu.drv also has the additional benefit that it doesn't change the evaluation for native builds, (hopefully) cutting down the number of rebuilds significantly. Will update.

Adding a simple comment like "when cross-compiling, buildPerlPackage only appends perl.mini to nativeBuildInputs, but this build needs a full perl" to each of these lines should be enough, right?
edit: the wording from your PR #222427 ("Override default intepreter perl.mini") is better

@apfelkuchen6 apfelkuchen6 marked this pull request as draft April 8, 2023 20:29
@apfelkuchen6
Copy link
Contributor Author

Marked as draft for now, see #222427

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.

2 participants