radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.62k stars 3k forks source link

Error install radare for Ubuntu 16.04LT #13087

Closed sdroider closed 5 years ago

sdroider commented 5 years ago

Trying to install the radare using the command sys/install.sh

Terminal:

Building on Linux : computing number of allowed parallel jobs.
Maximum allowed RAM memory per job is 150000 kB.
Number of CPUs is 2 and current free RAM allows us to run 47 jobs in parallel.
So, the build will run on 2 job(s).

export USE_R2_CAPSTONE=

/home/osboxes/Android/radare2-3.2.1
configure-plugins: Loading ./plugins.cfg ..
configure-plugins: Generating libr/config.h ..
configure-plugins: Generating libr/config.mk ..
SHARED: io.shm
STATIC: anal.6502 anal.6502_cs anal.8051 anal.arc anal.arm_cs anal.arm_gnu anal.avr anal.bf anal.chip8 anal.cr16 anal.cris anal.dalvik anal.ebc anal.gb anal.h8300 anal.hexagon anal.i4004 anal.i8080 anal.java anal.m680x_cs anal.m68k_cs anal.malbolge anal.mcore anal.mips_cs anal.mips_gnu anal.msp430 anal.nios2 anal.null anal.pic anal.ppc_cs anal.ppc_gnu anal.riscv anal.rsp anal.sh anal.snes anal.sparc_cs anal.sparc_gnu anal.sysz anal.tms320 anal.v810 anal.v850 anal.vax anal.wasm anal.ws anal.x86_cs anal.xap anal.xcore_cs anal.xtensa anal.z80 asm.6502 asm.6502_cs asm.8051 asm.arc asm.arm_as asm.arm_cs asm.arm_gnu asm.arm_winedbg asm.avr asm.bf asm.chip8 asm.cr16 asm.cris_gnu asm.dalvik asm.dcpu16 asm.ebc asm.gb asm.h8300 asm.hexagon asm.hppa_gnu asm.i4004 asm.i8080 asm.java asm.lanai_gnu asm.lh5801 asm.lm32 asm.m680x_cs asm.m68k_cs asm.malbolge asm.mcore asm.mcs96 asm.mips_cs asm.mips_gnu asm.msp430 asm.nios2 asm.pic asm.ppc_cs asm.ppc_gnu asm.propeller asm.riscv asm.rsp asm.sh asm.snes asm.sparc_cs asm.sparc_gnu asm.spc700 asm.sysz asm.tms320 asm.tricore asm.v810 asm.v850 asm.vax asm.wasm asm.ws asm.x86_as asm.x86_cs asm.x86_nasm asm.x86_nz asm.xap asm.xcore_cs asm.xtensa asm.z80 bin.any bin.art bin.avr bin.bf bin.bflt bin.bios bin.bootimg bin.cgc bin.coff bin.dex bin.dol bin.dyldcache bin.elf bin.elf64 bin.fs bin.java bin.mach0 bin.mach064 bin.mbn bin.mdmp bin.menuet bin.mz bin.nes bin.nin3ds bin.ninds bin.ningb bin.ningba bin.nro bin.nso bin.omf bin.p9 bin.pe bin.pe64 bin.pebble bin.psxexe bin.sfc bin.smd bin.sms bin.spc700 bin.symbols bin.te bin.vsf bin.wasm bin.xbe bin.z64 bin.zimg bin_ldr.ldr_linux bin_xtr.xtr_dyldcache bin_xtr.xtr_fatmach0 bin_xtr.xtr_pemixed bp.arm bp.bf bp.mips bp.ppc bp.x86 core.a2f core.java crypto.aes crypto.aes_cbc crypto.base64 crypto.base91 crypto.blowfish crypto.cps2 crypto.des crypto.punycode crypto.rc2 crypto.rc4 crypto.rc6 crypto.rol crypto.ror crypto.rot crypto.serpent crypto.xor debug.bf debug.bochs debug.esil debug.gdb debug.io debug.native debug.null debug.qnx debug.rap debug.windbg egg.exec egg.xor fs.ext2 fs.fat fs.fb fs.hfs fs.hfsplus fs.io fs.iso9660 fs.jfs fs.minix fs.ntfs fs.posix fs.r2 fs.reiserfs fs.sfs fs.tar fs.udf fs.ufs fs.xfs io.ar io.bfdbg io.bochs io.debug io.default io.gdb io.gprobe io.gzip io.http io.ihex io.mach io.malloc io.mmap io.null io.procpid io.ptrace io.qnx io.r2k io.r2pipe io.r2web io.rap io.rbuf io.self io.shm io.sparse io.tcp io.w32 io.w32dbg io.windbg io.winedbg io.zip lang.vala parse.6502_pseudo parse.arm_pseudo parse.att2intel parse.avr_pseudo parse.dalvik_pseudo parse.m68k_pseudo parse.mips_pseudo parse.mreplace parse.ppc_pseudo parse.sh_pseudo parse.x86_pseudo parse.z80_pseudo
cp: './plugins.cfg' and 'plugins.cfg' are the same file
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... gcc
checking for dynamic library... required
checking for patch... /usr/bin/patch
checking for git... no
checking for libmagic ... no
checking for libz ... no
checking for libzip ... no
checking for libxxhash ... no
checking declaration of ADDR_NO_RANDOMIZE in sys/personality.h... yes
checking function arc4random_uniform() in c... no
checking function explicit_bzero() in c... no
checking function explicit_memset() in c... no
checking function clock_nanosleep() in c... yes
checking for libssl ... no
checking pkg-config flags for openssl... no
checking for liblibuv ... no
checking pkg-config flags for libuv... no
creating ./config-user.mk
creating libr/include/r_userconf.h
creating pkgcfg/r_io.pc
creating pkgcfg/r_magic.pc
creating pkgcfg/r_asm.pc
creating pkgcfg/r_bin.pc
creating pkgcfg/r_anal.pc
creating pkgcfg/r_hash.pc
creating pkgcfg/r_cons.pc
creating pkgcfg/r_core.pc
creating pkgcfg/r_lang.pc
creating pkgcfg/r_socket.pc
creating pkgcfg/r_debug.pc
creating pkgcfg/r_reg.pc
creating pkgcfg/r_config.pc
creating pkgcfg/r_flag.pc
creating pkgcfg/r_syscall.pc
creating pkgcfg/r_util.pc
creating pkgcfg/r_search.pc
creating pkgcfg/r_bp.pc
creating pkgcfg/r_parse.pc
creating pkgcfg/r_fs.pc
creating pkgcfg/r_egg.pc
creating pkgcfg/r_crypto.pc
cleaning temporally files... done

