KhronosGroup / Vulkan-Hpp

Open-Source Vulkan C++ API
Apache License 2.0
3.13k stars 308 forks source link

[Bug] "FAILED: tests/UniqueHandleDefaultArguments/UniqueHandleDefaultArguments ... ld.lld: error: undefined symbol: main" #1701

Closed AmericaPacific42 closed 1 year ago

AmericaPacific42 commented 1 year ago
~/Vulkan-Hpp $ date && git submodule foreach git pull
Tue Oct 17 08:54:41 PDT 2023
Entering 'Vulkan-Headers'
Already up to date.
Entering 'glfw'
Already up to date.
Entering 'glm'
Already up to date.
Entering 'glslang'                                                                                             From https://github.com/KhronosGroup/glslang
   be564292..36d08c0d  vulkan-sdk-1.3.268 -> origin/vulkan-sdk-1.3.268                                          * [new tag]           13.1.1             -> 13.1.1
Already up to date.
Entering 'tinyxml2'
Already up to date.
~/Vulkan-Hpp $ cat RunCmakeSamples.sh
sed 's/VK_HEADER_VERSION 267/VK_HEADER_VERSION 268/g' Vulkan-Headers/include/vulkan/vulkan_core.h -i''
sed 's/STREQUAL "Linux"/MATCHES "Linux|Android"/g' glfw/src/CMakeLists.txt -i''
sed 's/STREQUAL "Linux"/MATCHES "Linux|Android"/g' glfw/src/x11_init.c -i''
cmake \
-B build \
--fresh \
-DVULKAN_HPP_SAMPLES_BUILD=ON \
-DVULKAN_HPP_TESTS_BUILD=ON \
-DVULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
-DENABLE_OPT=1 \                                                                                                 -DALLOW_EXTERNAL_SPIRV_TOOLS=ON \
-G Ninja \
&&
sed 's/-Werror/-Wno-error/g' CMakeLists.txt -i'' && #/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:39:25: error: unused variable 'ap0' [-Werror,-Wunused-variable]
sed 's/-Wno-error )/-Wno-error -Wno-c++20-extensions -std=c++20)/g' CMakeLists.txt -i'' && #silence warning about inline variables/c++20 designators
cmake --build build --parallel2 --clean-first
~/Vulkan-Hpp $ ./RunCmakeSamples.sh
--  Found clang-format version <17.0.2>.
--  Using .clang-format version 15.
CMake Warning (dev) at CMakeLists.txt:362 (target_sources):
  CMake's C++ module support is experimental.  It is meant only for
  experimentation and feedback to CMake developers.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- GLM: Version 0.9.9.9
-- Including X11 support
-- Google Mock was not found - tests based on that will not build
-- Trying to find local SPIR-V tools
-- optimizer enabled
-- Configuring done (5.4s)
-- Generating done (0.2s)
-- Build files have been written to: /data/data/com.termux/files/home/Vulkan-Hpp/build
[0/1] Re-running CMake...
--  Found clang-format version <17.0.2>.
--  Using .clang-format version 15.
CMake Warning (dev) at CMakeLists.txt:362 (target_sources):
  CMake's C++ module support is experimental.  It is meant only for
  experimentation and feedback to CMake developers.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- GLM: Version 0.9.9.9
