XML::SAX: fix cross-compilation#419834
Conversation
pkgs/top-level/perl-packages.nix
Outdated
There was a problem hiding this comment.
--replace-fail "\$(PERL)" "${lib.getExe buildPackages.perl}" avoids the emulator and also fixes the build for me. Does it fully work for your use case (e.g. at runtime)?
There was a problem hiding this comment.
Does it fully work for your use case (e.g. at runtime)?
Unfortunately I don't know how to use or test it. I actually have zero experience with Perl. The only reason I am fixing cross-compilation here is because I am trying to cross-compile LibreOffice and it depends on XML::SAX.
There was a problem hiding this comment.
building the package as you have here, and the version SFrijters suggests, they look to be pretty much identical. you can use diff -Naur /nix/store/$hash1-perl5.40.0-XML-SAX-1.02-aarch64-unknown-linux-gnu /nix/store/$hash2-perl5.40.0-XML-SAX-1.02-aarch64-unknown-linux-gnu to get a sense of how minor or major the differences are.
I'd suggest applying SFrijters' change, but either should work.
|
Also, you probably need to retarget to staging, going by the large number of rebuilds. |
pkgs/top-level/perl-packages.nix
Outdated
There was a problem hiding this comment.
building the package as you have here, and the version SFrijters suggests, they look to be pretty much identical. you can use diff -Naur /nix/store/$hash1-perl5.40.0-XML-SAX-1.02-aarch64-unknown-linux-gnu /nix/store/$hash2-perl5.40.0-XML-SAX-1.02-aarch64-unknown-linux-gnu to get a sense of how minor or major the differences are.
I'd suggest applying SFrijters' change, but either should work.
Sure! I'll apply the suggestions as soon as I have some time to do that. |
bf807dd to
fd6db38
Compare
|
Oh no... I forgot I was targeting |
|
The PR's base branch is set to staging, but 55 commits from the master branch are included. Make sure you know the right base branch for your changes, then:
|
``` perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()" ``` This line is already being executed in Makefile.PL, but it directly calls Perl binary [1] and thus has to be substituted with a cross version. Moreover, we now have to use the emulator. [1] https://metacpan.org/release/GRANTM/XML-SAX-1.02/source/Makefile.PL#L56
fd6db38 to
e850369
Compare
Closes #419409.
This line is already being executed in upstream Makefile.PL, but it directly calls a Perl binary and thus has to be substituted with a cross version.
Moreover, we now have to use the emulator, but maybe this can be done more efficiently without it?
Tested:
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.