Final report:
 - R_CHECKS_LEVEL = 2
 - PREFIX = /usr
 - HAVE_LIB_GMP = 0
 - HAVE_OPENSSL = 0
 - HAVE_LIBUV = 0
 - USE_CAPSTONE = 0
 - HAVE_PTRACE = 1
 - USE_PTRACE_WRAP = 1
 - HAVE_FORK = 1
 - VERSION = 3.2.1
 - USE_LIB_ZIP = 0
 - USE_LIB_MAGIC = 0
 - USE_LIB_XXHASH = 0
 - DEBUGGER = 1
 - CC = gcc
 - USERCC = gcc
 - HAVE_ARC4RANDOM_UNIFORM = 0
 - HAVE_EXPLICIT_BZERO = 0
 - HAVE_EXPLICIT_MEMSET = 0
 - USEROSTYPE = gnulinux
 - LIBVERSION = 3.2.1
 - BUILD = x86_64-unknown-linux-gnu
 - HOST = x86_64-unknown-linux-gnu
 - TARGET = x86_64-unknown-linux-gnu
Generating r_version.h file
CC adler32.c
CC crc32.c
CC deflate.c
CC infback.c
CC inffast.c
CC inflate.c
CC inftrees.c
CC trees.c
CC zutil.c
CC compress.c
CC uncompr.c
CC gzclose.c
CC gzlib.c
CC gzread.c
CC gzwrite.c
ar: creating libr_z.a
CC zip_add.c
CC zip_add_dir.c
CC zip_add_entry.c
CC zip_close.c
CC zip_delete.c
CC zip_dir_add.c
CC zip_dirent.c
CC zip_discard.c
CC zip_entry.c
CC zip_err_str.c
CC zip_error.c
CC zip_error_get.c
CC zip_error_get_sys_type.c
CC zip_error_strerror.c
CC zip_error_to_str.c
CC zip_extra_field.c
CC zip_extra_field_api.c
CC zip_fclose.c
CC zip_file_add.c
CC zip_fdopen.c
CC zip_file_error_get.c
CC zip_file_get_comment.c
CC zip_file_get_offset.c
CC zip_file_rename.c
CC zip_file_replace.c
CC zip_file_set_comment.c
CC zip_file_strerror.c
CC zip_filerange_crc.c
CC zip_fopen.c
CC zip_fopen_encrypted.c
CC zip_fopen_index.c
CC zip_fopen_index_encrypted.c
CC zip_fread.c
CC zip_get_archive_comment.c
CC zip_get_archive_flag.c
CC zip_get_compression_implementation.c
CC zip_get_encryption_implementation.c
CC zip_get_file_comment.c
CC zip_get_num_entries.c
CC zip_get_num_files.c
CC zip_get_name.c
CC zip_name_locate.c
CC zip_new.c
CC zip_open.c
CC zip_rename.c
CC zip_replace.c
CC zip_set_archive_comment.c
CC zip_set_archive_flag.c
CC zip_set_default_password.c
CC zip_set_file_comment.c
CC zip_set_file_compression.c
CC zip_set_name.c
CC zip_source_buffer.c
CC zip_source_close.c
CC zip_source_crc.c
CC zip_source_deflate.c
CC zip_source_error.c
CC zip_source_file.c
CC zip_source_filep.c
CC zip_source_free.c
CC zip_source_function.c
CC zip_source_layered.c
CC zip_source_open.c
CC zip_source_pkware.c
CC zip_source_pop.c
CC zip_source_read.c
CC zip_source_stat.c
CC zip_source_window.c
CC zip_source_zip.c
CC zip_source_zip_new.c
CC zip_stat.c
CC zip_stat_index.c
CC zip_stat_init.c
CC zip_strerror.c
CC zip_string.c
CC zip_unchange.c
CC zip_unchange_all.c
CC zip_unchange_archive.c
CC zip_unchange_data.c
CC zip_utf-8.c
ar: creating libr_zip.a
ar: creating librz.a
CC spp.c
CC cdb.c
CC buffer.c
CC cdb_make.c
CC ls.c
CC sdbht.c
CC ht_uu.c
CC sdb.c
CC num.c
CC base64.c
CC match.c
CC json.c
CC ns.c
CC lock.c
CC util.c
CC disk.c
CC query.c
CC array.c
CC fmt.c
CC journal.c
CC dict.c
CC ht_pp.c
CC ht_up.c
CC main.c
AR libsdb.a
ar: creating libsdb.a
BIN sdb
CC PIC cdb.c
CC PIC buffer.c
CC PIC cdb_make.c
CC PIC ls.c
CC PIC sdbht.c
CC PIC ht_uu.c
CC PIC sdb.c
CC PIC num.c
CC PIC base64.c
CC PIC match.c
CC PIC json.c
CC PIC ns.c
CC PIC lock.c
CC PIC util.c
CC PIC disk.c
CC PIC query.c
CC PIC array.c
CC PIC fmt.c
CC PIC journal.c
CC PIC dict.c
CC PIC ht_pp.c
CC PIC ht_up.c
LIB libsdb.so.1.3.0
CC binheap.c
CC mem.c
CC unum.c
CC str.c
CC hex.c
CC file.c
str.c: In function ‘r_str_utf16_to_utf8’:
str.c:2399:13: warning: variable ‘processed’ set but not used [-Wunused-but-set-variable]
  const ut8 *processed = src;
             ^
