Ubpa / UDRefl

Ubpa Dynamic Reflection
MIT License
353 stars 59 forks source link

未知来源头文件doctest.hpp导致编译失败 #18

Closed uikino closed 2 years ago

uikino commented 2 years ago

未知来源头文件doctest.hpp导致编译失败

描述

于今日使用git clone https://github.com/Ubpa/UDRefl获取最新源码进行编译 编译选项使用cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/output/ . && make -j4 但在编译时发生错误,具体为编译依赖项目USmallFlat的测试用例01_basic/main.cpp引用了头文件doctest.hpp导致错误。 其提示为altStackMemory的大小不是一个常量表达式,经查发现宏SIGSTKSZ不存在。 随后在其USmallFat仓库内发现doctest.hpp已加入.gitignore内并且不存在于仓库内。随即检查USmallFlatUDRefl内所引用的git tag版本均为2.3.0。故只能判断doctest.hpp属于未知来源引入

错误信息

编译日志 子项目USmallFlat版本

➜  usmallflat-src git:(488d1f6) git tag | more
0.1.0
0.2.0
0.2.1
0.2.2
0.2.3

编译日志

discaz@discaz-usb: ~/projects/test/xrepo_package_maker/kkls/UDRefl master ⚡ $ make -j4                                                               [16:42:16]
[  2%] Building CXX object _deps/ucmake-build/src/test/04_dll/gen/CMakeFiles/UCMake_test_04_dll_gen.dir/mul.cpp.o
[  2%] Building CXX object _deps/ucmake-build/src/test/03_lib/gen/CMakeFiles/UCMake_test_03_lib_gen.dir/add.cpp.o
[  2%] Building CXX object _deps/ucmake-build/src/EMPTY/CMakeFiles/UCMake_EMPTY.dir/main.cpp.o
[  2%] Building CXX object _deps/ucmake-build/src/test/02_cpp20/CMakeFiles/UCMake_test_02_cpp20.dir/main.cpp.o
[  3%] Linking CXX executable ../../../ucmake-src/bin/UCMake_EMPTY
[  4%] Linking CXX static library ../../../../../ucmake-src/lib/libUCMake_test_03_lib_gen.a
[  4%] Linking CXX shared library ../../../../../ucmake-src/bin/libUCMake_test_04_dll_gen.so
[  4%] Built target UCMake_test_03_lib_gen
[  4%] Built target UCMake_EMPTY
[  4%] Built target UCMake_test_04_dll_gen
[  4%] Building CXX object _deps/ucmake-build/src/test/05_dll_class/classic/gen/CMakeFiles/UCMake_test_05_dll_class_classic_gen.dir/MyClass.cpp.o
[  4%] Building CXX object _deps/ucmake-build/src/test/05_dll_class/virtual/gen/CMakeFiles/UCMake_test_05_dll_class_virtual_gen.dir/MyClass.cpp.o
[  5%] Building CXX object _deps/ucmake-build/src/test/06_static_shared/gen/CMakeFiles/UCMake_test_06_static_shared_gen_static.dir/mul.cpp.o
[  5%] Linking CXX static library ../../../../../ucmake-src/lib/libUCMake_test_06_static_shared_gen_static.a
[  5%] Built target UCMake_test_06_static_shared_gen_static
[  5%] Building CXX object _deps/ucmake-build/src/test/06_static_shared/gen/CMakeFiles/UCMake_test_06_static_shared_gen_shared.dir/mul.cpp.o
[  6%] Linking CXX shared library ../../../../../ucmake-src/bin/libUCMake_test_06_static_shared_gen_shared.so
[  6%] Built target UCMake_test_06_static_shared_gen_shared
[  7%] Building CXX object _deps/ucmake-build/src/test/06_static_shared/use_static/CMakeFiles/UCMake_test_06_static_shared_use_static.dir/main.cpp.o
[  8%] Linking CXX executable ../../../../ucmake-src/bin/UCMake_test_02_cpp20
[  8%] Built target UCMake_test_02_cpp20
[  9%] Linking CXX shared library ../../../../../../ucmake-src/bin/libUCMake_test_05_dll_class_classic_gen.so
[  9%] Building CXX object _deps/utemplate-build/src/EMPTY/CMakeFiles/UTemplate_EMPTY.dir/EMPTY.cpp.o
[ 10%] Linking CXX executable ../../../../bin/UTemplate_EMPTY
[ 11%] Linking CXX shared library ../../../../../../ucmake-src/bin/libUCMake_test_05_dll_class_virtual_gen.so
[ 11%] Built target UCMake_test_05_dll_class_classic_gen
[ 11%] Building CXX object _deps/utemplate-build/src/test/01_TStr/CMakeFiles/UTemplate_test_01_TStr.dir/main.cpp.o
[ 11%] Built target UTemplate_EMPTY
[ 12%] Building CXX object _deps/utemplate-build/src/test/02_List/01_TypeList/CMakeFiles/UTemplate_test_02_List_01_TypeList.dir/main.cpp.o
[ 12%] Built target UCMake_test_05_dll_class_virtual_gen
[ 13%] Building CXX object _deps/utemplate-build/src/test/02_List/02_TemplateList/CMakeFiles/UTemplate_test_02_List_02_TemplateList.dir/main.cpp.o
[ 14%] Linking CXX executable ../../../../../ucmake-src/bin/UCMake_test_06_static_shared_use_static
[ 14%] Built target UCMake_test_06_static_shared_use_static
[ 15%] Building CXX object _deps/utemplate-build/src/test/02_List/03_Sort/CMakeFiles/UTemplate_test_02_List_03_Sort.dir/main.cpp.o
[ 15%] Linking CXX executable ../../../../../../bin/UTemplate_test_02_List_02_TemplateList
[ 15%] Built target UTemplate_test_02_List_02_TemplateList
[ 15%] Building CXX object _deps/utemplate-build/src/test/03_SI/CMakeFiles/UTemplate_test_03_SI.dir/main.cpp.o
[ 16%] Linking CXX executable ../../../../../bin/UTemplate_test_01_TStr
[ 16%] Linking CXX executable ../../../../../../bin/UTemplate_test_02_List_01_TypeList
[ 16%] Built target UTemplate_test_01_TStr
[ 17%] Building CXX object _deps/utemplate-build/src/test/06_TypeID/CMakeFiles/UTemplate_test_06_TypeID.dir/main.cpp.o
[ 17%] Built target UTemplate_test_02_List_01_TypeList
[ 18%] Building CXX object _deps/utemplate-build/src/test/07_Func/00_FuncTraits/CMakeFiles/UTemplate_test_07_Func_00_FuncTraits.dir/main.cpp.o
[ 19%] Linking CXX executable ../../../../../bin/UTemplate_test_03_SI
[ 20%] Linking CXX executable ../../../../../../bin/UTemplate_test_02_List_03_Sort
[ 20%] Built target UTemplate_test_03_SI
[ 21%] Building CXX object _deps/utemplate-build/src/test/07_Func/01_FuncExpand/CMakeFiles/UTemplate_test_07_Func_01_FuncExpand.dir/main.cpp.o
[ 21%] Built target UTemplate_test_02_List_03_Sort
[ 21%] Building CXX object _deps/utemplate-build/src/test/10_Name/CMakeFiles/UTemplate_test_10_Name.dir/main.cpp.o
[ 21%] Linking CXX executable ../../../../../../bin/UTemplate_test_07_Func_00_FuncTraits
[ 21%] Built target UTemplate_test_07_Func_00_FuncTraits
[ 21%] Linking CXX executable ../../../../../bin/UTemplate_test_06_TypeID
[ 21%] Building CXX object _deps/utemplate-build/src/test/11_NameTratis/CMakeFiles/UTemplate_test_11_NameTratis.dir/main.cpp.o
[ 21%] Built target UTemplate_test_06_TypeID
[ 22%] Building CXX object _deps/utemplate-build/src/test/12_Type/CMakeFiles/UTemplate_test_12_Type.dir/main.cpp.o
[ 23%] Linking CXX executable ../../../../../../bin/UTemplate_test_07_Func_01_FuncExpand
[ 23%] Built target UTemplate_test_07_Func_01_FuncExpand
[ 24%] Building CXX object _deps/utemplate-build/src/test/13_StdName/CMakeFiles/UTemplate_test_13_StdName.dir/main.cpp.o
[ 24%] Linking CXX executable ../../../../../bin/UTemplate_test_12_Type
[ 25%] Linking CXX executable ../../../../../bin/UTemplate_test_11_NameTratis
[ 25%] Built target UTemplate_test_12_Type
[ 26%] Building CXX object _deps/usmallflat-build/src/EMPTY/CMakeFiles/USmallFlat_EMPTY.dir/EMPTY.cpp.o
[ 27%] Linking CXX executable ../../../../bin/USmallFlat_EMPTY
[ 27%] Built target UTemplate_test_11_NameTratis
[ 27%] Building CXX object _deps/usmallflat-build/src/test/01_basic/CMakeFiles/USmallFlat_test_01_basic.dir/main.cpp.o
[ 27%] Built target USmallFlat_EMPTY
[ 28%] Building CXX object _deps/usmallflat-build/src/test/02_benchmark/CMakeFiles/USmallFlat_test_02_benchmark.dir/main.cpp.o
[ 29%] Linking CXX executable ../../../../../bin/UTemplate_test_13_StdName
[ 30%] Linking CXX executable ../../../../../bin/UTemplate_test_10_Name
[ 30%] Built target UTemplate_test_13_StdName
[ 30%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/FieldPtr.cpp.o
[ 30%] Built target UTemplate_test_10_Name
[ 31%] Building CXX object _deps/ucmake-build/src/test/03_lib/use/CMakeFiles/UCMake_test_03_lib_use.dir/main.cpp.o
[ 31%] Linking CXX executable ../../../../../ucmake-src/bin/UCMake_test_03_lib_use
[ 31%] Built target UCMake_test_03_lib_use
[ 32%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/IDRegistry.cpp.o
In file included from /home/discaz/projects/test/xrepo_package_maker/kkls/UDRefl/_deps/usmallflat-src/src/test/01_basic/main.cpp:2:
/home/discaz/projects/test/xrepo_package_maker/kkls/UDRefl/_deps/usmallflat-src/src/test/01_basic/doctest.hpp:4011:47: 错误:数组‘altStackMem’的大小不是一个整数常表达式
 4011 |         static char             altStackMem[4 * SIGSTKSZ];
      |                                               ^
[ 33%] Linking CXX executable ../../../../../bin/USmallFlat_test_02_benchmark
make[2]: *** [_deps/usmallflat-build/src/test/01_basic/CMakeFiles/USmallFlat_test_01_basic.dir/build.make:76:_deps/usmallflat-build/src/test/01_basic/CMakeFiles/USmallFlat_test_01_basic.dir/main.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:2367:_deps/usmallflat-build/src/test/01_basic/CMakeFiles/USmallFlat_test_01_basic.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
[ 34%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/InvokeUtil.cpp.o
[ 34%] Built target USmallFlat_test_02_benchmark
[ 34%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/MethodPtr.cpp.o
[ 35%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/Object.cpp.o
[ 35%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ReflMngr.cpp.o
[ 36%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ReflMngrInitUtil/ReflMngrInitUtil_0.cpp.o
[ 37%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ReflMngrInitUtil/ReflMngrInitUtil_1.cpp.o
[ 37%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ReflMngrInitUtil/ReflMngrInitUtil_2.cpp.o
[ 38%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ReflMngrInitUtil/ReflMngrInitUtil_3.cpp.o
[ 38%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ReflMngrInitUtil/ReflMngrInitUtil_4.cpp.o
[ 39%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ReflMngrInitUtil/ReflMngrInitUtil_5.cpp.o
[ 40%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ReflMngrInitUtil/ReflMngrInitUtil_6.cpp.o
[ 40%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ReflMngrInitUtil/ReflMngrInitUtil_7.cpp.o
[ 41%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ranges/FieldRange.cpp.o
[ 42%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ranges/MethodRange.cpp.o
[ 42%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ranges/ObjectTree.cpp.o
[ 43%] Building CXX object src/core/CMakeFiles/UDRefl_core.dir/ranges/VarRange.cpp.o
[ 43%] Linking CXX static library ../../lib/libUDRefl_core.a
[ 43%] Built target UDRefl_core
make: *** [Makefile:136:all] 错误 2
FAIL: 2
Ubpa commented 2 years ago

030185c

uikino commented 2 years ago