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

groff: Fix cross-compilation #73088

Merged
merged 1 commit into from Dec 6, 2019
Merged

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Nov 9, 2019

Fixup the patch from 4f3c817 so it
applies to the current groff.

The patch was removed, but cross-compilation not validated, in #70500.

Motivation for this change

Quite obviously, to fix cross-compilation of groff!

/nix/store/zavn4np1jvm79f0rafkv0p1mrag09qkz-bash-4.4-p23/bin/bash: ar: command not found
make[1]: *** [Makefile:5896: libdriver.a] Error 127
make[1]: Leaving directory '/build/groff-1.22.4'
make: *** [Makefile:5600: all] Error 2
builder for '/nix/store/0mjqs0y4af5fnhy1cb4bnh1b1spxnvk8-groff-1.22.4-aarch64-unknown-linux-gnu.drv' failed with exit code 2
error: build of '/nix/store/0mjqs0y4af5fnhy1cb4bnh1b1spxnvk8-groff-1.22.4-aarch64-unknown-linux-gnu.drv' on 'ssh://samuel@duffman' failed: builder for '/nix/store/0mjqs0y4af5fnhy1cb4bnh1b1spxnvk8-groff-1.22.4-aarch64-unknown-linux-gnu.drv' failed with exit code 2
builder for '/nix/store/0mjqs0y4af5fnhy1cb4bnh1b1spxnvk8-groff-1.22.4-aarch64-unknown-linux-gnu.drv' failed with exit code 1
error: build of '/nix/store/0mjqs0y4af5fnhy1cb4bnh1b1spxnvk8-groff-1.22.4-aarch64-unknown-linux-gnu.drv' failed
Things done
  • ✔️ Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • ✔️ NixOS
    • ❌ macOS
    • ❌ other Linux distributions
  • ❌ Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • ❌ Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • ❌ Tested execution of all binary files (usually in ./result/bin/)
  • ❌ Determined the impact on package closure size (by running nix path-info -S before and after)
  • ✔️ Ensured that relevant documentation is up to date
  • ✔️ Fits CONTRIBUTING.md.
Notify maintainers

cc @tilpner

Fixup the patch from 4f3c817 so it
applies to the current groff.

The patch was removed, but cross-compilation not validated, in NixOS#70500.
@tilpner
Copy link
Member

tilpner commented Nov 9, 2019

I'm very sorry about breaking cross-compilation, how do you recommend I avoid that in the future?

I'll be more careful about patches that don't seem to matter, but how should one actually test cross-compilation? For which host-target combinations? (Any combination is better than none?)

@samueldr
Copy link
Member Author

samueldr commented Nov 9, 2019

I'm very sorry about breaking cross-compilation, how do you recommend I avoid that in the future?

It happens, and it will happen. I don't think we have the tooling, and especially, the required metadata to know. Don't beat yourself up too much :).

I'll be more careful about patches that don't seem to matter, but how should one actually test cross-compilation? For which host-target combinations? (Any combination is better than none?)

I may be wrong, and definitely am biased, but I would assume armv7l and/or aarch64 from an x86_64 host is sufficient, unless noted (how?) otherwise. There's also the greater issue of building for musl, rather than gnu, which I now realize I don't really know about.

@veprbl veprbl added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Nov 11, 2019
@FRidh FRidh added this to Needs review in Staging Nov 12, 2019
@flokli
Copy link
Contributor

flokli commented Dec 6, 2019

I can confirm this fixes groff cross-compilation, which is required for man, which is pretty useful to have on NixOS :-)

@flokli flokli merged commit fdc71ff into NixOS:staging Dec 6, 2019
Staging automation moved this from Needs review to Done Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants