Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cutter plugin fails to build on macOS #336

Open
chayleaf opened this issue Nov 29, 2023 · 0 comments
Open

Cutter plugin fails to build on macOS #336

chayleaf opened this issue Nov 29, 2023 · 0 comments
Milestone

Comments

@chayleaf
Copy link
Contributor

chayleaf commented Nov 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants