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

libavif: add pcre2 to fix cross #250610

Closed
wants to merge 1 commit into from
Closed

libavif: add pcre2 to fix cross #250610

wants to merge 1 commit into from

Conversation

ghost
Copy link

@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
@lopsided98
Copy link
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
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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant