gfx icon indicating copy to clipboard operation
gfx copied to clipboard

Installation instructions failed

Open matthewmueller opened this issue 4 years ago • 3 comments

Short info header:

  • GFX version: master
  • OS: OSX
  • GPU: Metal

Followed example instructions, got stuck on building for metal.

examples master → cargo run --bin quad --features metal

    Updating crates.io index
    Updating git repository `https://github.com/servo/surfman.git`
  Downloaded raw-window-handle v0.3.3
  Downloaded libc v0.2.71
  Downloaded core-graphics v0.19.2
  Downloaded smallvec v1.4.0
  Downloaded objc v0.2.7
  Downloaded fxhash v0.2.1
  Downloaded cocoa v0.20.2
  Downloaded block v0.1.6
  Downloaded arrayvec v0.5.1
  Downloaded env_logger v0.6.2
  Downloaded copyless v0.1.5
  Downloaded storage-map v0.2.0
  Downloaded metal v0.18.0
  Downloaded humantime v1.3.0
  Downloaded termcolor v1.1.0
  Downloaded regex v1.3.9
  Downloaded image v0.21.3
  Downloaded objc_exception v0.1.2
  Downloaded spirv_cross v0.20.0
  Downloaded winit v0.21.0
  Downloaded cc v1.0.56
  Downloaded num-traits v0.2.12
  Downloaded num-integer v0.1.43
  Downloaded lzw v0.10.0
  Downloaded num-iter v0.1.41
  Downloaded scoped_threadpool v0.1.9
  Downloaded aho-corasick v0.7.13
  Downloaded jpeg-decoder v0.1.19
  Downloaded regex-syntax v0.6.18
  Downloaded malloc_buf v0.0.6
  Downloaded quick-error v1.2.3
  Downloaded gif v0.10.3
  Downloaded glsl-to-spirv v0.1.7
  Downloaded cocoa v0.19.1
  Downloaded tiff v0.2.2
  Downloaded instant v0.1.5
  Downloaded png v0.14.1
  Downloaded core-video-sys v0.1.4
  Downloaded rayon v1.3.1
  Downloaded cmake v0.1.44
  Downloaded color_quant v1.0.1
  Downloaded remove_dir_all v0.5.3
  Downloaded dispatch v0.2.0
  Downloaded deflate v0.7.20
  Downloaded core-graphics v0.17.3
  Downloaded sha2 v0.7.1
  Downloaded ppv-lite86 v0.2.8
  Downloaded rayon-core v1.7.1
  Downloaded digest v0.7.6
  Downloaded byte-tools v0.2.0
  Downloaded num-derive v0.2.5
  Downloaded block-buffer v0.3.3
  Downloaded crossbeam-queue v0.2.3
  Downloaded adler32 v1.1.0
  Downloaded generic-array v0.9.0
  Downloaded inflate v0.4.5
  Downloaded arrayref v0.3.6
   Compiling libc v0.2.71
   Compiling autocfg v1.0.0
   Compiling cfg-if v0.1.10
   Compiling cc v1.0.56
   Compiling bitflags v1.2.1
   Compiling lazy_static v1.4.0
   Compiling byteorder v1.3.4
   Compiling scopeguard v1.1.0
   Compiling maybe-uninit v2.0.0
   Compiling foreign-types-shared v0.1.1
   Compiling core-foundation-sys v0.7.0
   Compiling typenum v1.12.0
   Compiling getrandom v0.1.14
   Compiling log v0.4.8
   Compiling proc-macro2 v0.4.30
   Compiling rayon-core v1.7.1
   Compiling unicode-xid v0.1.0
   Compiling core-foundation-sys v0.6.2
   Compiling block v0.1.6
   Compiling syn v0.15.44
   Compiling byte-tools v0.2.0
   Compiling arrayref v0.3.6
   Compiling memchr v2.3.3
   Compiling fake-simd v0.1.2
   Compiling adler32 v1.1.0
   Compiling num-derive v0.2.5
   Compiling ppv-lite86 v0.2.8
   Compiling lzw v0.10.0
   Compiling smallvec v1.4.0
   Compiling either v1.5.3
   Compiling quick-error v1.2.3
   Compiling regex-syntax v0.6.18
   Compiling color_quant v1.0.1
   Compiling remove_dir_all v0.5.3
   Compiling range-alloc v0.1.1 (/Users/m/gfx/src/auxil/range-alloc)
   Compiling copyless v0.1.5
   Compiling arrayvec v0.5.1
   Compiling termcolor v1.1.0
   Compiling dispatch v0.2.0
   Compiling scoped_threadpool v0.1.9
   Compiling instant v0.1.5
   Compiling foreign-types v0.3.2
   Compiling lock_api v0.3.4
   Compiling thread_local v1.0.1
   Compiling cmake v0.1.44
   Compiling crossbeam-utils v0.7.2
   Compiling memoffset v0.5.4
   Compiling num-traits v0.2.12
   Compiling crossbeam-epoch v0.8.2
   Compiling num-integer v0.1.43
   Compiling rayon v1.3.1
   Compiling num-iter v0.1.41
   Compiling num-rational v0.2.4
   Compiling inflate v0.4.5
   Compiling block-buffer v0.3.3
   Compiling humantime v1.3.0
   Compiling gif v0.10.3
   Compiling storage-map v0.2.0
   Compiling objc_exception v0.1.2
   Compiling spirv_cross v0.20.0
   Compiling fxhash v0.2.1
   Compiling deflate v0.7.20
   Compiling quote v0.6.13
   Compiling aho-corasick v0.7.13
   Compiling malloc_buf v0.0.6
   Compiling core-foundation v0.7.0
   Compiling raw-window-handle v0.3.3
   Compiling num_cpus v1.13.0
   Compiling core-foundation v0.6.4
   Compiling parking_lot_core v0.7.2
   Compiling atty v0.2.14
   Compiling crossbeam-queue v0.2.3
   Compiling rand_core v0.5.1
   Compiling gfx-hal v0.5.0 (/Users/m/gfx/src/hal)
   Compiling generic-array v0.9.0
   Compiling core-graphics v0.19.2
   Compiling objc v0.2.7
   Compiling parking_lot v0.10.2
   Compiling core-graphics v0.17.3
   Compiling rand_chacha v0.2.2
   Compiling crossbeam-deque v0.7.3
   Compiling digest v0.7.6
   Compiling regex v1.3.9
   Compiling sha2 v0.7.1
   Compiling cocoa v0.20.2
   Compiling core-video-sys v0.1.4
   Compiling cocoa v0.19.1
   Compiling rand v0.7.3
   Compiling glsl-to-spirv v0.1.7
   Compiling png v0.14.1
   Compiling env_logger v0.6.2
error: failed to run custom build command for `glsl-to-spirv v0.1.7`

Caused by:
  process didn't exit successfully: `/Users/m/gfx/target/debug/build/glsl-to-spirv-9c3c6a3b2219df75/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=build/glslangValidator.exe
running: "cmake" "/Users/m/.cargo/registry/src/github.com-1ecc6299db9ec823/glsl-to-spirv-0.1.7/glslang" "-DCMAKE_INSTALL_PREFIX=/Users/m/gfx/target/debug/build/glsl-to-spirv-af2866e7c531ad98/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=Debug"

--- stderr
fatal: not a git repository (or any of the parent directories): .git
thread 'main' panicked at '
failed to execute command: No such file or directory (os error 2)
is `cmake` not installed?

build script failed, must exit now', /Users/m/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.44/src/lib.rs:885: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

matthewmueller avatar Jul 01 '20 11:07 matthewmueller

@matthewmueller thank you for filing! This looks like cmake is missing for you, which is required by glsl_to_spirv, used in the examples. It's not a part of the library (just used by the examples), so it's not a problem with the code, just need to be documented better in the instructions (like the subject says:) )

kvark avatar Jul 01 '20 14:07 kvark

I had the same error. I installed cmake with brew install cmake. Examples worked after.

lawrnce avatar May 11 '21 05:05 lawrnce

