Closed truvatech closed 1 year ago
This occurred for me when I tried to run Davinci Resolve via nix run --impure
or nix shell --impure
, but not when I installed it via my host configuration. This + the line
/nix/store/5s1yg5l36wzgy1dj0vv1ibarc4g7vrdr-stdenv-linux/setup: line 136: pop_var_context: head of shell_variables not a function context
Makes me wonder if this issue is related to how environment variables are managed.
This occurred for me when I tried to run Davinci Resolve via
nix run --impure
ornix shell --impure
Yeah. That's the issue. Probably related to #223803?
but not when I installed it via my host configuration.
This means that your nix channels are not recent enough for the build to fail.
This + the line
/nix/store/5s1yg5l36wzgy1dj0vv1ibarc4g7vrdr-stdenv-linux/setup: line 136: pop_var_context: head of shell_variables not a function context
Makes me wonder if this issue is related to how environment variables are managed.
This line has no actual meaning: it simply means that the build fails.
I think #223803 is still valid. Looking at the build logs im seeing the following:
davinci-resolve> ++ appimage-run ./DaVinci_Resolve_17.4.3_Linux.run -i -y -n -C /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3
davinci-resolve> Uncompress DaVinci_Resolve_17.4.3_Linux.run of type 02 @ offset 190880
davinci-resolve> DaVinci_Resolve_17.4.3_Linux.run is now installed in /build/home/.cache/appimage-run/0942a051d270a19f39d312a347c8cd0ebf45327aed008646f99d7bff78d5d8c4
davinci-resolve> This will install DaVinci Resolve on this computer
davinci-resolve> #Starting DaVinci Resolve install
davinci-resolve> Linux localhost 5.15.94 #1-NixOS SMP Tue Feb 14 18:18:05 UTC 2023 x86_64 GNU/Linux
davinci-resolve> Install Location : /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3
davinci-resolve> User ID: 0
davinci-resolve> User Home: /build
davinci-resolve> Error: Installer failed
davinci-resolve> Failed to copy file: share
davinci-resolve> ++ mkdir -p /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/configs /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/DolbyVision /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/easyDCP /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/Fairlight /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/GPUCache /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/logs /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/Media '/nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/Resolve Disk Database' /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/.crashreport /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/.license /nix/store/cmk9srlyrxj5081zq0jvrx98114i739r-davinci-resolve-17.4.3/.LUT
davinci-resolve> ++ runHook postInstall
Still looking into it, maybe an issue with appimage
davinci-resolve> rewriting symlink /nix/store/sm7rs52pinjfh47iwh7mspnrzp9qv2lw-davinci-resolve-17.4.3/libs/libcrypt.so.1 to be relative to /nix/store/sm7rs52pinjfh47iwh7mspnrzp9qv2lw-davinci-resolve-17.4.3
git/nixpkgs git:(6b5a17c57d4)ls
CONTRIBUTING.md COPYING default.nix doc flake.nix lib maintainers nixos pkgs README.md result
git/nixpkgs git:(6b5a17c57d4)cd result
nixpkgs/result ls
bin
nixpkgs/result cd bin
result/bin ls
davinci-resolve
result/bin ./davinci-resolve
Tried building on 6b5a17c57d424baa3411fae0d321f94f4d85efe3
a commit shortly before #225748 and its working fine..
@jshcmpbll thanks, had to wrap my head around pinning a specific nixpkgs commit, but I managed to get the system updated based on your commit suggestion. Adding this here in case it helps anybody else:
let pkgs = import (builtins.fetchTarball { url = "https://github.com/NixOS/nixpkgs/archive/6b5a17c57d424baa3411fae0d321f94f4d85efe3.tar.gz"; }) { config.allowUnfree = true; config.permittedInsecurePackages = [ "python-2.7.18.6" ]; }; myDavinci = pkgs.davinci-resolve; in
and replacing davinci-resolve with myDavinci in system or user packages
Made a little more progress. Looks like #225748 also changed appimage-run
. I was originally thinking it was an issue with the changes done to the davinci derivation but it was actually the change to appimage-run
that is causing davinci to no longer build.
If you modify the appimage-run
derivation to use buildFHSEnvChroot
instead of buildFHSEnv
davinci builds.
I'm guessing that's not something likely to change though.. so I might have to come up with a different solution.
@Atemu Im pretty unfamiliar with the changes made to buildFHSEnv
so if you have any suggestions I would greatly appreciate it 😄
I can override it as seen in the PR below but I'm just not sure if that is a valid solution.
Returning it to chroot is a valid workaround. Obviously, we'd want to get it fixed but that requires a more thorough investigation.
I'm interested why it fixes this error though as this rather looks like fallout from the libxcrypt migration?
The solution to the issue at hand should be to have libxcrypt-legacy or check whether we actually still need to symlink it in the first place.
Steps To Reproduce
Steps to reproduce the behavior: nixos-rebuild switch
Build log
Additional context
Havn't updated this computer in a couple of weeks and now Davinci won't let me update NixOS as it fails the build
Notify maintainers
@jshcmpbll
Metadata
"x86_64-linux"
Linux 6.1.22, NixOS, 23.05 (Stoat), 23.05pre470969.0e19daa510e
yes
yes
nix-env (Nix) 2.13.3
"nixos"
/nix/var/nix/profiles/per-user/root/channels/nixos