Cutter plugin fails to build on macOS
chayleaf opened this issue · comments
chayleaf commented
When building the Cutter plugin for Darwin on either x86_64 or arm64 (using Nix in this case), the following linking error appears:
Undefined symbols for architecture arm64:
"CutterCore::registerDecompiler(Decompiler*)", referenced from:
RzGhidraPlugin::registerDecompilers() in RzGhidraPlugin.cpp.o
non-virtual thunk to RzGhidraPlugin::registerDecompilers() in RzGhidraPlugin.cpp.o
"CutterCore::instance()", referenced from:
RzGhidraPlugin::registerDecompilers() in RzGhidraPlugin.cpp.o
non-virtual thunk to RzGhidraPlugin::registerDecompilers() in RzGhidraPlugin.cpp.o
"Decompiler::qt_metacall(QMetaObject::Call, int, void**)", referenced from:
vtable for RzGhidraDecompiler in RzGhidraDecompiler.cpp.o
"Decompiler::qt_metacast(char const*)", referenced from:
vtable for RzGhidraDecompiler in RzGhidraDecompiler.cpp.o
"Decompiler::finished(rz_annotated_code_t*)", referenced from:
QtPrivate::QCallableObject<RzGhidraDecompiler::decompileAt(unsigned long long)::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) in RzGhidraDecompiler.cpp.o
"Decompiler::Decompiler(QString const&, QString const&, QObject*)", referenced from:
RzGhidraDecompiler::RzGhidraDecompiler(QObject*) in RzGhidraDecompiler.cpp.o
"RizinFunctionTask::RizinFunctionTask(std::__1::function<void* (rz_core_t*)>, bool)", referenced from:
RzGhidraDecompiler::decompileAt(unsigned long long) in RzGhidraDecompiler.cpp.o
"RizinTask::staticMetaObject", referenced from:
RzGhidraDecompiler::decompileAt(unsigned long long) in RzGhidraDecompiler.cpp.o
"RizinTask::finished()", referenced from:
RzGhidraDecompiler::decompileAt(unsigned long long) in RzGhidraDecompiler.cpp.o
"RizinTask::startTask()", referenced from:
RzGhidraDecompiler::decompileAt(unsigned long long) in RzGhidraDecompiler.cpp.o
"Decompiler::metaObject() const", referenced from:
vtable for RzGhidraDecompiler in RzGhidraDecompiler.cpp.o
"typeinfo for Decompiler", referenced from:
typeinfo for RzGhidraDecompiler in RzGhidraDecompiler.cpp.o
"vtable for Decompiler", referenced from:
RzGhidraDecompiler::~RzGhidraDecompiler() in RzGhidraDecompiler.cpp.o
RzGhidraDecompiler::~RzGhidraDecompiler() in RzGhidraDecompiler.cpp.o
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture arm64
It seems like 670ac7c being reverted in #283 could be the root cause of the issue. However, I don't have physical access to a macOS machine, so while it would likely build with this hack reintroduced, I have no idea whether it would actually work.
CC: @lilyinstarlight