radareorg / radare2

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

Error compilation on Arch Linux #2424

Closed danghvu closed 9 years ago

danghvu commented 9 years ago

I clone it from master.

$ gcc --version
gcc (GCC) 4.9.2 20150204 (prerelease)
$ uname -a 
[snip] 3.18.2-2-ARCH #1 SMP PREEMPT Fri Jan 9 07:37:51 CET 2015 x86_64 GNU/Linux
$ ./sys/install.sh
WARNING: Updating from remote repository
Already up-to-date.
configure-plugins: Loading ./plugins.def.cfg ..
configure-plugins: Generating libr/config.h ..
configure-plugins: Generating libr/config.mk ..
SHARED: asm.6502 asm.snes io.shm
STATIC: anal.8051 anal.arc anal.arm_cs anal.arm_gnu anal.avr anal.bf anal.cr16 anal.cris anal.csr anal.dalvik anal.ebc anal.gb anal.h8300 anal.i8080 anal.java anal.m68k anal.malbolge anal.mips_cs anal.mips_gnu anal.msp430 anal.nios2 anal.null anal.ppc_cs anal.ppc_gnu anal.sh anal.sparc_cs anal.sparc_gnu anal.sysz anal.tms320 anal.v850 anal.ws anal.x86_cs anal.x86_udis anal.xcore_cs anal.z80 asm.8051 asm.arc asm.arm_cs asm.arm_gnu asm.arm_winedbg asm.avr asm.bf asm.cr16 asm.cris_gnu asm.csr asm.dalvik asm.dcpu16 asm.ebc asm.gb asm.h8300 asm.i4004 asm.i8080 asm.java asm.lh5801 asm.m68k asm.malbolge asm.mips_cs asm.mips_gnu asm.msil asm.msp430 asm.nios2 asm.ppc_cs asm.ppc_gnu asm.rar asm.sh asm.sparc_cs asm.sparc_gnu asm.spc700 asm.sysz asm.tms320 asm.v850 asm.ws asm.x86_cs asm.x86_nz asm.x86_olly asm.x86_tab asm.x86_udis asm.xcore_cs asm.z80 asm.z80_cr bin.any bin.bf bin.bios bin.coff bin.dex bin.elf bin.elf64 bin.fs bin.java bin.mach0 bin.mach064 bin.mz bin.ninds bin.ningb bin.ningba bin.p9 bin.pe bin.pe64 bin.pebble bin.rar bin.te bin.xbe bin.zimg bin_xtr.dyldcache bin_xtr.fatmach0 bp.arm bp.bf bp.mips bp.ppc bp.x86 core.anal core.java crypto.aes debug.bf debug.esil debug.gdb debug.native debug.rap debug.wind egg.exec egg.xor fs.cpio fs.ext2 fs.fat fs.fb fs.hfs fs.hfsplus fs.iso9660 fs.jfs fs.minix fs.ntfs fs.posix fs.reiserfs fs.sfs fs.tar fs.udf fs.ufs fs.xfs io.bfdbg io.debug io.default io.gdb io.gzip io.http io.ihex io.mach io.malloc io.mmap io.procpid io.ptrace io.rap
...[snip]...
 Final report:
 - PREFIX = /usr
 - HAVE_LIB_GMP = 0
 - HAVE_OPENSSL = 0
 - USE_CAPSTONE = 1
 - HAVE_FORK = 1
 - VERSION = 0.9.9-git
 - USE_LIB_ZIP = 0
 - USE_LIB_MAGIC = 0
 - DEBUGGER = 1
 - CC = gcc
 - USERCC = gcc
 - USEROSTYPE = gnulinux
 - LIL_ENDIAN = 1
 - LIBVERSION = 0.9.9-git