The same problem +1 but cmake was installed already.

$ cargo run --jobs=1 --bin quad --features=gl
   Compiling glsl-to-spirv v0.1.7
error: failed to run custom build command for `glsl-to-spirv v0.1.7`

Caused by:
  process didn't exit successfully: `/home/divinerapier/code/rust/github.com/gfx-rs/gfx/target/debug/build/glsl-to-spirv-c154beea8810b18d/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build/glslangValidator.exe
  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/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang" "-DCMAKE_INSTALL_PREFIX=/home/divinerapier/code/rust/github.com/gfx-rs/gfx/target/debug/build/glsl-to-spirv-69f1aebce9f4ffa4/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=x86_64-unknown-linux-gnu" "-DCMAKE_C_COMPILER=/usr/sbin/clang" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=x86_64-unknown-linux-gnu" "-DCMAKE_CXX_COMPILER=/usr/sbin/clang++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=x86_64-unknown-linux-gnu" "-DCMAKE_ASM_COMPILER=/usr/sbin/clang" "-DCMAKE_BUILD_TYPE=Debug"
  -- The C compiler identification is Clang 13.0.0
  -- The CXX compiler identification is Clang 13.0.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/sbin/clang - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/sbin/clang++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Google Mock was not found - tests based on that will not build
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /home/divinerapier/code/rust/github.com/gfx-rs/gfx/target/debug/build/glsl-to-spirv-69f1aebce9f4ffa4/out/build
  running: "cmake" "--build" "." "--target" "install" "--config" "Debug" "--parallel" "1"
  Consolidate compiler generated dependencies of target HLSL
  [  1%] Building CXX object hlsl/CMakeFiles/HLSL.dir/hlslAttributes.cpp.o

  --- stderr
  fatal: not a git repository (or any of the parent directories): .git
  make: warning: -j1 forced in submake: resetting jobserver mode.
  In file included from /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang/hlsl/hlslAttributes.cpp:36:
  In file included from /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang/hlsl/hlslAttributes.h:41:
  In file included from /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang/hlsl/hlslScanContext.h:44:
  In file included from /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/ParseHelper.h:47:
  In file included from /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/parseVersions.h:42:
  In file included from /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/../Include/InfoSink.h:38:
  In file included from /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/../Public/../Include/../Include/Common.h:99:
  /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/../Public/../Include/PoolAlloc.h:314:54: error: 'operator=' is a private member of 'glslang::TPoolAllocator'
      void setAllocator(TPoolAllocator* a) { allocator = *a; }
                                             ~~~~~~~~~ ^ ~~
  /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/glsl-to-spirv-0.1.7/glslang/hlsl/../glslang/MachineIndependent/../Public/../Include/PoolAlloc.h:244:21: note: declared private here
      TPoolAllocator& operator=(const TPoolAllocator&);  // don't allow assignment operator
                      ^
  1 error generated.
  make[2]: *** [hlsl/CMakeFiles/HLSL.dir/build.make:76: hlsl/CMakeFiles/HLSL.dir/hlslAttributes.cpp.o] Error 1
  make[1]: *** [CMakeFiles/Makefile2:1210: hlsl/CMakeFiles/HLSL.dir/all] Error 2
  make: *** [Makefile:146: all] Error 2
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 2

  build script failed, must exit now', /home/divinerapier/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/cmake-0.1.48/src/lib.rs:975:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
$ which cmake
/usr/sbin/cmake

$ cmake --version
cmake version 3.22.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

divinerapier avatar Feb 07 '22 12:02 divinerapier