screenpipe icon indicating copy to clipboard operation
screenpipe copied to clipboard

Cannot build on windows.

Open dillfrescott opened this issue 1 year ago • 9 comments

  lockfile: "C:\\Users\\cross\\Downloads\\screenpipe\\target\\release\\build\\v8.fslock"
  cargo:rustc-env=RUSTY_V8_SRC_BINDING_PATH=C:\Users\cross\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.106.0\gen\src_binding_release_x86_64-pc-windows-gnu.rs
  static lib URL: https://github.com/denoland/rusty_v8/releases/download/v0.106.0/rusty_v8_release_x86_64-pc-windows-gnu.lib.gz
  cargo:rustc-link-search=C:\Users\cross\Downloads\screenpipe\target\release\gn_out\obj
  Looking for download in '"C:\\Users\\cross\\.cargo\\.rusty_v8\\https___github_com_denoland_rusty_v8_releases_download_v0_106_0_rusty_v8_release_x86_64_pc_windows_gnu_lib_gz"'
  Deleting old tmpfile C:\Users\cross\Downloads\screenpipe\target\release\gn_out\obj\rusty_v8.tmp
  Downloading (using Python) https://github.com/denoland/rusty_v8/releases/download/v0.106.0/rusty_v8_release_x86_64-pc-windows-gnu.lib.gz
  Downloading https://github.com/denoland/rusty_v8/releases/download/v0.106.0/rusty_v8_release_x86_64-pc-windows-gnu.lib.gz...
  HTTP Error 404: Not Found
  Python downloader failed, trying with curl.

  --- stderr
  Traceback (most recent call last):
    File "C:\Users\cross\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.106.0\tools\download_file.py", line 64, in <module>
      sys.exit(main())
    File "C:\Users\cross\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.106.0\tools\download_file.py", line 59, in main
      DownloadUrl(args.url, f)
    File "C:\Users\cross\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.106.0\tools\download_file.py", line 45, in DownloadUrl
      raise e
    File "C:\Users\cross\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.106.0\tools\download_file.py", line 29, in DownloadUrl
      response = urlopen(url)
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 216, in urlopen
      return opener.open(url, data, timeout)
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 525, in open
      response = meth(req, response)
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 634, in http_response
      response = self.parent.error(
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 563, in error
      return self._call_chain(*args)
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 496, in _call_chain
      result = func(*args)
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 643, in http_error_default
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
  urllib.error.HTTPError: HTTP Error 404: Not Found
  thread 'main' panicked at C:\Users\cross\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.106.0\build.rs:527:3:
  assertion failed: status.success()
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I visited the url and it is indeed a 404. In fact rusty v8 doesnt even make gnu versions for windows in the releases.

dillfrescott avatar Oct 02 '24 03:10 dillfrescott

That link just says loading forever

dillfrescott avatar Oct 02 '24 03:10 dillfrescott

i also just ran into this issue right now lol

tmabraham avatar Oct 02 '24 03:10 tmabraham

@tmabraham try uninstalling rust installed via choco and install rustup via the rustup installer on the official website manually.

That might get your further. also this might help:

https://gist.github.com/tribhuwan-kumar/3d92219be32a762148d9bd5b557e519f

dillfrescott avatar Oct 02 '24 05:10 dillfrescott

@tmabraham try uninstalling rust installed via choco and install rustup via the rustup installer on the official website manually.

That might get your further. also this might help:

https://gist.github.com/tribhuwan-kumar/3d92219be32a762148d9bd5b557e519f

It has been a week since it keeps failing to pull https://github.com/denoland/rusty_v8/releases/download/v0.106.0/rusty_v8_release_x86_64-pc-windows-gnu.lib.gz

(404)

wagneramichael avatar Oct 02 '24 18:10 wagneramichael

I faced the same error. Following @dillfrescott’s advice, I uninstalled Rust from Chocolatey and manually installed Rustup from the official website. Then, I ran:

cargo build --release --features cuda --target x86_64-pc-windows-msvc

This resolved the issue for me. You should be able to continue from there.

livef01 avatar Oct 02 '24 22:10 livef01

anything i should update in the docs for windows?

https://docs.screenpi.pe/docs/getting-started#windows-installation-experimental

i updated the rust install from choco to the rustup

louis030195 avatar Oct 03 '24 02:10 louis030195

I would suggest trying the manual installation of Rustup instead of using Chocolatey, as it seems to have resolved the issue for a few people. If you follow that approach, running cargo build --release --features cuda --target x86_64-pc-windows-msvc afterwards might get you past the error. It’s worth double-checking that the documentation reflects this process, as @louis030195 mentioned. Let me know if you need further help!

pseacrest avatar Oct 03 '24 08:10 pseacrest

Hi, I am new here so please excuse me if the issue I am facing is due to an error on my part. I cloned the repo and have been trying to build it on Windows 11 but without much success. Initially I tried to build with CUDA toolkit 12.3 and later with 12.6 with the same result. I had to use the Developer mode Powershell to access nvcc. I have an old Geoforce 1070 with CUDA toolkit 12.6

D:\screenpipe>cargo build --release --features cuda --target x86_64-pc-windows-msvc [...] after lot of successful compilations...

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\include\sm_32_intrinsics.hpp(123): error: asm operand type size(8) does not match type/size implied by constraint 'r' static __declspec(device) __inline unsigned short __ldg(const unsigned short *ptr) { unsigned short ret; asm volatile ("ld.global.nc.u16 %0, [%1];" : "=h"(ret) : "r" (ptr)); return ret; }

                                               ^

Error limit reached. 100 errors detected in the compilation of "src/reduce.cu". Compilation terminated. reduce.cu

--- stderr thread 'main' panicked at C:\Users\MSI.cargo\registry\src\index.crates.io-6f17d22bba15001f\bindgen_cuda-0.1.5\src\lib.rs:391:13: nvcc error while compiling "src\affine.cu":

CLI "nvcc" "--gpu-architecture=sm_61" "--ptx" "--default-stream" "per-thread" "--output-directory" "D:\screenpipe\target\x86_64-pc-windows-msvc\release\build\candle-kernels-0be17594bffe4bbd\out" "-Isrc" "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\include" "src\affine.cu"

stdout

stderr

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish...

rrshanks avatar Oct 04 '24 15:10 rrshanks