rizinorg / cutter

Free and Open Source Reverse Engineering Platform powered by rizin
https://cutter.re
GNU General Public License v3.0
15.66k stars 1.14k forks source link

Cutter does not start: Option 'bitcode-mdindex-threshold' registered more than once #2430

Open enovella opened 3 years ago

enovella commented 3 years ago

Environment information

Describe the bug

[13:07 edu@xps arm64-v8a] >  ~/tools/Cutter
Setting PYTHONHOME = "/tmp/.mount_CutterQ99mhA/usr"  for AppImage.
PYTHONHOME = "/tmp/.mount_CutterQ99mhA/usr"
Setting r2 prefix = "/tmp/.mount_CutterQ99mhA/usr"  for AppImage.
Setting r2 plugins dir = "/tmp/.mount_CutterQ99mhA/usr/share/radare2/plugins"
Not loading library because it has already been loaded from somewhere else: '/home/edu/.local/share/radare2/plugins/core_ghidra.so'
: for the -W option: cl::alias must have argument name specified!
: CommandLine Error: Option 'bitcode-mdindex-threshold' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
QMutex: destroying locked mutex

Fix

Some issues with r2ghidra--dec:

~/tools/Cutter --no-plugins
re-fox commented 3 years ago

I've also had this issue when r2-retdec is installed. I either had to load cutter with no plugins or remove the plugin to get cutter working again.

enovella commented 3 years ago

I was able to make it to work by reinstalling r2ghidra-dec and rebooting my laptop.

re-fox commented 3 years ago

I ran through the steps of installing https://github.com/avast/retdec-r2plugin and building the cutter plugin. After building the plugin and running make install Cutter will no longer start up and the following error is logged:

Setting PYTHONHOME = "/tmp/.mount_CutterWmruTW/usr"  for AppImage.
PYTHONHOME = "/tmp/.mount_CutterWmruTW/usr"
Setting r2 prefix = "/tmp/.mount_CutterWmruTW/usr"  for AppImage.
Setting r2 plugins dir = "/tmp/.mount_CutterWmruTW/usr/share/radare2/plugins"
: for the -W option: cl::alias must have argument name specified!
: CommandLine Error: Option 'bitcode-mdindex-threshold' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
QMutex: destroying locked mutex

So this issue may be more generically tied to the plugin system?

karliss commented 3 years ago

That is problem of conflict between retdec and most Linux graphic drivers as both of them use LLVM. That's a retdec problem not Cutter.

I guess that @enovella during reinstalling of r2ghidra-dec might haved wiped the retdec plugin.

Note you shouldn't manually install r2ghidra-dec when using Cutter Appimage as the Appimage already includes r2ghidra. And having second r2ghidra especially compiled against different r2 build is likely to cause conflicts.

re-fox commented 3 years ago

Thank you for the information @karliss

I can open an issue (if one isn't already open) on the https://github.com/avast/retdec-r2plugin for tracking.