radicle-dev / radicle-link

The second iteration of the Radicle code collaboration protocol.
Other
423 stars 39 forks source link

failed to execute command: Permission denied on WSL2 #794

Closed gund closed 2 years ago

gund commented 2 years ago

Hi, I tried to build the app from sources on Ubuntu under WSL2 (Windows 11) and got the following error during yarn dev command:

   Compiling strum v0.21.0
   Compiling async-stream v0.3.2
   Compiling zeroize v1.4.3
error: failed to run custom build command for `libz-sys v1.1.3`

Caused by:
  process didn't exit successfully: `/home/gund/proj/radicle-upstream/target/release/build/libz-sys-12ba402919c46660/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBZ_SYS_STATIC
  cargo:rerun-if-changed=build.rs
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/home/gund/.cargo/registry/src/github.com-1ecc6299db9ec823/libz-sys-1.1.3/src/zlib-ng" "-DBUILD_SHARED_LIBS=OFF" "-DZLIB_COMPAT=ON" "-DWITH_GZFILEOP=ON" "-DCMAKE_INSTALL_PREFIX=/home/gund/proj/radicle-upstream/target/release/build/libz-sys-7e8f5ffb5ffae587/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"

  --- stderr
  thread 'main' panicked at '
  failed to execute command: Permission denied (os error 13)

  build script failed, must exit now', /home/gund/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.48/src/lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

Do you know what can be the issue and how to resolve it?

Thanks! Looking forward to trying out this tool =)

kim commented 2 years ago

Do you have cmake installed?

gund commented 2 years ago

Oh wow, that was the issue, after installing cmake it works! The error was a bit confusing imo =) Thanks a lot!