Skip to content

libavif: add pcre2 to fix cross#250610

Closed
ghost wants to merge 1 commit intomasterfrom
unknown repository
Closed

libavif: add pcre2 to fix cross#250610
ghost wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Aug 21, 2023

Description of changes

libavif appears to require pcre2, which it can find (indirectly) through the nativeBuildInputs for native builds. For cross builds we need to add it explicitly.

Error which this fixed:

-- Found PkgConfig: /nix/store/13a2qvyl3lfcw0i50kfzlry5apjagn9f-aarch64-unknown-linux-gnu-pkg-config-wrapper-0.29.2/bin/aarch64-unknown-linux-gnu-pkg-config (found version
"0.29.2")
-- Checking for one of the modules 'gdk-pixbuf-2.0'
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.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.

libavif appears to require pcre2, which it can find (indirectly)
through the nativeBuildInputs for native builds.  For cross builds
we need to add it explicitly.

Error which this fixed:

```
-- Found PkgConfig: /nix/store/13a2qvyl3lfcw0i50kfzlry5apjagn9f-aarch64-unknown-linux-gnu-pkg-config-wrapper-0.29.2/bin/aarch64-unknown-linux-gnu-pkg-config (found version
"0.29.2")
-- Checking for one of the modules 'gdk-pixbuf-2.0'
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found
Package libpcre2-8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre2-8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre2-8', required by 'glib-2.0', not found
```
@ghost ghost marked this pull request as ready for review August 21, 2023 20:28
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Aug 21, 2023
@ofborg ofborg bot requested a review from mkg20001 August 21, 2023 20:56
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Aug 21, 2023
@lopsided98
Copy link
Copy Markdown
Contributor

That error occurs in the native build as well, and appears to be caused by harmless missing Requires.private dependencies. The real error is later:

Builder called die: Cannot wrap '/nix/store/vnrgzs1llc6a9a7md9pnmgkzbcgqhy7z-gdk-pixbuf-armv6l-unknown-linux-gnueabihf-2.42.10/bin/gdk-pixbuf-thumbnailer' because it is not an executable file
Backtrace:
7 assertExecutable /nix/store/l27vvihygpnqcbjz34imfjj6dj2jx3bn-make-shell-wrapper-hook/nix-support/setup-hook
43 makeShellWrapper /nix/store/l27vvihygpnqcbjz34imfjj6dj2jx3bn-make-shell-wrapper-hook/nix-support/setup-hook
36 makeWrapper /nix/store/l27vvihygpnqcbjz34imfjj6dj2jx3bn-make-shell-wrapper-hook/nix-support/setup-hook
132 _callImplicitHook /nix/store/ypp192asf7wwb2da0df4v7c9jgd8mf7r-stdenv-linux/setup
144 _eval /nix/store/ypp192asf7wwb2da0df4v7c9jgd8mf7r-stdenv-linux/setup
87 runHook /nix/store/ypp192asf7wwb2da0df4v7c9jgd8mf7r-stdenv-linux/setup
1404 installPhase /nix/store/ypp192asf7wwb2da0df4v7c9jgd8mf7r-stdenv-linux/setup
1596 genericBuild /nix/store/ypp192asf7wwb2da0df4v7c9jgd8mf7r-stdenv-linux/setup
6 main /nix/store/6xg259477c90a229xwmb53pdfkn6ig3g-default-builder.sh

@lopsided98
Copy link
Copy Markdown
Contributor

It looks like gdk-pixbuf simply doesn't support thumbnailers when cross-compiling: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/blob/master/meson.build#L376.

We should probably just disable gdk-pixbuf support in libavif when cross-compiling.

@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 23, 2023

#250813

@ghost ghost closed this Aug 23, 2023
@ghost ghost deleted the pr/cross/libavif branch August 23, 2023 05:33
This pull request was closed.
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 platform than they will be used on 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant