Describe the bug
kodi build fails.
To Reproduce
Using the current master branch:
nix build -f https://github.com/NixOS/nixpkgs/archive/2fb5dac372fedd482ef3c65b608810bb7dd45083.tar.gz kodi
Log:
builder for '/nix/store/8r256llh459a0s9bs4d4agwgbvbk6db5-kodi-18.6.drv' failed with exit code 1; last 10 log lines:
/nix/store/f4vmcp2c20mq7vj4jjm70ps3nnm09mfa-cmake-3.17.0/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindXRandR.cmake:29 (find_package_handle_standard_args)
cmake/scripts/common/Macros.cmake:366 (find_package)
cmake/scripts/common/Macros.cmake:380 (find_package_with_ver)
CMakeLists.txt:172 (core_require_dep)
-- Configuring incomplete, errors occurred!
See also "/build/source/build/CMakeFiles/CMakeOutput.log".
See also "/build/source/build/CMakeFiles/CMakeError.log".
cannot build derivation '/nix/store/a6mwrvc4hx6nx16jcazpg22ih0rah35x-kodi-with-plugins-18.6.drv': 1 dependencies couldn't be built
error: build of '/nix/store/a6mwrvc4hx6nx16jcazpg22ih0rah35x-kodi-with-plugins-18.6.drv' failed
Expected behavior
kodi building fine
Notify maintainers
@domenkozar @titanous @edwtjo @peterhoeg @sephalon
Metadata
$ nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.05 MiB download, 0.28 MiB unpacked):
/nix/store/d27ihabal1lgajnjj56i0kg02fnavs5a-bash-interactive-4.4-p23-dev
copying path '/nix/store/d27ihabal1lgajnjj56i0kg02fnavs5a-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...
- system: `"x86_64-linux"`
- host os: `Linux 5.4.28, NixOS, 20.09.git.ae6bdcc5358 (Nightingale)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3.3`
- channels(root): `"nixos-20.09pre216896.0729b8c55e0"`
- channels(jluttine): `""`
- nixpkgs: `/etc/nixpkgs`
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: kodi
# a list of nixos modules affected by the problem
module:
Just encountered this as well and ran a bisect between 22a3bf9fb9edad917fb6cd1066d58b5e426ee975 (which I have as latest generation on my kodi machine) and latest master (at time of starting the bisect: 42c85f251da799548a9d0f445b981ee22733d68c).
I have concluded that the commit that broke kodi was cd00bc2ccd329744228be9ef3f979258947ccf4c which was merged in #84695.
Not sure why though...
Here's my bisect log:
# bad: [42c85f251da799548a9d0f445b981ee22733d68c] Merge pull request #87613 from VirtusLab/git-machete-2.14.0
# good: [22a3bf9fb9edad917fb6cd1066d58b5e426ee975] Merge pull request #85142 from sternenseemann/mirage-crypto
git bisect start 'master' '22a3bf9fb9e'
# bad: [5fda26c3d0ac3f14d884d81482bd75325db683ea] Merge pull request #86628 from peterhoeg/f/unar
git bisect bad 5fda26c3d0ac3f14d884d81482bd75325db683ea
# bad: [1a6bd2bcdc230cdf4f8247f9a52bf37b546382ca] Merge pull request #82313 from iAmMrinal0/update/rescuetime
git bisect bad 1a6bd2bcdc230cdf4f8247f9a52bf37b546382ca
# bad: [99fdbf80c69cbfed2d034010fd02abab10cf43d2] Merge pull request #85816 from ngerstle/bump-keycloak
git bisect bad 99fdbf80c69cbfed2d034010fd02abab10cf43d2
# good: [9aa4a4c7221f381fafdb2fb7d715409774bcde1e] texlab: 1.10.0 -> 2.0.0 (#85700)
git bisect good 9aa4a4c7221f381fafdb2fb7d715409774bcde1e
# bad: [19de59a9bec006c712470f2bfa48bf420c0199b1] Merge pull request #85334 from flokli/systemd-mainline2
git bisect bad 19de59a9bec006c712470f2bfa48bf420c0199b1
# bad: [940c35568bc2fa135eafe0817027c765d9840469] Merge pull request #84485 from xfix/bash-completion-update
git bisect bad 940c35568bc2fa135eafe0817027c765d9840469
# good: [edc1fdd2111a8efe027e8c5d64732d3a94fc046b] Merge pull request #84800 from r-ryantm/auto-update/btrfs-progs
git bisect good edc1fdd2111a8efe027e8c5d64732d3a94fc046b
# bad: [597b1d9e2c41067f79a8f78045ac361929fa3ec1] Merge pull request #84695 from hedning/gnome-3.36.1-staging
git bisect bad 597b1d9e2c41067f79a8f78045ac361929fa3ec1
# bad: [247bddd3116917c00470c4da296f1c1c2fd38136] gobject-introspection: 1.64.0 -> 1.64.1
git bisect bad 247bddd3116917c00470c4da296f1c1c2fd38136
# bad: [95abd75a5940e2e066bbe6ced2cdb9300a722607] librsvg: 2.48.0 -> 2.48.2
git bisect bad 95abd75a5940e2e066bbe6ced2cdb9300a722607
# bad: [cd00bc2ccd329744228be9ef3f979258947ccf4c] atk: 2.35.1 -> 2.36.0
git bisect bad cd00bc2ccd329744228be9ef3f979258947ccf4c
# first bad commit: [cd00bc2ccd329744228be9ef3f979258947ccf4c] atk: 2.35.1 -> 2.36.0
The relevant bit of the error is: Could NOT find XRandR (missing: XRANDR_INCLUDE_DIR).
From the looks of it the include files for libXrandr are in the libXrandr.dev derivation, so I've been able to fix it on master with the following:
diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix
index e4da20c8487..1ef3c9ee70f 100644
--- a/pkgs/applications/video/kodi/default.nix
+++ b/pkgs/applications/video/kodi/default.nix
@@ -179,8 +179,8 @@ in stdenv.mkDerivation {
# libdvdcss libdvdnav libdvdread
]
++ lib.optional x11Support [
- libX11 xorgproto libXt libXmu libXext libXdmcp
- libXinerama libXrandr libXtst libXfixes
+ libX11 xorgproto libXt libXmu libXext.dev libXdmcp
+ libXinerama libXrandr.dev libXtst libXfixes
]
++ lib.optional dbusSupport dbus
++ lib.optional joystickSupport cwiid
(I also had to use libXext.dev so that dpms.h could be found too.)
The main question I have is, is this diff the best way to fix the issue?
I've opened up a PR (https://github.com/NixOS/nixpkgs/pull/87965), but for anyone that wishes to fix this locally, you can change:
environment.systemPackages = with pkgs; [
....
kodi
....
];
to
environment.systemPackages = with pkgs; [
....
(kodiPlain.override { libXext=xorg.libXext.dev; libXrandr=xorg.libXrandr.dev; })
....
];
Just be warned, this will build kodi locally.
Fixed in #87965. Thanks @samdoshi