jmpews / Dobby

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

ld: symbol(s) not found for architecture arm64 #218

Closed trueToastedCode closed 1 year ago

trueToastedCode commented 1 year ago
[ 90%] Building CXX object deps/Dobby/CMakeFiles/dobby.dir/source/InterceptRouting/RoutingPlugin/NearBranchTrampoline/NearBranchTrampoline.cc.o
[ 93%] Building CXX object deps/Dobby/CMakeFiles/dobby.dir/source/MemoryAllocator/NearMemoryAllocator.cc.o
[ 93%] Building CXX object deps/Dobby/CMakeFiles/dobby.dir/external/logging/logging.cc.o
[ 96%] Linking CXX shared library libdobby.dylib
Undefined symbols for architecture arm64:
  "_DobbySymbolResolver", referenced from:
      _DobbyCodePatch in code-patch-tool-darwin.cc.o
ld: symbol(s) not found for architecture arm64
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [deps/Dobby/libdobby.dylib] Error 1
make[2]: *** [deps/Dobby/CMakeFiles/dobby.dir/all] Error 2
make[1]: *** [CMakeFiles/Configurer64.dir/rule] Error 2
make: *** [Configurer64] Error 2
trueToastedCode commented 1 year ago

Needed to use the provided cMake build options

option(DOBBY_GENERATE_SHARED "Build shared library" ON)

option(DOBBY_DEBUG "Enable debug logging" OFF)

option(NearBranch "Enable near branch trampoline" ON)

option(FullFloatingPointRegisterPack "Save and pack all floating-point registers" OFF)

option(Plugin.SymbolResolver "Enable symbol resolver" ON)

option(Plugin.ImportTableReplace "Enable import table replace " OFF)

option(Plugin.Android.BionicLinkerUtil "Enable android bionic linker util" OFF)

option(BUILD_EXAMPLE "Build example" OFF)

option(BUILD_TEST "Build test" OFF)