Cudatoolkit 12.2.2: libQt6WebEngineCore not found

I have:

  • tried installing it normally
  • tried building Qt6 independently before rebuilding
  • tried installing Qt6 in Home Manager before rebuilding
  • stopped caring (but I still need to update my system, so I can’t not care)
command output: nix log /nix/store/n3pws1q0mi3269amsvaf5qhq8zaajva8-cudatoolkit-12.2.2.drv
searching for dependencies of /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/host-linux-x64/libexec/QtWebEngineProcess
    libQt6WebEngineCore.so.6 -> not found!
    libQt6Quick.so.6 -> found: /nix/store/n3lkrgdx93fa9a3af4k37g85l09ipf7l-qtdeclarative-6.6.1/lib
    libQt6QmlModels.so.6 -> found: /nix/store/n3lkrgdx93fa9a3af4k37g85l09ipf7l-qtdeclarative-6.6.1/lib
    libQt6OpenGL.so.6 -> found: /nix/store/rzf4s6idpm8jvkxdp60an9xl6b3c2n9m-qtbase-6.6.1/lib
    libQt6Gui.so.6 -> found: /nix/store/rzf4s6idpm8jvkxdp60an9xl6b3c2n9m-qtbase-6.6.1/lib
    libGLX.so.0 -> found: /nix/store/g2k6pslg3dy4jn2hnz3aahsjvdbfyfgv-libGL-1.7.0/lib
    libOpenGL.so.0 -> found: /nix/store/g2k6pslg3dy4jn2hnz3aahsjvdbfyfgv-libGL-1.7.0/lib
    libQt6WebChannel.so.6 -> found: /nix/store/zaby9vfb1d282mw5dzzclc43lwl76rlw-qtwebchannel-6.6.1/lib
    libQt6Qml.so.6 -> found: /nix/store/n3lkrgdx93fa9a3af4k37g85l09ipf7l-qtdeclarative-6.6.1/lib
    libQt6Network.so.6 -> found: /nix/store/rzf4s6idpm8jvkxdp60an9xl6b3c2n9m-qtbase-6.6.1/lib
    libQt6Positioning.so.6 -> found: /nix/store/k2dk1i0bs6r9ax5g9xv9azy7cc8176ab-qtpositioning-6.6.1/lib
    libQt6Core.so.6 -> found: /nix/store/rzf4s6idpm8jvkxdp60an9xl6b3c2n9m-qtbase-6.6.1/lib
    libstdc++.so.6 -> found: /nix/store/np3cndfk53miqg2cilv7vfdxckga665h-gcc-13.2.0-lib/lib
    libgcc_s.so.1 -> found: /nix/store/kbsb6s8djydiawgswnm8j5bwn1yxaqb7-gcc-13.2.0-libgcc/lib