CC range.c
CC tinyrange.c
CC prof.c
CC cache.c
CC sys.c
CC buf.c
CC w32-sys.c
CC ubase64.c
CC base85.c
CC base91.c
CC list.c
CC flist.c
CC chmod.c
CC graph.c
CC event.c
CC regcomp.c
CC regerror.c
CC regexec.c
CC uleb128.c
CC sandbox.c
CC calc.c
CC thread.c
CC thread_sem.c
CC thread_lock.c
CC thread_cond.c
CC strpool.c
CC bitmap.c
CC date.c
CC format.c
CC pie.c
CC print.c
CC ctype.c
CC seven.c
CC randomart.c
CC zip.c
CC debruijn.c
CC log.c
CC utf8.c
CC utf16.c
CC utf32.c
CC strbuf.c
CC lib.c
CC name.c
CC spaces.c
CC signal.c
CC syscmd.c
CC diff.c
CC bdiff.c
CC stack.c
CC queue.c
CC tree.c
CC idpool.c
CC assert.c
CC punycode.c
CC pkcs7.c
CC x509.c
CC asn1.c
CC astr.c
CC json_indent.c
CC skiplist.c
CC pj.c
CC r_json.c
CC rbtree.c
CC qrcode.c
CC vector.c
CC str_trim.c
CC ascii_table.c
LD libr_util.so
CC socket.c
CC proc.c
CC http.c
CC http_server.c
CC rap_server.c
CC run.c
CC r2pipe.c
CC serial.c
LD libr_socket.so

BUILD SUMARY
============
COMPILER gcc
CC gcc
HOST_CC gcc
HOST_OS linux
BUILD_OS linux
============

>>>>>>>>>>>>>>>>
NATIVE BUILD SDB
>>>>>>>>>>>>>>>>

