Configure error when trying to install r2ghidra
rednhot opened this issue · comments
Here's the output:
$ r2pm -ci r2ghidra
Cleaning r2ghidra...
DEPENDS: r2ghidra-sleigh
Sat Jul 9 11:18:22 PM +03 2022
clean Done For r2ghidra
/home/mathway/.local/share/radare2/r2pm/db/r2ghidra TGZ=
Cleaning up /home/mathway/.local/share/radare2/r2pm/git/r2ghidra...
HEAD is now at 086ec3e Add r2premium package to r2pm (#141)
Updating 086ec3e..2c70f2c
Fast-forward
db/r2ghidra-sleigh | 2 +-
db/v | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
create mode 100644 db/v
[r2pm] Updating package database /home/mathway/.local/share/radare2/r2pm/db ...
Already up to date.
error: pathspec 'r2-5.5.0' did not match any file(s) known to git
Already up to date.
DEPENDS: r2ghidra-sleigh
Sat Jul 9 11:18:22 PM +03 2022
Install Done For r2ghidra
git clone https://github.com/radareorg/ghidra-native
Cloning into 'ghidra-native'...
cd ghidra-native && git checkout 0.2.0
Note: switching to '0.2.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 2444a81 Update version number
gmake -C ghidra-native patch
gmake[1]: Entering directory '/home/mathway/.local/share/radare2/r2pm/git/r2ghidra/ghidra-native'
for a in patches/0001-space-after-comma.patch patches/0002-make-sleigharch-public.patch patches/0004-public-fields.patch patches/00067-readonly-warning.patch patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch patches/0022-Show-noreturn-information-in-function-signature-2.patch patches/0023-Undef-LoadImage-for-windows.patch patches/0024-ignore-symbol-beyond-space.patch patches/0044-bad-unicode-codepoint.patch patches/0055-datatype-clone.patch patches/0056-nullderef-workaround.patch patches/0090-nocasts-warnings.patch ; do echo "patch -p1 < $a" ; patch -p1 < $a ; done
patch -p1 < patches/0001-space-after-comma.patch
patching file src/decompiler/printc.cc
Hunk #2 succeeded at 1907 (offset 46 lines).
Hunk #3 succeeded at 2006 (offset 46 lines).
Hunk #4 succeeded at 2025 (offset 46 lines).
Hunk #5 succeeded at 2478 (offset 46 lines).
patch -p1 < patches/0002-make-sleigharch-public.patch
patching file src/decompiler/sleigh_arch.hh
patch -p1 < patches/0004-public-fields.patch
patching file src/decompiler/context.hh
patching file src/decompiler/sleigh.hh
Hunk #1 succeeded at 167 (offset 1 line).
patch -p1 < patches/00067-readonly-warning.patch
patching file src/decompiler/funcdata_varnode.cc
patch -p1 < patches/0020-Fix-double-free-crash-when-deinitializing-multiple-X.patch
patching file src/decompiler/xml.cc
patching file src/decompiler/xml.hh
patch -p1 < patches/0022-Show-noreturn-information-in-function-signature-2.patch
patching file src/decompiler/prettyprint.cc
patching file src/decompiler/prettyprint.hh
patching file src/decompiler/printc.cc
Hunk #1 succeeded at 2358 (offset 46 lines).
patch -p1 < patches/0023-Undef-LoadImage-for-windows.patch
patching file src/decompiler/loadimage.hh
patch -p1 < patches/0024-ignore-symbol-beyond-space.patch
patching file src/decompiler/database.cc
patch -p1 < patches/0044-bad-unicode-codepoint.patch
patching file src/decompiler/stringmanage.cc
patch -p1 < patches/0055-datatype-clone.patch
patching file src/decompiler/type.hh
patch -p1 < patches/0056-nullderef-workaround.patch
patching file src/decompiler/merge.hh
patch -p1 < patches/0090-nocasts-warnings.patch
patching file src/decompiler/printc.cc
Hunk #1 succeeded at 3097 (offset 2 lines).
Hunk #2 succeeded at 3106 (offset 2 lines).
touch patch.done
gmake[1]: Leaving directory '/home/mathway/.local/share/radare2/r2pm/git/r2ghidra/ghidra-native'
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for working directories... current
using prefix '/usr'
checking for c++ compiler... c++
checking for cpp... cpp
checking for git... /usr/bin/git
checking for pkg-config... /usr/bin/pkg-config
Using PKGCONFIG: /usr/bin/pkg-config
checking pkg-config flags for r_core... no
This package is required
ERROR: configure
I am using up-to-date Kali linux distro.
You need to install radare2
I have it installed.
$ r2 -V
5.5.0 r2
5.5.0 r_anal
5.5.0 r_lib
5.5.0 r_egg
5.5.0 r_asm
5.5.0 r_bin
5.5.0 r_cons
5.5.0 r_flag
5.5.0 r_core
5.5.0 r_crypto
5.5.0 r_bp
5.5.0 r_debug
5.5.0 r_main
5.5.0 r_hash
5.5.0 r_fs
5.5.0 r_io
5.5.0 r_parse
5.5.0 r_reg
5.5.0 r_sign
5.5.0 r_search
5.5.0 r_syscall
5.5.0 r_util
Okay, I will try to build from source, but i like to have a single point of install & update - packet manager.
Do you have the -dev package and pkg-config installed?
Do you have the -dev package and pkg-config installed?
I think yes
$ dpkg -l | grep 'libradare\|pkg-config'
ii libradare2-5.0.0:amd64 5.5.0+dfsg-1 amd64 libraries from the radare2 suite
ii libradare2-common 5.5.0+dfsg-1 all arch independent files from the radare2 suite
ii libradare2-dev 5.5.0+dfsg-1 amd64 devel files from the radare2
suite
ii pkg-config 0.29.2-1 amd64 manage compile and link flags for libraries
R2-5.0 is very old.
if you run pkg-config --libs r_core
you should see some output, otherwise r2g configure cant find r2. I would suggest you to update r2 to the latest release at least or use git. distros dont use to package things properly many times. r2 from git is not 5.5, so you probably have still the old packages from the distro around