Skip to content

gst_all_1.gst-plugins-base: fix compilation#329452

Closed
flokli wants to merge 1 commit intoNixOS:stagingfrom
flokli:gst-plugins-base
Closed

gst_all_1.gst-plugins-base: fix compilation#329452
flokli wants to merge 1 commit intoNixOS:stagingfrom
flokli:gst-plugins-base

Conversation

@flokli
Copy link
Member

@flokli flokli commented Jul 23, 2024

wayland-scanner is in wayland.bin.
This previously only worked as wayland propagated its bin output.

See #328804 for context.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux (cross-compiled from x86_64)
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 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.

Add a 👍 reaction to pull requests you find important.

`wayland-scanner` is in `wayland.bin`.
This previously only worked as wayland propagated its `bin` output.

See NixOS#328804 for context.
@SomeoneSerge
Copy link
Contributor

It seems that the host's wayland-scanner isn't leaking through PATH after all. Adding echo PATH=$PATH to preBuild:

PATH=/nix/store/ll2b6cslly4v30im7qk34f9y21ziiz1i-cmake-3.29.6/bin:/nix/store/qdb895193mlnczgcffcxwpac6pj252ai-aarch64-unknown-linux-gnu-pkg-config-wrapper-0.29.2/bin:/nix/store/a3n2vxsni6084nn5zcwy35lrvkwmz09y-wayland-1.22.0-bin/bin:/nix/store/yq6n8b0mnk0qxzbs3ajsjcp8ziwqylrl-patchelf-0.15.0/bin:/nix/store/gyfwnd1v9w911gw16ps5rx9ha2r9q2yw-aarch64-unknown-linux-gnu-gcc-wrapper-13.3.0/bin:/nix/store/4wx8k9iig0m3if1zcd2bh0q12hgvwnis-aarch64-unknown-linux-gnu-gcc-13.3.0/bin:/nix/store/n4nlm3h87gmp33nfpvzs1jnknj25c5v6-glibc-aarch64-unknown-linux-gnu-2.39-52-bin/bin:/nix/store/dhv5gh89him9a7ddr56cqg87zfkmjihp-coreutils-9.5/bin:/nix/store/0yicrw03llxadl8yhkya0gkhxb1cbwrw-aarch64-unknown-linux-gnu-binutils-wrapper-2.42/bin:/nix/store/k85314anqw1y1lc7rmxbv4miyfdlyzcj-aarch64-unknown-linux-gnu-binutils-2.42/bin:/nix/store/dhv5gh89him9a7ddr56cqg87zfkmjihp-coreutils-9.5/bin:/nix/store/j71whmq49hfcvhpn4wqzrqcnbq5mafic-findutils-4.10.0/bin:/nix/store/8ynk6xvczjnjv81bfghkjwrap0hn6qah-diffutils-3.10/bin:/nix/store/cdhx572ij0pvn9ayd33lk8118137j6m8-gnused-4.9/bin:/nix/store/mdiqq9b2rvv7fajlmg3f7d6r6g78l547-gnugrep-3.11/bin:/nix/store/a5rvjq2ir4d1wnxwdf4a9zf6hfc6ydsx-gawk-5.2.2/bin:/nix/store/0a0khkw34v25q8k6p44ma1rqa479r1za-gnutar-1.35/bin:/nix/store/aw1kk0gvw7j4vmjxhha2fj2jfsvgrd1p-gzip-1.13/bin:/nix/store/wr6x94hzs5ggmpql0qx5j8q2rpfrhm7q-bzip2-1.0.8-bin/bin:/nix/store/m9288777y854d5k0xkxgacc8rslrhb8r-gnumake-4.4.1/bin:/nix/store/m101dg80ngyjdb02g6jwy80sr7kzj26g-bash-5.2p26/bin:/nix/store/32yyy66vqi5ijh2nfas2nc83sw7qbgn1-patch-2.7.6/bin:/nix/store/0rlbqq6p9wwb7wbn5vnpck40c76czid3-xz-5.6.2-bin/bin:/nix/store/mhk0cm9nrjs855aq1vcivra9z9g9hn44-file-5.45/bin

This makes sense because wayland.dev in buildInputs has offsets (0, 1) (can be seen with env.NIX_DEBUG="6") which don't pass the guard at

if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then
addToSearchPath _PATH "$pkg/bin"
fi

Host's wayland.dev includes e.g. lib/pkgconfig/wayland-scanner.pc, but I don't think that broke the cross, because this wouldn't have got fixed by shrinking propagatedBuildOutputs.

I now see that host's wayland.bin also includes a lib/pkgconfig/wayland-scanner.pc (👀)...

@flokli
Copy link
Member Author

flokli commented Jul 23, 2024

We did some more digging, and while trying to build the gnome and plasma tests I uncovered a bunch of other binaries failing to build. I started changing some of these dependencies to wayland.bin, but it's getting a bit too much.

It's unclear why "build systems" (CMakes' find_program`) pick up the host executable instead of the build executable.

Also, the interaction between wayland-scanner, wayland.bin etc are still a bit unclear, we don't quite understand why we seem to be shipping our own custom wayland-scanner.pc file in waylands' bin, alias wayland-scanner to wayland.bin etc, and why we cannot just replace most of this with only wayland, without the additional nixpkgs attributes and custom .pc file. (cc @primeos, @K900 )

However, we don't want to keep staging broken while doing this research, so let's revert the wayland change for now.

@flokli flokli closed this Jul 23, 2024
@flokli
Copy link
Member Author

flokli commented Jul 23, 2024

Revert PR in #329523.

@emilazy
Copy link
Member

emilazy commented Jul 23, 2024

It's unclear why "build systems" (CMakes' find_program`) pick up the host executable instead of the build executable.

This seems related to #318226; cc @paparodeo?

@paparodeo
Copy link
Contributor

paparodeo commented Jul 23, 2024

It's unclear why "build systems" (CMakes' find_program`) pick up the host executable instead of the build executable.

This seems related to #318226; cc @paparodeo?

yeah, strict deps is broken for cmake because cmake will pull executable from buiildInputs which is exactly what you don't want. FWIW i stopped working on the PR given all my other stalled PRs i didn't want to spend more time on it just to have it go nowhere.

[edit] if i get a commitment from a committer to review and push it thru i'll resume working on it but am not planning on resuming otherwise.

@SomeoneSerge SomeoneSerge mentioned this pull request Jul 24, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants