emoon / bgfx-sys

Rust FFI bindings for bgfx
MIT License
5 stars 5 forks source link

Build fails on MacOS #5

Closed Niphre closed 2 years ago

Niphre commented 2 years ago

Building bgfx-sys v0.9 under MacOS Mojave using Cargo Build fails with the error:

error: failed to run custom build command for `bgfx-sys v0.9.0`

Caused by:
  process didn't exit successfully: `/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-4cec14015dee18ea/build-script-build` (exit status: 1)
  --- stdout
  TARGET = Some("x86_64-apple-darwin")
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-apple-darwin")
  CC_x86_64-apple-darwin = None
  CC_x86_64_apple_darwin = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-apple-darwin = None
  CFLAGS_x86_64_apple_darwin = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,llvm14-builtins-abi,sse,sse2,sse3,ssse3")
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bimg/src/image_decode.o" "-c" "bimg/src/image_decode.cpp"
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bx/src/amalgamated.o" "-c" "bx/src/amalgamated.cpp"
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bimg/src/image_cubemap_filter.o" "-c" "bimg/src/image_cubemap_filter.cpp"
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bimg/src/image.o" "-c" "bimg/src/image.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bimg/src/image_gnf.o" "-c" "bimg/src/image_gnf.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/bgfx.o" "-c" "bgfx/src/bgfx.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/vertexlayout.o" "-c" "bgfx/src/vertexlayout.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/debug_renderdoc.o" "-c" "bgfx/src/debug_renderdoc.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/topology.o" "-c" "bgfx/src/topology.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/shader.o" "-c" "bgfx/src/shader.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/shader_dxbc.o" "-c" "bgfx/src/shader_dxbc.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_agc.o" "-c" "bgfx/src/renderer_agc.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_gnm.o" "-c" "bgfx/src/renderer_gnm.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_webgpu.o" "-c" "bgfx/src/renderer_webgpu.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_nvn.o" "-c" "bgfx/src/renderer_nvn.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_gl.o" "-c" "bgfx/src/renderer_gl.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_vk.o" "-c" "bgfx/src/renderer_vk.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_noop.o" "-c" "bgfx/src/renderer_noop.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_d3d9.o" "-c" "bgfx/src/renderer_d3d9.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_d3d11.o" "-c" "bgfx/src/renderer_d3d11.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_d3d12.o" "-c" "bgfx/src/renderer_d3d12.cpp"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/glcontext_nsgl.o" "-c" "bgfx/src/glcontext_nsgl.mm"
  exit status: 0
  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_mtl.o" "-c" "bgfx/src/renderer_mtl.mm"
  exit status: 0
  exit status: 0
  exit status: 0
  cargo:warning=bgfx/src/renderer_mtl.mm:524:36: error: use of undeclared identifier 'MTLGPUFamily'
  cargo:warning=                                        if ([m_device supportsFamily: MTLGPUFamily(1004) /*MTLGPUFamilyApple4*/])
  cargo:warning=                                                                      ^
  cargo:warning=bgfx/src/renderer_mtl.mm:528:37: error: use of undeclared identifier 'MTLGPUFamily'
  cargo:warning=                                                if ([m_device supportsFamily: MTLGPUFamily(1007) /*MTLGPUFamilyApple7*/])
  cargo:warning=                                                                              ^
  cargo:warning=bgfx/src/renderer_mtl.mm:532:42: error: use of undeclared identifier 'MTLGPUFamily'
  cargo:warning=                                                else if ([m_device supportsFamily: MTLGPUFamily(1006) /*MTLGPUFamilyApple6*/])
  cargo:warning=                                                                                   ^
  cargo:warning=bgfx/src/renderer_mtl.mm:536:42: error: use of undeclared identifier 'MTLGPUFamily'
  cargo:warning=                                                else if ([m_device supportsFamily: MTLGPUFamily(1005) /*MTLGPUFamilyApple5*/])
  cargo:warning=                                                                                   ^
  cargo:warning=4 errors generated.
  exit status: 1

  --- stderr

  error occurred: Command "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-I" "bx/include/compat/osx" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-Wall" "-Wextra" "-std=c++14" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBX_CONFIG_DEBUG=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_MULTITHREADED=0" "-DBGFX_CONFIG_RENDERER_VULKAN=0" "-DBGFX_CONFIG_RENDERER_METAL=1" "-o" "/Users/Name/CLionProjects/bgfx/target/debug/build/bgfx-sys-649b86a94b62a0a3/out/bgfx/src/renderer_mtl.o" "-c" "bgfx/src/renderer_mtl.mm" with args "cc" did not execute successfully (status code exit status: 1).
emoon commented 2 years ago

My guess is that you have too old version of XCode/Metal API installed. I can build it locally and Github Actions that also builds the code works as well https://github.com/emoon/bgfx-sys/runs/7392708477?check_suite_focus=true

Niphre commented 2 years ago

I tested on another mac with Xcode 13 and the build worked fine, its definitely an Xcode version issue. My guess based on the MTLGPUFamily error mentioning the Apple7 family (the A14 and M1) is that bgfx requires at least Xcode 12, though unfortunately that doesn't seem to be listed anywhere in the bfgx documentation.