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

wayland: fix cross #105103

Merged
merged 1 commit into from Nov 27, 2020
Merged

wayland: fix cross #105103

merged 1 commit into from Nov 27, 2020

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Nov 27, 2020

meson needs to invoke nm from binutils during build

Motivation for this change
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 nixpkgs-review --run "nixpkgs-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.

@flokli flokli added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Nov 27, 2020
@ofborg ofborg bot requested a review from codyopel November 27, 2020 00:56
@SuperSandro2000
Copy link
Member

Please target staging.

@@ -42,20 +57,32 @@ in stdenv.mkDerivation rec {

depsBuildBuild = [
pkgconfig
binutils
Copy link
Member

Choose a reason for hiding this comment

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

This is the diff is anyone is searching for it.

Copy link
Contributor

@lukegb lukegb left a comment

Choose a reason for hiding this comment

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

Before:

$ nix build -f . pkgsCross.aarch64-multiplatform.wayland
error: build of '/nix/store/69j04pdvzrjxkf34wfkvc1bhdqkcdssg-wayland-1.18.0-aarch64-unknown-linux-gnu.drv' on 'ssh://whitby' failed: builder for '/nix/store/69j04pdvzrjxkf34wfkvc1bhdqkcdssg-wayland-1.18.0-aarch64-unknown-linux-gnu.drv' failed with exit code 1
builder for '/nix/store/69j04pdvzrjxkf34wfkvc1bhdqkcdssg-wayland-1.18.0-aarch64-unknown-linux-gnu.drv' failed with exit code 1; last 10 log lines:
  Build-time dependency wayland-scanner found: YES 1.18.0
  Program /nix/store/xmkd03p5i7pzjxqvsngyflmlhjl7dmxj-wayland-1.18.0/bin/wayland-scanner found: YES (/nix/store/xmkd03p5i7pzjxqvsngyflmlhjl7dmxj-wayland-1.18.0/bin/wayland-scanner)
  Library m found: YES
  Run-time dependency threads found: YES
  Program nm found: NO
  
  egl/meson.build:14:0: ERROR: Program 'nm' not found
  
  A full log can be found at /build/wayland-1.18.0/build/meson-logs/meson-log.txt
  builder for '/nix/store/69j04pdvzrjxkf34wfkvc1bhdqkcdssg-wayland-1.18.0-aarch64-unknown-linux-gnu.drv' failed with exit code 1
[3 built (1 failed), 58 copied (977.7 MiB), 194.5 MiB DL]
error: build of '/nix/store/69j04pdvzrjxkf34wfkvc1bhdqkcdssg-wayland-1.18.0-aarch64-unknown-linux-gnu.drv' failed

After:

$ nix build -f . pkgsCross.aarch64-multiplatform.wayland
[4 built, 34 copied (837.4 MiB), 163.2 MiB DL]

@Ericson2314
Copy link
Member

See nm being mentioned in the postPatch? I think the issue is that it's not doing anything anymore. We should probably convert this from a sed to a patch so we'll catch this in the future.

substituteInPlace stopped working, let's replace this with a patch which
is more reliable.
Copy link
Member

@primeos primeos left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@primeos primeos merged commit ab0607e into NixOS:staging Nov 27, 2020
@flokli flokli deleted the nixos-cross-wayland branch November 27, 2020 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 101-500 10.rebuild-linux: 501+ 10.rebuild-linux: 5001+
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants