perlPackages.ModuleBuild and .FileBaseDir: fix cross-compilation WIP#222427
perlPackages.ModuleBuild and .FileBaseDir: fix cross-compilation WIP#222427ck3d wants to merge 2 commits intoNixOS:stagingfrom
Conversation
pkgs/top-level/perl-packages.nix
Outdated
There was a problem hiding this comment.
use addToSearchPath PATH "$fullperl/bin"
There was a problem hiding this comment.
Your proposal doesn't work. The function addToSearchPath adds dir at the end off and not at the beginning.
|
@ofborg build pkgsCross.aarch64-multiplatform.xdg-utils |
|
I added the same patch to FileBaseDir. You can now cross-compile xdg-utils |
|
Basically the same fix, but in another approach, is being carried out in #225086, may you also take a look? |
|
Thanks, looks better than my approach. I will update this PR. |
5d96bb2 to
8795962
Compare
apfelkuchen6
left a comment
There was a problem hiding this comment.
LGTM.
Since this causes 0 rebuilds, this can go to master directly.
|
Isn't the reason why we use miniperl is that the normal perl doesn't cross compile stuff? |
|
Oh, shit: In this case, there are no binaries in there and the result probably runs on aarch64 (I'll test), but this approach will totally break for things that build perl modules. Edit: the "cross-compiled" File::BaseDir (non-native) perl module successfully loads on aarch64. |
|
The differences between perl and perl.mini in case of cross compilation are:
I will mark this PR as WIP as long we did not fix these issues. |
|
I close this PR in favor of #225640 |
Description of changes
This PR fixes #66741, the cross compilation for Perl module ModuleBuild and FileBaseDir. Following command will succeed:
A cross compiled Perl module gets pkgs.perl.mini passed instead of pkgs.perl. The mini do not allow dynamic loading, which causes errors during build.
definition of perl.mini:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/perl/default.nix#L34
usage of perl.mini:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/perl-modules/generic/default.nix#L46
Following issues suffer from the same problem and can hopefully fixed in a similar way:
perlPackages.Testutf8fails when cross-compiling #198548Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)