CC cdb.c
CC buffer.c
CC cdb_make.c
CC ls.c
CC sdbht.c
ar: creating libr_windbg.a
CC ht_uu.c
capstone.sh: 30: capstone.sh: git: not found
[capstone] Cannot clone capstone from git
Makefile:268: recipe for target 'capstone-sync' failed
make[1]: *** [capstone-sync] Error 1
make[1]: *** Waiting for unfinished jobs....
CC sdb.c
CC num.c
CC base64.c
CC match.c
CC json.c
CC ns.c
CC lock.c
CC util.c
CC disk.c
CC query.c
CC array.c
CC fmt.c
CC journal.c
CC dict.c
CC ht_pp.c
CC ht_up.c
CC main.c
AR libsdb.a
ar: creating libsdb.a
BIN sdb

>>>>>>>>>>>>>>>>
TARGET BUILD SDB
>>>>>>>>>>>>>>>>

CC cdb.c
CC buffer.c
CC cdb_make.c
CC ls.c
CC sdbht.c
CC ht_uu.c
CC sdb.c
CC num.c
CC base64.c
CC match.c
CC json.c
CC ns.c
CC lock.c
CC util.c
CC disk.c
CC query.c
CC array.c
CC fmt.c
CC journal.c
CC dict.c
CC ht_pp.c
CC ht_up.c
AR libsdb.a
ar: creating libsdb.a
Makefile:57: recipe for target 'all' failed
make: *** [all] Error 2

What kind of error?

Capstone:

$ pip list | grep capstone
capstone                      4.0.1  
radare commented 5 years ago

This is the error

On 13 Feb 2019, at 20:50, SergeyAppDroid notifications@github.com wrote:

capstone.sh: 30: capstone.sh: git: not found [capstone] Cannot clone capstone from git Makefile:268: recipe for target 'capstone-sync' failed make[1]: [capstone-sync] Error 1 make[1]: Waiting for unfini

radare commented 5 years ago

is this the tarball from github or mikelloc?

radare commented 5 years ago

Having the python bindings of capstone doesnt helps r2 at all, r2 requires libcapstone system wide or having git installed to download the last development version (always recommended). But it should switch to use wget/curl in case no git is there, the tarball in mikelloc should work, but i didnt tested it. can you confirm?

sdroider commented 5 years ago

@radare Sorry friend. I am new to Linux, so I don’t know how to respond to this. I did not install git on the system. I downloaded the release version for the radare, unpacked the archive and just executed the command sys/install.sh

radare commented 5 years ago

Downloaded the tarball from where? Mikelloc or github?

On 14 Feb 2019, at 17:18, SergeyAppDroid notifications@github.com wrote:

Sorry friend. I am new to Linux, so I don’t know how to respond to this. I did not install git on the system. I downloaded the release version for the radare, unpacked the archive and just executed the command sys/install.sh

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

sdroider commented 5 years ago

@radare I downloaded from here

Downloaded the tarball from where? Mikelloc or github? On 14 Feb 2019, at 17:18, SergeyAppDroid @.***> wrote: Sorry friend. I am new to Linux, so I don’t know how to respond to this. I did not install git on the system. I downloaded the release version for the radare, unpacked the archive and just executed the command sys/install.sh — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

radare commented 5 years ago

Ok thats the tarball from github which is a copy of the git contents. That one doesnt uses the capstone from tarball. I will look to find a way to make this happen on gh tarballs too

Thanks for reporting

Meanwhile we recommend you install git and r2 from git. 3.3 will be released on monday so 3.2.1 is actually old

On 14 Feb 2019, at 19:03, SergeyAppDroid notifications@github.com wrote:

@radare I downloaded from here

Downloaded the tarball from where? Mikelloc or github? … On 14 Feb 2019, at 17:18, SergeyAppDroid @.***> wrote: Sorry friend. I am new to Linux, so I don’t know how to respond to this. I did not install git on the system. I downloaded the release version for the radare, unpacked the archive and just executed the command sys/install.sh — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Mic92 commented 5 years ago

This breaks offline installation because curl tries to download the tarball also it is already present.

radare commented 5 years ago

reopning for proper fix, do you want to try to send a PR for this?

On 19 Feb 2019, at 15:51, Jörg Thalheim notifications@github.com wrote:

This breaks offline installation because curl tries to download the tarball also it is already present.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/radare/radare2/issues/13087#issuecomment-465159716, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lvAtoEzafOs3IbDeidamkR4uEdQjks5vPA9ygaJpZM4a6JYO.

Mic92 commented 5 years ago

opened for further discussions: https://github.com/radare/radare2/pull/13158

radare commented 5 years ago

cc @XVilka can u tweak your archive download PR to fix this issue? when git is not available?

radare commented 5 years ago

Should be fixed in https://github.com/radare/radare2/pull/14043

radare commented 5 years ago

i did that in my PR https://github.com/radare/radare2/pull/14043

so i assume we can close it because ill merge in few mins when travis agrees