Which decompiler for radare2?

Hi. anyone can suggest a decompiler for r2… and how to install it! I tried to install r2ghidra-dec from r2pm and it fails. anyone have tried these plugin?

here’s the error:

-- Checking for one of the modules 'r_core'
CMake Error at /usr/share/cmake-3.13/Modules/FindPkgConfig.cmake:679 (message):
None of the required 'r_core' found
Call Stack (most recent call first):
cmake/FindRadare2.cmake:80 (pkg_search_module)
CMakeLists.txt:43 (find_package)

CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Radare2 (missing: Radare2_TARGET Radare2_LIBRARIES
Radare2_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindRadare2.cmake:97 (find_package_handle_standard_args)
CMakeLists.txt:43 (find_package)

– Configuring incomplete, errors occurred!

Can you show me your output of apt list --installed | grep radare2 command please? I am the maintainer of radare2 for Parrot. It could be my mistake somewhere

Here is my output and everything works fine for me

libradare2-3.8-dbgsym/rolling,now 3.8-parrot3 amd64 [installed]
libradare2-3.8/rolling,now 3.8-parrot3 amd64 [installed,automatic]
libradare2-common/rolling,rolling,now 3.8-parrot3 all [installed,automatic]
libradare2-dev/rolling,now 3.8-parrot3 amd64 [installed,automatic]
radare2-cutter-dbgsym/rolling,now 1.9.0-parrot0 amd64 [installed]
radare2-cutter/rolling,now 1.9.0-parrot0 amd64 [installed]
radare2-dbgsym/rolling,now 3.8-parrot3 amd64 [installed]
radare2/rolling,now 3.8-parrot3 amd64 [installed]

p/s: you can give ghidra decompiler a try
r2pm install r2ghidra-dec

this is my output of apt list --installed | grep radare2:

libradare2-3.8/rolling,now 3.8-parrot3 amd64 [installed,automatic]
libradare2-common/rolling,rolling,now 3.8-parrot3 all [installed,automatic]
libradare2-dev/rolling,now 3.8-parrot3 amd64 [installed,automatic]
radare2-cutter/rolling,now 1.9.0-parrot0 amd64 [installed,automatic]
radare2/rolling,now 3.8-parrot3 amd64 [installed,automatic]

but radare2 -v says:

    radare2 3.7.1 0 @ linux-x86-64 git.3.7.1
    commit: unknown build: 2019-10-10__14:43:32

it fails when I try to install r2ghidra-dec whit the error I posted above!

Can you please reinstall libradare2-dev and try again?

I remember it now. I typed 3.8 version for 3.6 and i decided to keep it be 3.8 and rolling it. But our build sever is having problem and it can’t be update from 3.8 release :frowning: (I am packing 4.0 version)

I uninstalled and then reinstalled libradare2-dev; run r2pm -i r2ghidra-dec and I had exactly the same error…

Okay i have to check the whole thing. Thanks for report. I am very sorry for this issue. That is my responsibility.

ah ok. do you think this is related to the r2ghidra-dec installation problem? if yes it’s ok I’ll wait for the 4.0 :slight_smile:

I don’t think the version is the problem. The problem is the lib is missing or something like that. Gimme some min and if you have free time please help me try to fix the bug (please add telegram @dmknght if you can)

Can you show me the output of ls -la /usr/include/libr please?>

#ls -la /usr/include/libr
total 564
drwxr-xr-x  6 root root  4096 Nov  1 15:59 .
drwxr-xr-x 78 root root  8192 Nov  1 15:59 ..
-rw-r--r--  1 root root   236 Aug 31 15:15 r2naked.h
-rw-r--r--  1 root root  2775 Aug 31 15:15 r_agraph.h
-rw-r--r--  1 root root 17109 Aug 31 15:15 r_anal_ex.h
-rw-r--r--  1 root root 73832 Aug 31 15:15 r_anal.h
-rw-r--r--  1 root root  9044 Aug 31 15:15 r_asm.h
-rw-r--r--  1 root root  1371 Aug 31 15:15 r_bind.h
-rw-r--r--  1 root root 20985 Aug 31 15:15 r_bin_dwarf.h
-rw-r--r--  1 root root 26646 Aug 31 15:15 r_bin.h
-rw-r--r--  1 root root   580 Aug 31 15:15 r_binheap.h
-rw-r--r--  1 root root  5010 Aug 31 15:15 r_bp.h
-rw-r--r--  1 root root  3509 Aug 31 15:15 r_cmd.h
-rw-r--r--  1 root root  3256 Aug 31 15:15 r_config.h
-rw-r--r--  1 root root 35241 Aug 31 15:15 r_cons.h
-rw-r--r--  1 root root 35366 Aug 31 15:15 r_core.h
drwxr-xr-x  2 root root    21 Nov  1 15:59 r_crypto
-rw-r--r--  1 root root  2912 Aug 31 15:15 r_crypto.h
-rw-r--r--  1 root root 19770 Aug 31 15:15 r_debug.h
-rw-r--r--  1 root root  2198 Aug 31 15:15 r_diff.h
-rw-r--r--  1 root root  6887 Aug 31 15:15 r_egg.h
-rw-r--r--  1 root root 12611 Aug 31 15:15 r_endian.h
-rw-r--r--  1 root root  6885 Aug 31 15:15 r_flag.h
-rw-r--r--  1 root root  1688 Aug 31 15:15 r_flist.h
-rw-r--r--  1 root root  5115 Aug 31 15:15 r_fs.h
-rw-r--r--  1 root root   506 Aug 31 15:15 r_getopt.h
-rw-r--r--  1 root root 15283 Aug 31 15:15 r_hash.h
-rw-r--r--  1 root root 10557 Aug 31 15:15 r_heap_glibc.h
-rw-r--r--  1 root root  1107 Aug 31 15:15 r_heap_jemalloc.h
-rw-r--r--  1 root root 18719 Aug 31 15:15 r_io.h
-rw-r--r--  1 root root  2175 Aug 31 15:15 r_lang.h
-rw-r--r--  1 root root  3361 Aug 31 15:15 r_lib.h
-rw-r--r--  1 root root  4853 Aug 31 15:15 r_list.h
-rw-r--r--  1 root root 10055 Aug 31 15:15 r_magic.h
-rw-r--r--  1 root root   975 Aug 31 15:15 r_main.h
-rw-r--r--  1 root root  4457 Aug 31 15:15 r_parse.h
-rw-r--r--  1 root root   726 Aug 31 15:15 r_pdb.h
-rw-r--r--  1 root root  5352 Aug 31 15:15 r_qrcode.h
-rw-r--r--  1 root root  2379 Aug 31 15:15 r_regex.h
-rw-r--r--  1 root root  6980 Aug 31 15:15 r_reg.h
-rw-r--r--  1 root root  4702 Aug 31 15:15 r_search.h
-rw-r--r--  1 root root  5216 Aug 31 15:15 r_sign.h
-rw-r--r--  1 root root  2097 Aug 31 15:15 r_skiplist.h
-rw-r--r--  1 root root  7731 Aug 31 15:15 r_socket.h
-rw-r--r--  1 root root  2327 Aug 31 15:15 r_syscall.h
-rw-r--r--  1 root root  2992 Aug 31 15:15 r_th.h
-rw-r--r--  1 root root  3719 Aug 31 15:15 r_types_base.h
-rw-r--r--  1 root root 16637 Aug 31 15:15 r_types.h
-rw-r--r--  1 root root  3991 Sep  1 11:50 r_userconf.h
drwxr-xr-x  2 root root  4096 Nov  1 15:59 r_util
-rw-r--r--  1 root root  2085 Aug 31 15:15 r_util.h
-rw-r--r--  1 root root  8619 Aug 31 15:15 r_vector.h
-rw-r--r--  1 root root   231 Sep  1 11:50 r_version.h
drwxr-xr-x  2 root root   220 Nov  1 15:59 sdb
-rw-r--r--  1 root root    21 Aug 31 15:15 sdb.h
drwxr-xr-x 10 root root   163 Nov  1 15:59 sflib

Please give me a sec. I am testing with other guy in the Parrot team.

sorry don’t have telegram… never use it :frowning: maybe irc??? or jabber?

sure!

I am having hexchat so any random irc channel is okay

i’m in freenode/#parrotsec or in a new channel #r2 irc.autistici.org @nouan

I can’t connect :frowning: ahhh

The bug was fixed yesterday by install libzip-dev. I added it in dependencies for radare2. Next update should be fine

2 Likes

not hurry but for the next update could you check the r2-docker script? it seems it doesn’t exist…
bash: r2-docker: command not found
thanks again! bye