-- Including X11 support
-- Google Mock was not found - tests based on that will not build
-- Trying to find local SPIR-V tools
-- optimizer enabled
-- Configuring done (5.0s)
-- Generating done (0.1s)
-- Build files have been written to: /data/data/com.termux/files/home/Vulkan-Hpp/build
[218/265] Building CXX object tests/ArrayProxy/CMakeFiles/ArrayProxy.dir/ArrayProxy.cpp.o
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:39:25: warning: unused variable 'ap0' [-Wunused-variable]
   39 |     vk::ArrayProxy<int> ap0 = nullptr;
      |                         ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:54:31: warning: unused variable 'ap1' [-Wunused-variable]
   54 |     vk::ArrayProxy<const int> ap1 = 1;
      |                               ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:56:31: warning: unused variable 'ap2' [-Wunused-variable]
   56 |     vk::ArrayProxy<const int> ap2 = i0;
      |                               ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:58:31: warning: unused variable 'ap3' [-Wunused-variable]
   58 |     vk::ArrayProxy<const int> ap3 = i1;
      |                               ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:86:31: warning: unused variable 'ap6' [-Wunused-variable]
   86 |     vk::ArrayProxy<const int> ap6 = ia0;
      |                               ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:88:31: warning: unused variable 'ap7' [-Wunused-variable]
   88 |     vk::ArrayProxy<const int> ap7 = ia1;
      |                               ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:109:25: warning: unused variable 'ap8' [-Wunused-variable]
  109 |     vk::ArrayProxy<int> ap8 = sa0;
      |                         ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:115:31: warning: unused variable 'ap12' [-Wunused-variable]
  115 |     vk::ArrayProxy<const int> ap12 = sa0;
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:117:31: warning: unused variable 'ap13' [-Wunused-variable]
  117 |     vk::ArrayProxy<const int> ap13 = sa1;
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:119:31: warning: unused variable 'ap14' [-Wunused-variable]
  119 |     vk::ArrayProxy<const int> ap14 = sa2;
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:121:31: warning: unused variable 'ap15' [-Wunused-variable]
  121 |     vk::ArrayProxy<const int> ap15 = sa3;
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:133:25: warning: unused variable 'ap16' [-Wunused-variable]
  133 |     vk::ArrayProxy<int> ap16 = sv0;
      |                         ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:137:31: warning: unused variable 'ap18' [-Wunused-variable]
  137 |     vk::ArrayProxy<const int> ap18 = sv0;
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:139:31: warning: unused variable 'ap19' [-Wunused-variable]
  139 |     vk::ArrayProxy<const int> ap19 = sv1;
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:179:31: warning: unused variable 'ap24' [-Wunused-variable]
  179 |     vk::ArrayProxy<const int> ap24 = {};
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:183:31: warning: unused variable 'ap26' [-Wunused-variable]
  183 |     vk::ArrayProxy<const int> ap26 = il1;
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:185:31: warning: unused variable 'ap27' [-Wunused-variable]
  185 |     vk::ArrayProxy<const int> ap27 = il2;
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:187:31: warning: unused variable 'ap28' [-Wunused-variable]
  187 |     vk::ArrayProxy<const int> ap28 = il3;
      |                               ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxy/ArrayProxy.cpp:189:31: warning: unused variable 'ap29' [-Wunused-variable]
  189 |     vk::ArrayProxy<const int> ap29 = il4;
      |                               ^~~~
19 warnings generated.
[220/265] Building CXX object tests/ArrayProxyNoTempor...ayProxyNoTemporaries.dir/ArrayProxyNoTemporaries.cpp.
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:74:10: warning: returning address of local temporary object [-Wreturn-stack-address]
   74 |   return { 1, 2 };
      |          ^~~~~~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:79:10: warning: returning address of local temporary object [-Wreturn-stack-address]
   79 |   return { 1, 2 };
      |          ^~~~~~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:90:38: warning: unused variable 'ap0' [-Wunused-variable]
   90 |     vk::ArrayProxyNoTemporaries<int> ap0 = nullptr;
      |                                      ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:111:44: warning: unused variable 'ap2' [-Wunused-variable]
  111 |     vk::ArrayProxyNoTemporaries<const int> ap2 = i0;
      |                                            ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:113:44: warning: unused variable 'ap3' [-Wunused-variable]
  113 |     vk::ArrayProxyNoTemporaries<const int> ap3 = i1;
      |                                            ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:141:44: warning: unused variable 'ap6' [-Wunused-variable]
  141 |     vk::ArrayProxyNoTemporaries<const int> ap6 = ia0;
      |                                            ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:143:44: warning: unused variable 'ap7' [-Wunused-variable]
  143 |     vk::ArrayProxyNoTemporaries<const int> ap7 = ia1;
      |                                            ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:179:38: warning: unused variable 'ap8' [-Wunused-variable]
  179 |     vk::ArrayProxyNoTemporaries<int> ap8 = sa0;
      |                                      ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:187:44: warning: unused variable 'ap12' [-Wunused-variable]
  187 |     vk::ArrayProxyNoTemporaries<const int> ap12 = sa0;
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:189:44: warning: unused variable 'ap13' [-Wunused-variable]
  189 |     vk::ArrayProxyNoTemporaries<const int> ap13 = sa1;
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:191:44: warning: unused variable 'ap14' [-Wunused-variable]
  191 |     vk::ArrayProxyNoTemporaries<const int> ap14 = sa2;
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:193:44: warning: unused variable 'ap15' [-Wunused-variable]
  193 |     vk::ArrayProxyNoTemporaries<const int> ap15 = sa3;
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:213:38: warning: unused variable 'ap16' [-Wunused-variable]
  213 |     vk::ArrayProxyNoTemporaries<int> ap16 = sv0;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:219:44: warning: unused variable 'ap18' [-Wunused-variable]
  219 |     vk::ArrayProxyNoTemporaries<const int> ap18 = sv0;
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:221:44: warning: unused variable 'ap19' [-Wunused-variable]
  221 |     vk::ArrayProxyNoTemporaries<const int> ap19 = sv1;
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:269:44: warning: unused variable 'ap24' [-Wunused-variable]
  269 |     vk::ArrayProxyNoTemporaries<const int> ap24 = {};
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:274:44: warning: unused variable 'ap26' [-Wunused-variable]
  274 |     vk::ArrayProxyNoTemporaries<const int> ap26 = il1;
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:276:44: warning: unused variable 'ap27' [-Wunused-variable]
  276 |     vk::ArrayProxyNoTemporaries<const int> ap27 = il2;
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:278:44: warning: unused variable 'ap28' [-Wunused-variable]
  278 |     vk::ArrayProxyNoTemporaries<const int> ap28 = il3;
      |                                            ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/ArrayProxyNoTemporaries/ArrayProxyNoTemporaries.cpp:280:44: warning: unused variable 'ap29' [-Wunused-variable]
  280 |     vk::ArrayProxyNoTemporaries<const int> ap29 = il4;
      |                                            ^~~~
20 warnings generated.
[252/265] Building CXX object tests/StridedArrayProxy/CMakeFiles/StridedArrayProxy.dir/StridedArrayProxy.cpp.o
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:39:32: warning: unused variable 'ap0' [-Wunused-variable]
   39 |     vk::StridedArrayProxy<int> ap0 = nullptr;
      |                                ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:54:38: warning: unused variable 'ap1' [-Wunused-variable]
   54 |     vk::StridedArrayProxy<const int> ap1 = 1;
      |                                      ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:56:38: warning: unused variable 'ap2' [-Wunused-variable]
   56 |     vk::StridedArrayProxy<const int> ap2 = i0;
      |                                      ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:58:38: warning: unused variable 'ap3' [-Wunused-variable]
   58 |     vk::StridedArrayProxy<const int> ap3 = i1;
      |                                      ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:86:38: warning: unused variable 'ap6' [-Wunused-variable]
   86 |     vk::StridedArrayProxy<const int> ap6 = ia0;
      |                                      ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:88:38: warning: unused variable 'ap7' [-Wunused-variable]
   88 |     vk::StridedArrayProxy<const int> ap7 = ia1;
      |                                      ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:109:32: warning: unused variable 'ap8' [-Wunused-variable]
  109 |     vk::StridedArrayProxy<int> ap8 = sa0;
      |                                ^~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:115:38: warning: unused variable 'ap12' [-Wunused-variable]
  115 |     vk::StridedArrayProxy<const int> ap12 = sa0;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:117:38: warning: unused variable 'ap13' [-Wunused-variable]
  117 |     vk::StridedArrayProxy<const int> ap13 = sa1;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:119:38: warning: unused variable 'ap14' [-Wunused-variable]
  119 |     vk::StridedArrayProxy<const int> ap14 = sa2;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:121:38: warning: unused variable 'ap15' [-Wunused-variable]
  121 |     vk::StridedArrayProxy<const int> ap15 = sa3;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:133:32: warning: unused variable 'ap16' [-Wunused-variable]
  133 |     vk::StridedArrayProxy<int> ap16 = sv0;
      |                                ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:137:38: warning: unused variable 'ap18' [-Wunused-variable]
  137 |     vk::StridedArrayProxy<const int> ap18 = sv0;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:139:38: warning: unused variable 'ap19' [-Wunused-variable]
  139 |     vk::StridedArrayProxy<const int> ap19 = sv1;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:179:38: warning: unused variable 'ap24' [-Wunused-variable]
  179 |     vk::StridedArrayProxy<const int> ap24 = {};
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:183:38: warning: unused variable 'ap26' [-Wunused-variable]
  183 |     vk::StridedArrayProxy<const int> ap26 = il1;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:185:38: warning: unused variable 'ap27' [-Wunused-variable]
  185 |     vk::StridedArrayProxy<const int> ap27 = il2;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:187:38: warning: unused variable 'ap28' [-Wunused-variable]
  187 |     vk::StridedArrayProxy<const int> ap28 = il3;
      |                                      ^~~~
/data/data/com.termux/files/home/Vulkan-Hpp/tests/StridedArrayProxy/StridedArrayProxy.cpp:189:38: warning: unused variable 'ap29' [-Wunused-variable]
  189 |     vk::StridedArrayProxy<const int> ap29 = il4;
      |                                      ^~~~
19 warnings generated.
[259/265] Linking CXX executable tests/UniqueHandleDefaultArguments/UniqueHandleDefaultArguments
FAILED: tests/UniqueHandleDefaultArguments/UniqueHandleDefaultArguments
: && /data/data/com.termux/files/usr/bin/c++ -O2 -g -DNDEBUG  tests/UniqueHandleDefaultArguments/CMakeFiles/UniqueHandleDefaultArguments.dir/UniqueHandleDefaultArguments.cpp.o -o tests/UniqueHandleDefaultArguments/UniqueHandleDefaultArguments  samples/utils/libutils.a  glfw/src/libglfw3.a  -lpthread  -lrt  -ldl  glslang/glslang/libglslang.a  glslang/glslang/libglslang-default-resource-limits.a  glslang/SPIRV/libSPIRV.a  glslang/glslang/libMachineIndependent.a  glslang/OGLCompilersDLL/libOGLCompiler.a  glslang/glslang/OSDependent/Unix/libOSDependent.a  -pthread  glslang/glslang/libGenericCodeGen.a  /data/data/com.termux/files/usr/lib/libSPIRV-Tools-opt.a  /data/data/com.termux/files/usr/lib/libSPIRV-Tools.a  -landroid  -llog && :
ld.lld: error: undefined symbol: main
>>> referenced by crtbegin.c
>>>               /data/data/com.termux/files/usr/lib/crtbegin_dynamic.o:(_start_main)
>>> referenced by crtbegin.c
>>>               /data/data/com.termux/files/usr/lib/crtbegin_dynamic.o:(_start_main)
c++: error: linker command failed with exit code 1 (use -v to see invocation)
[260/265] Building CXX object tests/ExtensionInspectio...iles/ExtensionInspection.dir/ExtensionInspection.cpp.
ninja: build stopped: subcommand failed.
~/Vulkan-Hpp $
AmericaPacific42 commented 1 year ago

-DVULKAN_HPP_TESTS_BUILD=off -DVULKAN_HPP_SAMPLES_BUILD=on allows samples-only (no tests) compilation.