Skip to content

Error in compiling libvdpau-va-gl #211

@UnwhiteCat

Description

@UnwhiteCat

I am an Archlinux user using home manager. Here is my configuration file.

# flake.nix
{
  description = "Home Manager configuration of unwhitecat";

  inputs = {
    # Specify the source of Home Manager and Nixpkgs.
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nixgl = {
      url = "github:nix-community/nixGL";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs =
    { nixpkgs, home-manager, nixgl, ... }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs {
        inherit system;
        config.allowUnfree = true;
        overlays = [ nixgl.overlay ];
      };
    in
    {
      homeConfigurations."unwhitecat" = home-manager.lib.homeManagerConfiguration {
        inherit pkgs;

        # Specify your home configuration modules here, for example,
        # the path to your home.nix.
        modules = [ 
          ./home.nix
        ];

        # Optionally use extraSpecialArgs
        # to pass through arguments to home.nix
        extraSpecialArgs = {
          inherit nixgl;
        };
      };
    };
}
# home.nix
{ config, pkgs, nixgl, ... }:

{
  # Home Manager needs a bit of information about you and the paths it should
  # manage.
  home.username = "foo";
  home.homeDirectory = "/home/foo";

  # This value determines the Home Manager release that your configuration is
  # compatible with. This helps avoid breakage when a new Home Manager release
  # introduces backwards incompatible changes.
  #
  # You should not change this value, even if you update Home Manager. If you do
  # want to update the value, then make sure to first check the Home Manager
  # release notes.
  home.stateVersion = "25.05"; # Please read the comment before changing.

  # The home.packages option allows you to install Nix packages into your
  # environment.
  home.packages = [
    # # Adds the 'hello' command to your environment. It prints a friendly
    # # "Hello, world!" when run.
    # pkgs.hello

    # # It is sometimes useful to fine-tune packages, for example, by applying
    # # overrides. You can do that directly here, just don't forget the
    # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
    # # fonts?
    # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })

    # # You can also create simple shell scripts directly inside your
    # # configuration. For example, this adds a command 'my-hello' to your
    # # environment:
    # (pkgs.writeShellScriptBin "my-hello" ''
    #   echo "Hello, ${config.home.username}!"
    # '')
    (config.lib.nixGL.wrap pkgs.qq)
  ];

  nixGL = {
    packages = nixgl.packages;
    defaultWrapper = "mesa";
    offloadWrapper = "nvidiaPrime";
    installScripts = [ "mesa" "nvidiaPrime" ];
  };

  # Home Manager is pretty good at managing dotfiles. The primary way to manage
  # plain files is through 'home.file'.
  home.file = {
    # # Building this configuration will create a copy of 'dotfiles/screenrc' in
    # # the Nix store. Activating the configuration will then make '~/.screenrc' a
    # # symlink to the Nix store copy.
    # ".screenrc".source = dotfiles/screenrc;

    # # You can also set the file content immediately.
    # ".gradle/gradle.properties".text = ''
    #   org.gradle.console=verbose
    #   org.gradle.daemon.idletimeout=3600000
    # '';
    ".config/plasma-workspace/env/00-home-manager.sh" = {
      text = ". $HOME/.profile";
    };
  };

  # Home Manager can also manage your environment variables through
  # 'home.sessionVariables'. These will be explicitly sourced when using a
  # shell provided by Home Manager. If you don't want to manage your shell
  # through Home Manager then you have to manually source 'hm-session-vars.sh'
  # located at either
  #
  #  ~/.nix-profile/etc/profile.d/hm-session-vars.sh
  #
  # or
  #
  #  ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
  #
  # or
  #
  #  /etc/profiles/per-user/unwhitecat/etc/profile.d/hm-session-vars.sh
  #
  home.sessionVariables = {
    # EDITOR = "emacs";
    EDITOR = "nvim";
    XCURSOR_PATH = "$XCURSOR_PATH:$HOME/.local/share/icons:/usr/share/icons";
  };

 # Let Home Manager install and manage itself.
  programs.home-manager.enable = true;
}

The error message

$ home-manager switch
evaluation warning: `mesa.drivers` is deprecated, use `mesa` instead
evaluation warning: `mesa.drivers` is deprecated, use `mesa` instead
error: Cannot build '/nix/store/qandx1v1y23bkynrjnzd5fx7wx8shmfr-libvdpau-va-gl-0.4.2.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/fkdw14r2s8ag80cw7x5yv67d4m8qqq2r-libvdpau-va-gl-0.4.2
       Last 25 log lines:
       > This warning is for project developers.  Use -Wno-dev to suppress it.
       >
       > -- The C compiler identification is GNU 14.3.0
       > -- The CXX compiler identification is GNU 14.3.0
       > -- Detecting C compiler ABI info
       > -- Detecting C compiler ABI info - done
       > -- Check for working C compiler: /nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/gcc - skipped
       > -- Detecting C compile features
       > -- Detecting C compile features - done
       > -- Detecting CXX compiler ABI info
       > -- Detecting CXX compiler ABI info - done
       > -- Check for working CXX compiler: /nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/g++ - skipped
       > -- Detecting CXX compile features
       > -- Detecting CXX compile features - done
       > CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
       >   Compatibility with CMake < 3.5 has been removed from CMake.
       >
       >   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
       >   to tell CMake that the project requires at least <min> but has been updated
       >   to work with policies introduced by <max> or earlier.
       >
       >   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
       >
       >
       > -- Configuring incomplete, errors occurred!
       For full logs, run:
         nix log /nix/store/qandx1v1y23bkynrjnzd5fx7wx8shmfr-libvdpau-va-gl-0.4.2.drv
error: Cannot build '/nix/store/rbiq45ni2g4k7a87zwwh5v4qgp963sw9-nixGLIntel.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/429p0136zxwmrw8aihsrk5qjprx3i7hm-nixGLIntel
error: Cannot build '/nix/store/hspadl8z1jwrp7mwkq3h4wn67aafjxwz-nixGLCombinedWrapper-Intel.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/nnn1gwc34kwl4bvjmikvzv0gpg7097ci-nixGLCombinedWrapper-Intel
error: Cannot build '/nix/store/6f6n6yjin4xahd5h33x4lwmlnfsdbzbl-nixGLMesa.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/af21bxqv02x5nz04visq6mhmzmm0iwxz-nixGLMesa
error: Cannot build '/nix/store/fbxq3wg84fmak9dy2p80m0bc4jw9xs4k-home-manager-path.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/hr7fkwf8fvh5niccaq0lkxcglrc6chl1-home-manager-path
error: Cannot build '/nix/store/9hpa0dn4xld4ixhirg9x1bi7cj2bjn27-home-manager-generation.drv'.
       Reason: 1 dependency failed.
       Output paths:
         /nix/store/21l8bh9csxry514xnlcgq19h10zg6cpy-home-manager-generation

Building log

$ nix log /nix/store/qandx1v1y23bkynrjnzd5fx7wx8shmfr-libvdpau-va-gl-0.4.2.drv
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/a6cpc6j20yxl8dlf4x8i7ndmjjlyjbc7-source
source root is source
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_IN>
CMake Warning (dev) at CMakeLists.txt:1 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 14.3.0
-- The CXX compiler identification is GNU 14.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /nix/store/dmypp1h4ldn0vfk3fi6yfyf5yxp9yz0k-gcc-wrapper-14.3.0/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions