jmpews / Dobby

a lightweight, multi-platform, multi-architecture hook framework.
Apache License 2.0
4.04k stars 844 forks source link

ubuntu 22.04.4 LTS 编译失败 #268

Open mankouzhuya opened 4 months ago

mankouzhuya commented 4 months ago

-- The C compiler identification is GNU 11.4.0 -- The CXX compiler identification is GNU 11.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- The ASM compiler identification is GNU -- Found assembler: /usr/bin/cc -- -- * build environment check *** -- Compiler: GNU -- Processor: x86_64 -- System: Linux -- *** -- -- CMAKE_C_COMPILER: /usr/bin/cc -- CMAKE_CXX_COMPILER: /usr/bin/c++ -- CMAKE_C_FLAGS: -fvisibility=hidden -fPIC -fno-stack-check -fno-stack-protector -fno-exceptions -fno-rtti -fno-common -fno-zero-initialized-in-bss -fPIC -O3 -fno-rtti -fvisibility=hidden -fvisibility-inlines-hidden -- CMAKE_CXX_FLAGS: -fvisibility=hidden -fPIC -fno-stack-check -fno-stack-protector -fno-exceptions -fno-rtti -fno-common -fno-zero-initialized-in-bss -fPIC -O3 -fno-rtti -fvisibility=hidden -fvisibility-inlines-hidden -- CMAKE_SHARED_LINKER_FLAGS: -- [Dobby] CMAKE_BUILD_TYPE: -- [Dobby] DOBBY_DEBUG: OFF -- [Dobby] NearBranch: ON -- [Dobby] FullFloatingPointRegisterPack: OFF -- [Dobby] Plugin.SymbolResolver: ON -- [Dobby] Plugin.ImportTableReplace: OFF -- [Dobby] Plugin.Android.BionicLinkerUtil: OFF -- [Dobby] DOBBY_BUILD_EXAMPLE: OFF -- [Dobby] DOBBY_BUILD_TEST: OFF -- [Dobby] DOBBY_BUILD_KERNEL_MODE: OFF -- [Dobby] Private.Obfuscation: OFF -- [Dobby] Dobby-20240613-5dfc854 -- Configuring done -- Generating done

Scanning dependencies of target dobby [ 1%] Building CXX object CMakeFiles/dobby.dir/source/core/assembler/assembler-arm.cc.o [ 2%] Building CXX object CMakeFiles/dobby.dir/source/core/assembler/assembler-ia32.cc.o [ 3%] Building CXX object CMakeFiles/dobby.dir/source/core/assembler/assembler-x64.cc.o In file included from /home/jun/CLionProjects/Dobby/./common/os_arch_features.h:5, from /home/jun/CLionProjects/Dobby/./source/dobby/common.h:12, from /home/jun/CLionProjects/Dobby/./source/core/assembler/assembler-x64.h:3, from /home/jun/CLionProjects/Dobby/source/core/assembler/assembler-x64.cc:4: /home/jun/CLionProjects/Dobby/./common/pac_kit.h:7:41: error: missing binary operator before token "(" 7 | #if defined(arm64e) || has_feature(ptrauth_calls) | ^ /home/jun/CLionProjects/Dobby/./common/pac_kit.h:15:18: error: missing binary operator before token "(" 15 | #if has_feature(ptrauth_calls) || arm64e__ | ^ /home/jun/CLionProjects/Dobby/./common/pac_kit.h:30:18: error: missing binary operator before token "(" 30 | #if has_feature(ptrauth_calls) || arm64e | ^ In file included from /home/jun/CLionProjects/Dobby/./source/dobby/common.h:12, from /home/jun/CLionProjects/Dobby/./source/core/assembler/assembler-x64.h:3, from /home/jun/CLionProjects/Dobby/source/core/assembler/assembler-x64.cc:4: /home/jun/CLionProjects/Dobby/./common/os_arch_features.h:9:41: error: missing binary operator before token "(" 9 | #if defined(arm64e) && __has_feature(ptrauth_calls) | ^ make[2]: [CMakeFiles/dobby.dir/build.make:104:CMakeFiles/dobby.dir/source/core/assembler/assembler-x64.cc.o] 错误 1 make[1]: [CMakeFiles/Makefile2:138:CMakeFiles/dobby.dir/all] 错误 2 make: *** [Makefile:91:all] 错误 2

fengyangxxx commented 2 months ago

解决了吗,我的错误跟你一样

2222ex commented 1 month ago

问了一下gpt,__has_feature 是Clang的东西