pixi icon indicating copy to clipboard operation
pixi copied to clipboard

Windows: A required privilege is not held by the client.

Open certik opened this issue 1 year ago • 3 comments

~/repos/gui(master)$ pixi r build
✨ Pixi task (build): cmake -DCMAKE_BUILD_TYPE=Debug -B build && cd build && make
  ⠉ validate cache       [00:00:11] [━━━━━━━━━━━━━━━━╾───] python (+8)
  ⠒ download & extract   [00:00:11] [━───────────────────] 9.61 MiB @ 1005.06 KiB/s qt-webengine (+16)
  ⠋ installing packages  [00:00:10] [━━━━━━━━━━━╾────────]    36/65 libuv (+1)    × failed to fetch sysroot_linux-64-2.12-he073ed8_17.conda
  ├─▶ an io error occurred
  ├─▶ failed to unpack `\\?\C:
  │   \Users\ondrejcertik\AppData\Local\rattler\cache\pkgs\sysroot_linux-64-
  │   2.12-he073ed8_17\x86_64-conda-linux-gnu\sysroot\usr\lib64\librt.so`
  ╰─▶ A required privilege is not held by the client. (os error
      1314) when symlinking ../../lib64/librt.so.1 to \\?\C:
  ⠈ validate cache       [00:00:11] [━━━━━━━━━━━━━━━━╾───] python (+8)
  ⠒ download & extract   [00:00:11] [━───────────────────] 9.61 MiB @ 1005.06 KiB/s qt-webengine (+16)
$ cat pixi.toml
[project]
authors = ["Ondřej Čertík <[email protected]>"]
channels = ["conda-forge"]
description = "GUI test"
name = "gui"
platforms = ["linux-64", "win-64"]
version = "0.1.0"

[tasks]
build = "cmake -DCMAKE_BUILD_TYPE=Debug -B build && cd build && make"

[dependencies]
cxx-compiler = "1.8.0"
make = ">=4.4.1,<5"
cmake = ">=3.25.2,<4"
qt = ">=5.15.8,<6"
mesa-libgl-devel-cos6-x86_64 = ">=11.0.7,<12"

certik avatar Sep 28 '24 19:09 certik

Do you really need the mesa library on windows? You could require it only on Linux. Otherwise you could enable dev mode for windows to allow symlinks.

Lastly we could experiment with "junctions" which I think are similar to symlinks but don't require elevated privileges. I need to read up on it.

wolfv avatar Sep 28 '24 20:09 wolfv

Yes, I don't need it, I first got a Qt app working in linux where it is needed, then I was porting it to Windows and discovered the bug above. The solution is to not use it:

[target.linux-64.dependencies]
mesa-libgl-devel-cos6-x86_64 = ">=11.0.7,<12"

Then everything works. But I would think the error message should be improved:

  ╰─▶ A required privilege is not held by the client. (os error
      1314) when symlinking ../../lib64/librt.so.1 to \\?\C:

That seems hard to understand, like the path \\?\C:...

certik avatar Sep 28 '24 20:09 certik

That seems hard to understand, like the path \?\C:...

Isn't that the modern way to describe windows paths?

Hofer-Julian avatar Sep 29 '24 07:09 Hofer-Julian