skipping /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/cuda_sanitizer_api/compute-sanitizer/x86/TreeLauncherSubreaper because its architecture (x86) differs from target (x64)
skipping /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/cuda_sanitizer_api/compute-sanitizer/x86/libTreeLauncherPlaceholder.so because its architecture (x86) differs from target (>
skipping /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/cuda_sanitizer_api/compute-sanitizer/x86/libInterceptorInjectionTarget.so because its architecture (x86) differs from targe>
skipping /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/cuda_sanitizer_api/compute-sanitizer/x86/libTreeLauncherTargetInjection.so because its architecture (x86) differs from targ>
skipping /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/cuda_sanitizer_api/compute-sanitizer/x86/TreeLauncherTargetLdPreloadHelper because its architecture (x86) differs from targ>
skipping /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/cuda_sanitizer_api/compute-sanitizer/x86/libTreeLauncherTargetUpdatePreloadInjection.so because its architecture (x86) diff>
searching for dependencies of /nix/store/8ghq27iw6mddx23z6nhqb0b603w4fmps-cudatoolkit-12.2.2-lib/lib/libcudart.so.12.2.140
auto-patchelf: 5 dependencies could not be satisfied
error: auto-patchelf could not satisfy dependency libQt6WebEngineCore.so.6 wanted by /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/host-linux-x64/Plugins/QuadDPlugin/libQuadDPlug>
error: auto-patchelf could not satisfy dependency libQt6WebEngineCore.so.6 wanted by /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/host-linux-x64/libexec/QtWebEngineProcess
warn: auto-patchelf ignoring missing libcuda.so.1 wanted by /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/target-linux-x64/nvgpucs
warn: auto-patchelf ignoring missing libcom_err.so.2 wanted by /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/target-linux-x64/CollectX/libssl.so.10
warn: auto-patchelf ignoring missing libcuda.so.1 wanted by /nix/store/fprhlb0fgbnwax85kg0kl113a97fbpnq-cudatoolkit-12.2.2/lib/libcuinj64.so.12.2.142
auto-patchelf failed to find all the required dependencies.
Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.
/nix/store/l47sqsm6cfqflz0gsbjmiqcq146qzjix-stdenv-linux/setup: line 74: pop_var_context: head of shell_variables not a function context
/nix/store/l47sqsm6cfqflz0gsbjmiqcq146qzjix-stdenv-linux/setup: line 1479: pop_var_context: head of shell_variables not a function context
/nix/store/l47sqsm6cfqflz0gsbjmiqcq146qzjix-stdenv-linux/setup: line 1582: pop_var_context: head of shell_variables not a function context

NVIDIA RTX 4060 Ti
AMD Ryzen 5 3600
Linux Kernel 6.7.1 (because NVIDIA 550 doesn’t work, 545 does)

CudaToolkit has the webengine as a build dependency AND I have it built separately so I don’t understand why it’s unable to find the .so file :confused:

nix-info output
  • system: "x86_64-linux"
  • host os: Linux 6.7.1, NixOS, 24.05 (Uakari), 24.05.20240202.e92b601
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.18.1
  • channels(root): "nixos, nixpkgs"
  • nixpkgs: /home/noire/.nix-defexpr/channels/nixpkgs

Try using cudaPackages.{lib,cuda_}* instead, they’re better maintained. In particular, I think we replaced all of the vendored qt libraries with the ones from nixpkgs

tried installing it normally
tried building Qt6 independently before rebuilding
tried installing Qt6 in Home Manager before rebuilding
stopped caring (but I still need to update my system, so I can’t not care)

Generally, “installing” stuff globally doesn’t have any effect with nixpkgs software or with nixos. In this case what you need is you need to change the definition of cudatoolkit so as to include the qt stuff in the buildInputs. This way the autoPatchelfHook, used by cudatoolkit, will pick it up and fill in those unmatched DT_NEEDED dependencies. This you can do locally via an overlay as per the nixpkgs manual. You could also just edit a nixpkgs checkout and submit a PR to fix this issue for everyone

1 Like

QtWebEngineProcess looks like a vendored dependencies → should be removed from cudatoolkit (probably)

1 Like

The Qt things are already a build input in the source (L148-L155).

This you can do locally via an overlay as per the nixpkgs manual. You could also just edit a nixpkgs checkout and submit a PR to fix this issue for everyone.

Weird thing is, nobody else has this issue as far as I know. Googled far and wide to no avail. The only post even slightly related to this was investigated by someone that got wiped off the face of the Earth.

I asked my friend to build my configuration and he said that he had no problems:

Message Logs

Noire - Yesterday @ 8:24 PM
the only things that i’ve changed were just things i’ve changed to try and fix the problem
thank you

Dylan - Yesterday @ 8:41 PM
I’m building to see what happens

Dylan - Yesterday @ 8:52 PM


:thinking:

Noire - Yesterday @ 8:54 PM
???????????????????????????????????
wtf

Dylan - Yesterday @ 8:56 PM
maybe try generating your hardware-configuration.nix again

I don’t know how I’d make an overlay in a way that would include this missing library. My first step would be to just add in the webengine into the build inputs, but… it’s already there. Can I please get some pointers? :confused:

The Qt things are already a build input in the source (L148-L155).

That’s not enough if QtWebEngineProcess is vendored by cudatoolkit. The hook is trying to patchelf the vendored QtWebEngineProcess, and for that its (qt) dependencies need to (magically) match exactly the sonames we ship in qt6. Instead, we should delete the vendored copy and make cudatoolkit use our own qtwebengine

 command output: nix log /nix/store/n3pws1q0mi3269amsvaf5qhq8zaajva8-cudatoolkit-12.2.2.drv
❯ nix build -I nixpkgs=flake:github:NixOS/nixpkgs/master -f '<nixpkgs>' --arg config '{ allowUnfree = true; cudaSupport = true; }' cudaPackages_12_2.cudatoolkit -L
...
cudatoolkit> autoAddOpenGLRunpathHook: patching /nix/store/c2skx264c7nmm7c7k6x2mhqhkx211zym-cudatoolkit-12.2.2-lib/lib/libcudart.so.12.2.140
cudatoolkit> rewriting symlink /nix/store/m9jbk510rzci1sasgy7gdahg9j1snamh-cudatoolkit-12.2.2/bin/.compute-sanitizer-wrapped to be relative to /nix/store/m9jbk510rzci1sasgy7gdahg9j1snamh-cudatoolkit-12.2.2
cudatoolkit> fixupPhase completed in 2 minutes 35 seconds
cudatoolkit> Running phase: postPatchMkspecs
❯ readlink -f result
/nix/store/m9jbk510rzci1sasgy7gdahg9j1snamh-cudatoolkit-12.2.2
❯ nix flake metadata github:NixOS/nixpkgs/master
Resolved URL:  github:NixOS/nixpkgs/master
Locked URL:    github:NixOS/nixpkgs/4db8d6d7e7cc1fe70f89a88567da4aa39e6b3f63
Description:   A collection of packages for the Nix package manager
Path:          /nix/store/3apqll3lmv8nfxmc19314734f3cfcj9z-source
Revision:      4db8d6d7e7cc1fe70f89a88567da4aa39e6b3f63
Last modified: 2024-02-11 22:19:19

Does the error persist with newer nixpkgs? Didn’t find any cuda references in your repo (using just the github code search). It would be helpful if you prepared a minimal reproducing example.

1 Like

Just updated my flake, and after the six-hour build process, seems like the problem was fixed upstream between the time of posting and now; I changed absolutely nothing (system-wise) after all.

Before the nix flake update, I had cloned my repository twice - once before pushing my pending changes and once after pushing my pending changes. The former repository built just fine, but the latter repository exploded. You can probably imagine how my jaw dropped.

The only guess I have is that my flake’s lock-file had exploded in my local repository somehow? Is that even possible? Whatever it is, I really, sincerely appreciate the time you’ve dedicated to helping me with this problem; I was gonna lose my marbles if this went on any longer. Cheers! ^^

1 Like