bmatthieu3 / wgpu-sky-rendering

A very small example to show how to render allsky projections using wgpu-rs
25 stars 2 forks source link

ShaderC Dependency Fail #1

Closed thomas992 closed 2 months ago

thomas992 commented 2 years ago
error: build failed
[tommhnsn@localhost-live wgpu-sky-rendering]$ cargo build --release
   Compiling shaderc-sys v0.7.4
   Compiling wgpu-core v0.8.1
The following warnings were emitted during compilation:

warning: shaderc: searching for native shaderc libraries on system;  use '--features build-from-source' to force building from source code
warning: shaderc: cannot find native shaderc library on system; falling back to build from source

error: failed to run custom build command for `shaderc-sys v0.7.4`

Caused by:
  process didn't exit successfully: `/home/tommhnsn/wgpu-sky-rendering/target/release/build/shaderc-sys-1f2687a78223af66/build-script-build` (exit status: 101)
  --- stdout
  cargo:warning=shaderc: searching for native shaderc libraries on system;  use '--features build-from-source' to force building from source code
  cargo:warning=shaderc: cannot find native shaderc library on system; falling back to build from source
  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/tommhnsn/.cargo/registry/src/github.com-1ecc6299db9ec823/shaderc-sys-0.7.4/build" "-DCMAKE_INSTALL_LIBDIR=lib" "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" "-DENABLE_SPVREMAPPER=OFF" "-DENABLE_GLSLANG_BINARIES=OFF" "-DSHADERC_SKIP_TESTS=ON" "-DSPIRV_SKIP_EXECUTABLES=ON" "-DSPIRV_WERROR=OFF" "-DCMAKE_INSTALL_PREFIX=/home/tommhnsn/wgpu-sky-rendering/target/release/build/shaderc-sys-4a56fff859d2178d/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=c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
  -- The CXX compiler identification is unknown
  -- Configuring incomplete, errors occurred!
  See also "/home/tommhnsn/wgpu-sky-rendering/target/release/build/shaderc-sys-4a56fff859d2178d/out/build/CMakeFiles/CMakeOutput.log".
  See also "/home/tommhnsn/wgpu-sky-rendering/target/release/build/shaderc-sys-4a56fff859d2178d/out/build/CMakeFiles/CMakeError.log".

  --- stderr
  CMake Error at CMakeLists.txt:8 (project):
    The CMAKE_CXX_COMPILER:

      c++

    is not a full path and was not found in the PATH.

    Tell CMake where to find the compiler by setting either the environment
    variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
    to the compiler, or to the compiler name if it is in the PATH.

  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 1

  build script failed, must exit now', /home/tommhnsn/.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

I am unable to build due to a ShaderC dependency. I tried various avenues to fix it to no avail. Fedora 36

bmatthieu3 commented 2 months ago

I updated the code to wgpu version 0.22 thus I do not need shaderc anymore. I spotted strange behavior in the projections and I am unable to run the web version although it compiles with wasm-pack build --target web.