radareorg / radare2

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

Debian on Alpha architecture - fails to build #17247

Open XVilka opened 4 years ago

XVilka commented 4 years ago

Work environment

Questions Answers
OS/arch/bits (mandatory) Debian Alpha
File format of the file you reverse (mandatory) *
Architecture/bits of the file (mandatory) *
r2 -v full output, not truncated (mandatory) radare2 2.4.0-git 17284 @ darwin-x86-64 git.2.2.0-476-gf8cf84e06 commit: f8cf84e0653642d9ad34e760e0e56dd81860e799 build: 2018-02-17__11:08:27

Expected behavior

Compiling fine

Actual behavior

gcc -c  -MD   -fPIC -g -Wall -D__UNIX__=1 -DR2_PLUGIN_INCORE -Ip/libbfwbf/include -I/home/radare/radare/radare2/libr/../shlr/bochs/include/ -I/home/radare/radare/radare2/libr/../shlr/gdb/include/ -I/home/radare/radare/radare2/libr/../shlr/qnx/include/ -Ip/librapwrap/include -I/home/radare/radare/radare2/libr/../shlr/windbg/ -DXNU_USE_PTRACE=0 -I../bin/format/elf -I/home/radare/radare/radare2/libr -I/home/radare/radare/radare2/libr/include -fvisibility=hidden -o p/native/linux/linux_debug.o p/native/linux/linux_debug.c
p/native/linux/linux_debug.c: In function ‘linux_reg_profile’:
p/native/linux/linux_debug.c:59:3: error: #error "Unsupported Linux CPU"
   59 | # error "Unsupported Linux CPU"
      |   ^~~~~
p/native/linux/linux_debug.c: In function ‘print_fpu’:
p/native/linux/linux_debug.c:971:2: warning: #warning print_fpu not implemented for this platform [-Wcpp]
  971 | #warning print_fpu not implemented for this platform
      |  ^~~~~~~
p/native/linux/linux_debug.c: In function ‘linux_reg_read’:
p/native/linux/linux_debug.c:1065:3: warning: #warning getfpregs not implemented for this platform [-Wcpp]
 1065 |  #warning getfpregs not implemented for this platform
      |   ^~~~~~~
p/native/linux/linux_debug.c:1072:4: error: unknown type name ‘R_DEBUG_REG_T’
 1072 |    R_DEBUG_REG_T regs;
      |    ^~~~~~~~~~~~~
p/native/linux/linux_debug.c:976:7: warning: variable ‘showfpu’ set but not used [-Wunused-but-set-variable]
  976 |  bool showfpu = false;
      |       ^~~~~~~
At top level:
p/native/linux/linux_debug.c:883:13: warning: ‘print_fpu’ defined but not used [-Wunused-function]
  883 | static void print_fpu(void *f){
      |             ^~~~~~~~~
/home/radare/radare/radare2/libr/../global.mk:38: recipe for target 'p/native/linux/linux_debug.o' failed
make[4]: *** [p/native/linux/linux_debug.o] Error 1
make[4]: Leaving directory '/home/radare/radare/radare2/libr/debug'
Makefile:13: recipe for target 'foo' failed
make[3]: *** [foo] Error 2
make[3]: Leaving directory '/home/radare/radare/radare2/libr/debug'
Makefile:159: recipe for target 'debug' failed
make[2]: *** [debug] Error 2
make[2]: Leaving directory '/home/radare/radare/radare2/libr'
Makefile:22: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/radare/radare/radare2/libr'
Makefile:56: recipe for target 'all' failed
make: *** [all] Error 2
radare@radare:~/radare/radare2$ uname -a
Linux radare 5.7.0-1-alpha-generic #1 Debian 5.7.6-1 (2020-06-24) alpha GNU/Linux
radare@radare:~/radare/radare2$ 

Steps to reproduce the behavior

./configure
make

I think we should just not build debugger then for the unsupported platforms. It should not prevent radare2 from building.

P.S.: See also https://github.com/radareorg/ideas/issues/227

trufae commented 4 years ago

use --without-debugger. but adding basic debugger support should be easy with a shell