Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to compile under linux #1

Open
wolfiestyle opened this issue Feb 15, 2023 · 0 comments
Open

Fails to compile under linux #1

wolfiestyle opened this issue Feb 15, 2023 · 0 comments

Comments

@wolfiestyle
Copy link

Crate doesn't compile under linux (Gentoo x86_64, gcc 12.2.1, Clang/LLVM 15.0.7)

Error output:

   Compiling vk-mem-alloc-sys v0.2.0
The following warnings were emitted during compilation:

warning: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/cassert:44,
warning:                  from ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:2684,
warning:                  from wrapper/vk_mem_alloc.cpp:2:
warning: ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h: In member function 'bool VmaDefragmentationContext_T::IncrementCounters(VkDeviceSize)':
warning: ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13364:54: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
warning: 13364 |             m_PassStats.bytesMoved == m_MaxPassBytes && "Exceeded maximal pass threshold!");
warning:       |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warning: ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13363:9: note: in expansion of macro 'VMA_ASSERT'
warning: 13363 |         VMA_ASSERT(m_PassStats.allocationsMoved == m_MaxPassAllocations ||
warning:       |         ^~~~~~~~~~
warning: ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h: In member function 'bool VmaDefragmentationContext_T::ComputeDefragmentation_Extensive(VmaBlockVector&, size_t)':
warning: ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13761:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
warning: 13761 |         if (MoveDataToFreeBlocks(VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL, vector,
warning:       |         ^~
warning: ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13784:5: note: here
warning: 13784 |     case StateExtensive::Operation::MoveBuffers:
warning:       |     ^~~~
warning: ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13786:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
warning: 13786 |         if (MoveDataToFreeBlocks(VMA_SUBALLOCATION_TYPE_BUFFER, vector,
warning:       |         ^~
warning: ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13808:5: note: here
warning: 13808 |     case StateExtensive::Operation::MoveAll:
warning:       |     ^~~~
warning: At global scope:
warning: cc1plus: note: unrecognized command-line option '-Wno-nullability-completeness' may have been intended to silence earlier diagnostics

error: failed to run custom build command for `vk-mem-alloc-sys v0.2.0`

Caused by:
  process didn't exit successfully: `/home/wolfie/progs/rust/vktest/target/debug/build/vk-mem-alloc-sys-5da5e51ad8791b9c/build-script-build` (exit status: 101)
  --- stdout
  TARGET = Some("x86_64-unknown-linux-gnu")
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
  CXX_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
  CXX_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
  CXXFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
  CXXFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-I./vendor/VulkanMemoryAllocator/include" "-Wno-missing-field-initializers" "-Wno-nullability-completeness" "-Wno-unused-parameter" "-Wno-unused-variable" "-std=c++17" "-DVMA_STATIC_VULKAN_FUNCTIONS=0" "-DVMA_DYNAMIC_VULKAN_FUNCTIONS=0" "-o" "/home/wolfie/progs/rust/vktest/target/debug/build/vk-mem-alloc-sys-cddfe79db577227c/out/wrapper/vk_mem_alloc.o" "-c" "wrapper/vk_mem_alloc.cpp"
  cargo:warning=In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/cassert:44,
  cargo:warning=                 from ./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:2684,
  cargo:warning=                 from wrapper/vk_mem_alloc.cpp:2:
  cargo:warning=./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h: In member function 'bool VmaDefragmentationContext_T::IncrementCounters(VkDeviceSize)':
  cargo:warning=./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13364:54: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  cargo:warning=13364 |             m_PassStats.bytesMoved == m_MaxPassBytes && "Exceeded maximal pass threshold!");
  cargo:warning=      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cargo:warning=./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13363:9: note: in expansion of macro 'VMA_ASSERT'
  cargo:warning=13363 |         VMA_ASSERT(m_PassStats.allocationsMoved == m_MaxPassAllocations ||
  cargo:warning=      |         ^~~~~~~~~~
  cargo:warning=./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h: In member function 'bool VmaDefragmentationContext_T::ComputeDefragmentation_Extensive(VmaBlockVector&, size_t)':
  cargo:warning=./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13761:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
  cargo:warning=13761 |         if (MoveDataToFreeBlocks(VMA_SUBALLOCATION_TYPE_IMAGE_OPTIMAL, vector,
  cargo:warning=      |         ^~
  cargo:warning=./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13784:5: note: here
  cargo:warning=13784 |     case StateExtensive::Operation::MoveBuffers:
  cargo:warning=      |     ^~~~
  cargo:warning=./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13786:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
  cargo:warning=13786 |         if (MoveDataToFreeBlocks(VMA_SUBALLOCATION_TYPE_BUFFER, vector,
  cargo:warning=      |         ^~
  cargo:warning=./vendor/VulkanMemoryAllocator/include/vk_mem_alloc.h:13808:5: note: here
  cargo:warning=13808 |     case StateExtensive::Operation::MoveAll:
  cargo:warning=      |     ^~~~
  cargo:warning=At global scope:
  cargo:warning=cc1plus: note: unrecognized command-line option '-Wno-nullability-completeness' may have been intended to silence earlier diagnostics
  exit status: 0
  cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
  AR_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
  AR_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_AR
  HOST_AR = None
  cargo:rerun-if-env-changed=AR
  AR = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
  ARFLAGS_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
  ARFLAGS_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_ARFLAGS
  HOST_ARFLAGS = None
  cargo:rerun-if-env-changed=ARFLAGS
  ARFLAGS = None
  running: "ar" "cq" "/home/wolfie/progs/rust/vktest/target/debug/build/vk-mem-alloc-sys-cddfe79db577227c/out/libvk_mem_alloc_sys_cc.a" "/home/wolfie/progs/rust/vktest/target/debug/build/vk-mem-alloc-sys-cddfe79db577227c/out/wrapper/vk_mem_alloc.o"
  exit status: 0
  running: "ar" "s" "/home/wolfie/progs/rust/vktest/target/debug/build/vk-mem-alloc-sys-cddfe79db577227c/out/libvk_mem_alloc_sys_cc.a"
  exit status: 0
  cargo:rustc-link-lib=static=vk_mem_alloc_sys_cc
  cargo:rustc-link-search=native=/home/wolfie/progs/rust/vktest/target/debug/build/vk-mem-alloc-sys-cddfe79db577227c/out
  cargo:rerun-if-env-changed=CXXSTDLIB_x86_64-unknown-linux-gnu
  CXXSTDLIB_x86_64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CXXSTDLIB_x86_64_unknown_linux_gnu
  CXXSTDLIB_x86_64_unknown_linux_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXSTDLIB
  HOST_CXXSTDLIB = None
  cargo:rerun-if-env-changed=CXXSTDLIB
  CXXSTDLIB = None
  cargo:rustc-link-lib=stdc++

  --- stderr
  warning: I./wrapper: 'linker' input unused [-Wunused-command-line-argument]
  ./vendor/Vulkan-Headers/include/vulkan/vk_platform.h:62:14: fatal error: 'stddef.h' file not found
  clang diag: warning: I./wrapper: 'linker' input unused [-Wunused-command-line-argument]
  thread 'main' panicked at 'Failed to generate bindings: ClangDiagnostic("./vendor/Vulkan-Headers/include/vulkan/vk_platform.h:62:14: fatal error: 'stddef.h' file not found\n")', /home/wolfie/.cargo/registry/src/github.com-1ecc6299db9ec823/vk-mem-alloc-sys-0.2.0/build.rs:36:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant