在开始编译前安装了如下程序
sudo apt install cmake git libfmt-dev libssl-dev rapidjson-dev build-essential -y
编译结果中仅有可执行文件 navicat-keygen
具体错误输出:
Determining if the include file malloc/malloc.h exists failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_d3766/fast && /usr/bin/gmake -f CMakeFiles/cmTC_d3766.dir/build.make CMakeFiles/cmTC_d3766.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_d3766.dir/CheckIncludeFile.c.o /usr/bin/cc -o CMakeFiles/cmTC_d3766.dir/CheckIncludeFile.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: malloc/malloc.h: 没有那个文件或目录 1 | #include <malloc/malloc.h> | ^~~~~~~~~~~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_d3766.dir/build.make:78:CMakeFiles/cmTC_d3766.dir/CheckIncludeFile.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_d3766/fast] 错误 2 Determining if the include file ndir.h exists failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_460a7/fast && /usr/bin/gmake -f CMakeFiles/cmTC_460a7.dir/build.make CMakeFiles/cmTC_460a7.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_460a7.dir/CheckIncludeFile.c.o /usr/bin/cc -o CMakeFiles/cmTC_460a7.dir/CheckIncludeFile.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: ndir.h: 没有那个文件或目录 1 | #include <ndir.h> | ^~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_460a7.dir/build.make:78:CMakeFiles/cmTC_460a7.dir/CheckIncludeFile.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_460a7/fast] 错误 2 Determining if the include file sys/ndir.h exists failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_39463/fast && /usr/bin/gmake -f CMakeFiles/cmTC_39463.dir/build.make CMakeFiles/cmTC_39463.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_39463.dir/CheckIncludeFile.c.o /usr/bin/cc -o CMakeFiles/cmTC_39463.dir/CheckIncludeFile.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: sys/ndir.h: 没有那个文件或目录 1 | #include <sys/ndir.h> | ^~~~~~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_39463.dir/build.make:78:CMakeFiles/cmTC_39463.dir/CheckIncludeFile.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_39463/fast] 错误 2 Determining if the include file zlib.h exists failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_04362/fast && /usr/bin/gmake -f CMakeFiles/cmTC_04362.dir/build.make CMakeFiles/cmTC_04362.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_04362.dir/CheckIncludeFile.c.o /usr/bin/cc -o CMakeFiles/cmTC_04362.dir/CheckIncludeFile.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: zlib.h: 没有那个文件或目录 1 | #include <zlib.h> | ^~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_04362.dir/build.make:78:CMakeFiles/cmTC_04362.dir/CheckIncludeFile.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_04362/fast] 错误 2 Determining if the include file mach/mach.h exists failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_e84af/fast && /usr/bin/gmake -f CMakeFiles/cmTC_e84af.dir/build.make CMakeFiles/cmTC_e84af.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_e84af.dir/CheckIncludeFile.c.o /usr/bin/cc -o CMakeFiles/cmTC_e84af.dir/CheckIncludeFile.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: mach/mach.h: 没有那个文件或目录 1 | #include <mach/mach.h> | ^~~~~~~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_e84af.dir/build.make:78:CMakeFiles/cmTC_e84af.dir/CheckIncludeFile.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_e84af/fast] 错误 2 Determining if the include file mach-o/dyld.h exists failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_e7689/fast && /usr/bin/gmake -f CMakeFiles/cmTC_e7689.dir/build.make CMakeFiles/cmTC_e7689.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_e7689.dir/CheckIncludeFile.c.o /usr/bin/cc -o CMakeFiles/cmTC_e7689.dir/CheckIncludeFile.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: mach-o/dyld.h: 没有那个文件或目录 1 | #include <mach-o/dyld.h> | ^~~~~~~~~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_e7689.dir/build.make:78:CMakeFiles/cmTC_e7689.dir/CheckIncludeFile.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_e7689/fast] 错误 2 Determining if the include file histedit.h exists failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_1e2b5/fast && /usr/bin/gmake -f CMakeFiles/cmTC_1e2b5.dir/build.make CMakeFiles/cmTC_1e2b5.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_1e2b5.dir/CheckIncludeFile.c.o /usr/bin/cc -o CMakeFiles/cmTC_1e2b5.dir/CheckIncludeFile.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:10: fatal error: histedit.h: 没有那个文件或目录 1 | #include <histedit.h> | ^~~~~~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_1e2b5.dir/build.make:78:CMakeFiles/cmTC_1e2b5.dir/CheckIncludeFile.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_1e2b5/fast] 错误 2 Determining if the function compress2 exists in the z failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_5ebb7/fast && /usr/bin/gmake -f CMakeFiles/cmTC_5ebb7.dir/build.make CMakeFiles/cmTC_5ebb7.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_5ebb7.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=compress2 -o CMakeFiles/cmTC_5ebb7.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.22/Modules/CheckFunctionExists.c Linking C executable cmTC_5ebb7 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5ebb7.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=compress2 -rdynamic CMakeFiles/cmTC_5ebb7.dir/CheckFunctionExists.c.o -o cmTC_5ebb7 -lz -lm /usr/bin/ld: 找不到 -lz: 没有那个文件或目录 collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_5ebb7.dir/build.make:99:cmTC_5ebb7] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_5ebb7/fast] 错误 2 Determining if the function setupterm exists in the tinfo failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_72953/fast && /usr/bin/gmake -f CMakeFiles/cmTC_72953.dir/build.make CMakeFiles/cmTC_72953.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_72953.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -o CMakeFiles/cmTC_72953.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.22/Modules/CheckFunctionExists.c Linking C executable cmTC_72953 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_72953.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -rdynamic CMakeFiles/cmTC_72953.dir/CheckFunctionExists.c.o -o cmTC_72953 -ltinfo -lm /usr/bin/ld: 找不到 -ltinfo: 没有那个文件或目录 collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_72953.dir/build.make:99:cmTC_72953] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_72953/fast] 错误 2 Determining if the function setupterm exists in the terminfo failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_926a6/fast && /usr/bin/gmake -f CMakeFiles/cmTC_926a6.dir/build.make CMakeFiles/cmTC_926a6.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_926a6.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -o CMakeFiles/cmTC_926a6.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.22/Modules/CheckFunctionExists.c Linking C executable cmTC_926a6 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_926a6.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -rdynamic CMakeFiles/cmTC_926a6.dir/CheckFunctionExists.c.o -o cmTC_926a6 -lterminfo -lm /usr/bin/ld: 找不到 -lterminfo: 没有那个文件或目录 collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_926a6.dir/build.make:99:cmTC_926a6] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_926a6/fast] 错误 2 Determining if the function setupterm exists in the curses failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_a7a99/fast && /usr/bin/gmake -f CMakeFiles/cmTC_a7a99.dir/build.make CMakeFiles/cmTC_a7a99.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_a7a99.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -o CMakeFiles/cmTC_a7a99.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.22/Modules/CheckFunctionExists.c Linking C executable cmTC_a7a99 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a7a99.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -rdynamic CMakeFiles/cmTC_a7a99.dir/CheckFunctionExists.c.o -o cmTC_a7a99 -lcurses -lm /usr/bin/ld: 找不到 -lcurses: 没有那个文件或目录 collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_a7a99.dir/build.make:99:cmTC_a7a99] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_a7a99/fast] 错误 2 Determining if the function setupterm exists in the ncurses failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_16d6d/fast && /usr/bin/gmake -f CMakeFiles/cmTC_16d6d.dir/build.make CMakeFiles/cmTC_16d6d.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_16d6d.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -o CMakeFiles/cmTC_16d6d.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.22/Modules/CheckFunctionExists.c Linking C executable cmTC_16d6d /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_16d6d.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -rdynamic CMakeFiles/cmTC_16d6d.dir/CheckFunctionExists.c.o -o cmTC_16d6d -lncurses -lm /usr/bin/ld: 找不到 -lncurses: 没有那个文件或目录 collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_16d6d.dir/build.make:99:cmTC_16d6d] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_16d6d/fast] 错误 2 Determining if the function setupterm exists in the ncursesw failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_448be/fast && /usr/bin/gmake -f CMakeFiles/cmTC_448be.dir/build.make CMakeFiles/cmTC_448be.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_448be.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -o CMakeFiles/cmTC_448be.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.22/Modules/CheckFunctionExists.c Linking C executable cmTC_448be /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_448be.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=setupterm -rdynamic CMakeFiles/cmTC_448be.dir/CheckFunctionExists.c.o -o cmTC_448be -lncursesw -lm /usr/bin/ld: 找不到 -lncursesw: 没有那个文件或目录 collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_448be.dir/build.make:99:cmTC_448be] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_448be/fast] 错误 2 Determining if the arc4random exist failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_eff4d/fast && /usr/bin/gmake -f CMakeFiles/cmTC_eff4d.dir/build.make CMakeFiles/cmTC_eff4d.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_eff4d.dir/CheckSymbolExists.c.o /usr/bin/cc -o CMakeFiles/cmTC_eff4d.dir/CheckSymbolExists.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: ‘arc4random’ undeclared (first use in this function); did you mean ‘srandom’? 8 | return ((int*)(&arc4random))[argc]; | ^~~~~~~~~~ | srandom /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in gmake[1]: *** [CMakeFiles/cmTC_eff4d.dir/build.make:78:CMakeFiles/cmTC_eff4d.dir/CheckSymbolExists.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_eff4d/fast] 错误 2 File /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */ #include <stdlib.h> int main(int argc, char** argv) { (void)argv; #ifndef arc4random return ((int*)(&arc4random))[argc]; #else (void)argc; return 0; #endif } Determining if the mallctl exist failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_cfedc/fast && /usr/bin/gmake -f CMakeFiles/cmTC_cfedc.dir/build.make CMakeFiles/cmTC_cfedc.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_cfedc.dir/CheckSymbolExists.c.o /usr/bin/cc -o CMakeFiles/cmTC_cfedc.dir/CheckSymbolExists.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: malloc_np.h: 没有那个文件或目录 2 | #include <malloc_np.h> | ^~~~~~~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_cfedc.dir/build.make:78:CMakeFiles/cmTC_cfedc.dir/CheckSymbolExists.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_cfedc/fast] 错误 2 File /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */ #include <malloc_np.h> int main(int argc, char** argv) { (void)argv; #ifndef mallctl return ((int*)(&mallctl))[argc]; #else (void)argc; return 0; #endif } Determining if the malloc_zone_statistics exist failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_35eda/fast && /usr/bin/gmake -f CMakeFiles/cmTC_35eda.dir/build.make CMakeFiles/cmTC_35eda.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_35eda.dir/CheckSymbolExists.c.o /usr/bin/cc -o CMakeFiles/cmTC_35eda.dir/CheckSymbolExists.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:10: fatal error: malloc/malloc.h: 没有那个文件或目录 2 | #include <malloc/malloc.h> | ^~~~~~~~~~~~~~~~~ compilation terminated. gmake[1]: *** [CMakeFiles/cmTC_35eda.dir/build.make:78:CMakeFiles/cmTC_35eda.dir/CheckSymbolExists.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_35eda/fast] 错误 2 File /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */ #include <malloc/malloc.h> int main(int argc, char** argv) { (void)argv; #ifndef malloc_zone_statistics return ((int*)(&malloc_zone_statistics))[argc]; #else (void)argc; return 0; #endif } Determining if the strerror_s exist failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_51cc0/fast && /usr/bin/gmake -f CMakeFiles/cmTC_51cc0.dir/build.make CMakeFiles/cmTC_51cc0.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_51cc0.dir/CheckSymbolExists.c.o /usr/bin/cc -o CMakeFiles/cmTC_51cc0.dir/CheckSymbolExists.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: ‘strerror_s’ undeclared (first use in this function); did you mean ‘strerror_l’? 8 | return ((int*)(&strerror_s))[argc]; | ^~~~~~~~~~ | strerror_l /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in gmake[1]: *** [CMakeFiles/cmTC_51cc0.dir/build.make:78:CMakeFiles/cmTC_51cc0.dir/CheckSymbolExists.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_51cc0/fast] 错误 2 File /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: /* */ #include <string.h> int main(int argc, char** argv) { (void)argv; #ifndef strerror_s return ((int*)(&strerror_s))[argc]; #else (void)argc; return 0; #endif } Performing C SOURCE FILE Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_b45f9/fast && /usr/bin/gmake -f CMakeFiles/cmTC_b45f9.dir/build.make CMakeFiles/cmTC_b45f9.dir/build gmake[1]: Entering directory '/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_b45f9.dir/src.c.o /usr/bin/cc -DC_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Werror -Wcovered-switch-default -o CMakeFiles/cmTC_b45f9.dir/src.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/src.c cc: error: unrecognized command-line option '-Wcovered-switch-default'; did you mean '-Wno-switch-default'? gmake[1]: *** [CMakeFiles/cmTC_b45f9.dir/build.make:78: CMakeFiles/cmTC_b45f9.dir/src.c.o] Error 1 gmake[1]: Leaving directory '/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp' gmake: *** [Makefile:127: cmTC_b45f9/fast] Error 2 Source file was: int main(void) { return 0; } Performing C++ SOURCE FILE Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_6670e/fast && /usr/bin/gmake -f CMakeFiles/cmTC_6670e.dir/build.make CMakeFiles/cmTC_6670e.dir/build gmake[1]: Entering directory '/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_6670e.dir/src.cxx.o /usr/bin/c++ -DCXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Werror -Wcovered-switch-default -o CMakeFiles/cmTC_6670e.dir/src.cxx.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/src.cxx c++: error: unrecognized command-line option '-Wcovered-switch-default'; did you mean '-Wno-switch-default'? gmake[1]: *** [CMakeFiles/cmTC_6670e.dir/build.make:78: CMakeFiles/cmTC_6670e.dir/src.cxx.o] Error 1 gmake[1]: Leaving directory '/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp' gmake: *** [Makefile:127: cmTC_6670e/fast] Error 2 Source file was: int main() { return 0; } Performing C SOURCE FILE Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_24214/fast && /usr/bin/gmake -f CMakeFiles/cmTC_24214.dir/build.make CMakeFiles/cmTC_24214.dir/build gmake[1]: Entering directory '/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_24214.dir/src.c.o /usr/bin/cc -DC_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Werror -Wdelete-non-virtual-dtor -o CMakeFiles/cmTC_24214.dir/src.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/src.c cc1: error: command-line option '-Wdelete-non-virtual-dtor' is valid for C++/ObjC++ but not for C [-Werror] cc1: all warnings being treated as errors gmake[1]: *** [CMakeFiles/cmTC_24214.dir/build.make:78: CMakeFiles/cmTC_24214.dir/src.c.o] Error 1 gmake[1]: Leaving directory '/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp' gmake: *** [Makefile:127: cmTC_24214/fast] Error 2 Source file was: int main(void) { return 0; } Performing C SOURCE FILE Test C_WCOMMENT_ALLOWS_LINE_WRAP failed with the following output: Change Dir: /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_0b9b6/fast && /usr/bin/gmake -f CMakeFiles/cmTC_0b9b6.dir/build.make CMakeFiles/cmTC_0b9b6.dir/build gmake[1]: 进入目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” Building C object CMakeFiles/cmTC_0b9b6.dir/src.c.o /usr/bin/cc -DC_WCOMMENT_ALLOWS_LINE_WRAP -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Werror -Wcomment -o CMakeFiles/cmTC_0b9b6.dir/src.c.o -c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/src.c /home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp/src.c:1:1: error: multi-line comment [-Werror=comment] 1 | // \ | ^ cc1: all warnings being treated as errors gmake[1]: *** [CMakeFiles/cmTC_0b9b6.dir/build.make:78:CMakeFiles/cmTC_0b9b6.dir/src.c.o] 错误 1 gmake[1]: 离开目录“/home/xianyu/git/navicat-keygen/build/CMakeFiles/CMakeTmp” gmake: *** [Makefile:127:cmTC_0b9b6/fast] 错误 2 Source file was: // \ // int main() {return 0;}
这个我恐怕没法解决,这些报错都是cmake自己的错误。我觉得你本地的编译环境已经被污染了,建议在docker里开个ubuntu、然后在里面编译看看。
在开始编译前安装了如下程序
编译结果中仅有可执行文件 navicat-keygen
具体错误输出:
这个我恐怕没法解决,这些报错都是cmake自己的错误。我觉得你本地的编译环境已经被污染了,建议在docker里开个ubuntu、然后在里面编译看看。