... [snip]...
CC bp_mips.c
LD libr_db.so
CC utf8.c
LD libr_diff.so
CC bp_ppc.c
CC fsmagic.c
../../shlr/sdb/src//util.o: In function `sdb_itoa':
util.c:(.text+0xfd): multiple definition of `sdb_itoa'
../../shlr/sdb/src//sdbn.o:sdbn.c:(.text+0x74): first defined here
../../shlr/sdb/src//util.o: In function `sdb_atoi':
util.c:(.text+0x27f): multiple definition of `sdb_atoi'
../../shlr/sdb/src//sdbn.o:sdbn.c:(.text+0x130): first defined here
../../shlr/sdb/src//util.o: In function `sdb_alen':
util.c:(.text+0x45a): multiple definition of `sdb_alen'
../../shlr/sdb/src//sdba.o:sdba.c:(.text+0xda5): first defined here
../../shlr/sdb/src//util.o: In function `sdb_anext':
util.c:(.text+0x56e): multiple definition of `sdb_anext'
../../shlr/sdb/src//sdba.o:sdba.c:(.text+0x69): first defined here
collect2: error: ld returned 1 exit status
../rules.mk:59: recipe for target 'libr_db.so' failed
make[4]: *** [libr_db.so] Error 1
Makefile:34: recipe for target 'pre' failed
make[3]: *** [pre] Error 2
Makefile:62: recipe for target 'db' failed
make[2]: *** [db] Error 2
make[2]: *** Waiting for unfinished jobs....
CC funcs.c
CC bp_x86.c
CC line.c
LD libr_search.so
CC hud.c
CC is_tar.c
CC magic.c
CC print.c
CC rgb.c
CC softmagic.c
CC pal.c
CC editor.c
CC 2048.c
CC input.c
LD libr_bp.so
CC canvas.c
CC canvas_line.c
LD libr_magic.so
LD libr_cons.so
Makefile:27: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:28: recipe for target 'all' failed
make: *** [all] Error 2
radare commented 9 years ago

Is this a clean checkout? Can you git clean -xdf to confirm?

On 22 Apr 2015, at 23:51, Hoang-Vu Dang notifications@github.com wrote:

I clone it from master.

$ gcc --version gcc (GCC) 4.9.2 20150204 (prerelease) $ ./sys/install.sh WARNING: Updating from remote repository Already up-to-date. configure-plugins: Loading ./plugins.def.cfg .. configure-plugins: Generating libr/config.h .. configure-plugins: Generating libr/config.mk .. SHARED: asm.6502 asm.snes io.shm STATIC: anal.8051 anal.arc anal.arm_cs anal.arm_gnu anal.avr anal.bf anal.cr16 anal.cris anal.csr anal.dalvik anal.ebc anal.gb anal.h8300 anal.i8080 anal.java anal.m68k anal.malbolge anal.mips_cs anal.mips_gnu anal.msp430 anal.nios2 anal.null anal.ppc_cs anal.ppc_gnu anal.sh anal.sparc_cs anal.sparc_gnu anal.sysz anal.tms320 anal.v850 anal.ws anal.x86_cs anal.x86_udis anal.xcore_cs anal.z80 asm.8051 asm.arc asm.arm_cs asm.arm_gnu asm.arm_winedbg asm.avr asm.bf asm.cr16 asm.cris_gnu asm.csr asm.dalvik asm.dcpu16 asm.ebc asm.gb asm.h8300 asm.i4004 asm.i8080 asm.java asm.lh5801 asm.m68k asm.malbolge asm.mips_cs asm.mips_gnu asm.msil asm.msp430 asm.nios2 asm.ppc_cs asm.ppc_gnu asm.rar asm.sh asm.sparc_cs asm.sparc_gnu asm.spc700 asm.sysz asm.tms320 asm.v850 asm.ws asm.x86_cs asm.x86_nz asm.x86_olly asm.x86_tab asm.x86_udis asm.xcore_cs asm.z80 asm.z80_cr bin.any bin.bf bin.bios bin.coff bin.dex bin.elf bin.elf64 bin.fs bin.java bin.mach0 bin.mach064 bin.mz bin.ninds bin.ningb bin.ningba bin.p9 bin.pe bin.pe64 bin.pebble bin.rar bin.te bin.xbe bin.zimg bin_xtr.dyldcache bin_xtr.fatmach0 bp.arm bp.bf bp.mips bp.ppc bp.x86 core.anal core.java crypto.aes debug.bf debug.esil debug.gdb debug.native debug.rap debug.wind egg.exec egg.xor fs.cpio fs.ext2 fs.fat fs.fb fs.hfs fs.hfsplus fs.iso9660 fs.jfs fs.minix fs.ntfs fs.posix fs.reiserfs fs.sfs fs.tar fs.udf fs.ufs fs.xfs io.bfdbg io.debug io.default io.gdb io.gzip io.http io.ihex io.mach io.malloc io.mmap io.procpid io.ptrace io.rap ...[snip]... Final report:

  • PREFIX = /usr
  • HAVE_LIB_GMP = 0
  • HAVE_OPENSSL = 0
  • USE_CAPSTONE = 1
  • HAVE_FORK = 1
  • VERSION = 0.9.9-git
  • USE_LIB_ZIP = 0
  • USE_LIB_MAGIC = 0
  • DEBUGGER = 1
  • CC = gcc
  • USERCC = gcc
  • USEROSTYPE = gnulinux
  • LIL_ENDIAN = 1
  • LIBVERSION = 0.9.9-git ... [snip]... CC bp_mips.c LD libr_db.so CC utf8.c LD libr_diff.so CC bp_ppc.c CC fsmagic.c ../../shlr/sdb/src//util.o: In function sdb_itoa': util.c:(.text+0xfd): multiple definition ofsdb_itoa' ../../shlr/sdb/src//sdbn.o:sdbn.c:(.text+0x74): first defined here ../../shlr/sdb/src//util.o: In function sdb_atoi': util.c:(.text+0x27f): multiple definition ofsdb_atoi' ../../shlr/sdb/src//sdbn.o:sdbn.c:(.text+0x130): first defined here ../../shlr/sdb/src//util.o: In function sdb_alen': util.c:(.text+0x45a): multiple definition ofsdb_alen' ../../shlr/sdb/src//sdba.o:sdba.c:(.text+0xda5): first defined here ../../shlr/sdb/src//util.o: In function sdb_anext': util.c:(.text+0x56e): multiple definition ofsdb_anext' ../../shlr/sdb/src//sdba.o:sdba.c:(.text+0x69): first defined here collect2: error: ld returned 1 exit status ../rules.mk:59: recipe for target 'libr_db.so' failed make[4]: * [libr_db.so] Error 1 Makefile:34: recipe for target 'pre' failed make[3]: * [pre] Error 2 Makefile:62: recipe for target 'db' failed make[2]: * [db] Error 2 make[2]: * Waiting for unfinished jobs.... CC funcs.c CC bp_x86.c CC line.c LD libr_search.so CC hud.c CC is_tar.c CC magic.c CC print.c CC rgb.c CC softmagic.c CC pal.c CC editor.c CC 2048.c CC input.c LD libr_bp.so CC canvas.c CC canvas_line.c LD libr_magic.so LD libr_cons.so Makefile:27: recipe for target 'all' failed make[1]: * [all] Error 2 Makefile:28: recipe for target 'all' failed make: * [all] Error 2 — Reply to this email directly or view it on GitHub.
danghvu commented 9 years ago

git clean -xdf

That works!