我正在尝试为 Python ( http://www.radare.org/r/down.html ) 安装radare2-bindings。
从 github 克隆项目并运行 ./configure --prefix=/usr 后,输出中的 python 范围内的一切似乎都正常(错误来自我不需要绑定的语言)。
==> Using valabind 0.9.2--1-g7281165
==> Using swig 2.0.11
Checking valabind languages support...
- python: cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
yes
- perl: yes
- ruby: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from -e:1:in `<main>'
test_wrap.c:821:18: fatal error: ruby.h: No such file or directory
#include <ruby.h>
^
compilation terminated.
no
- lua: test_wrap.c:709:17: fatal error: lua.h: No such file or directory
#include "lua.h"
^
compilation terminated.
no
- go: SWIG -go: -intgosize option required but not specified
no
- java: test_wrap.c:135:17: fatal error: jni.h: No such file or directory
#include <jni.h>
^
compilation terminated.
no
- guile: test_wrap.cxx:730:22: fatal error: libguile.h: No such file or directory
#include <libguile.h>
^
compilation terminated.
no
- php5: test_wrap.c:706:18: fatal error: zend.h: No such file or directory
#include "zend.h"
^
compilation terminated.
no
- node-ffi: no
- ctypes: yes
- ocaml: SWIG is buggy. Please set in ocamldec.swg the following line:
#define caml_array_length swig_caml_array_length
/usr/bin/valabind-cc: 1: /usr/bin/valabind-cc: ocamlc: not found
test_wrap.cxx:741:24: fatal error: caml/alloc.h: No such file or directory
#include <caml/alloc.h>
^
compilation terminated.
no
- cxx: yes (g++)
- valac: yes
Supported langs:
- ctypes
- cxx
- duktape
- perl
- python
- valac
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 c++ compiler... g++
checking for valabind... /usr/bin/valabind
checking for swig... /usr/bin/swig
checking for g-ir-compiler... /usr/bin/g-ir-compiler
Using PKGCONFIG: pkg-config
checking pkg-config flags for r_core... yes
creating ./config.mk
cleaning temporally files... done
Final report:
- PREFIX = /usr
- HAVE_SWIG = 1
- HAVE_VALABIND = 1
- HAVE_GIRCOMPILER = 1
但是,当我尝试在 python 文件夹上运行 make 时,我得到以下输出:
Build r_core -lr_core -lr_config -lr_cons -lr_util -lr_flags -lr_asm -lr_db -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic
valabind-cc python r_core -NRadare -NSDB --swig -x --vapidir=../vapi ../vapi/r_core -I/usr/include/libr -lr_core -lr_config -lr_cons -lr_util -lr_flags -lr_asm -lr_db -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic
valabind --swig -I /usr/include/libr -x -N SDB -N Radare -x --vapidir ../vapi -o r_core.i -m r_core ../vapi/r_core --swig
NOTICE Symbol defined VALABIND_SWIG
NOTICE Adding dependency package glib-2.0
NOTICE Adding dependency package gobject-2.0
NOTICE Adding dependency package ../vapi/r_core
NOTICE Adding dependency package r_cmd
NOTICE Adding dependency package r_util
NOTICE Adding dependency package r_cons
NOTICE Adding dependency package r_anal
NOTICE Adding dependency package r_reg
NOTICE Adding dependency package r_hash
NOTICE Adding dependency package r_egg
NOTICE Adding dependency package r_asm
NOTICE Adding dependency package r_syscall
NOTICE Adding dependency package r_db
NOTICE Adding dependency package r_io
NOTICE Adding dependency package r_bp
NOTICE Adding dependency package r_debug
NOTICE Adding dependency package r_search
NOTICE Adding dependency package r_flags
NOTICE Adding dependency package r_config
NOTICE Adding dependency package r_bin
NOTICE Adding dependency package r_parse
NOTICE Adding dependency package r_lang
NOTICE Adding dependency package r_print
NOTICE Adding dependency package r_fs
NOTICE Adding dependency package r_magic
WARNING Method delete renamed to _delete (don't ask where)
WARNING Method continue renamed to cont (don't ask where)
swig -small -O -o r_core_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/libr -c++ -c++ -python r_core.i
r_core.i:40: Warning 302: Identifier 'RCoreAsmHitVector' redefined (ignored) (Renamed from 'vector< RCoreAsmHit >'),
r_core.i:39: Warning 302: previous definition of 'RCoreAsmHitVector' (Renamed from 'vector< RCoreAsmHit >').
r_core.i:42: Warning 302: Identifier 'RAnalRefVector' redefined (ignored) (Renamed from 'vector< RAnalRef >'),
r_core.i:41: Warning 302: previous definition of 'RAnalRefVector' (Renamed from 'vector< RAnalRef >').
r_core.i:46: Warning 302: Identifier 'RAnalRefVector' redefined (ignored) (Renamed from 'vector< RAnalRef >'),
r_core.i:41: Warning 302: previous definition of 'RAnalRefVector' (Renamed from 'vector< RAnalRef >').
r_core.i:47: Warning 302: Identifier 'RAnalRefVector' redefined (ignored) (Renamed from 'vector< RAnalRef >'),
r_core.i:41: Warning 302: previous definition of 'RAnalRefVector' (Renamed from 'vector< RAnalRef >').
r_core.i:62: Warning 302: Identifier 'charVector' redefined (ignored) (Renamed from 'vector< char >'),
r_core.i:58: Warning 302: previous definition of 'charVector' (Renamed from 'vector< char >').
r_core.i:63: Warning 302: Identifier 'charVector' redefined (ignored) (Renamed from 'vector< char >'),
r_core.i:58: Warning 302: previous definition of 'charVector' (Renamed from 'vector< char >').
r_core.i:92: Warning 314: 'print' is a python keyword, renaming to '_print'
r_core.i:322: Warning 314: 'from' is a python keyword, renaming to '_from'
r_core.i:327: Warning 314: 'from' is a python keyword, renaming to '_from'
r_core.i:584: Warning 314: 'import' is a python keyword, renaming to '_import'
r_core.i:1979: Warning 314: 'del' is a python keyword, renaming to '_del'
r_core.i:1655: Warning 453: Can't apply (RAsmOp *OUTPUT). No typemaps are defined.
r_core.i:1660: Warning 453: Can't apply (RAsmOp *OUTPUT). No typemaps are defined.
g++ -fPIC -shared r_core_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -D_FORTIFY_SOURCE=2 -g --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -I/usr/include/libr -o _r_core.so -lr_magic -lr_fs -lr_socket -lr_syscall -lr_search -lr_reg -lr_egg -lr_bp -lr_parse -lr_anal -lr_io -lr_lang -lr_bin -lr_hash -lr_debug -lr_db -lr_asm -lr_flags -lr_util -lr_cons -lr_config -lr_core -L/usr/local/lib -L/usr/pkg/lib -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
r_core_wrap.cxx: In function 'void delete_RListIter(RListIter*)':
r_core_wrap.cxx:7324:25: warning: statement has no effect [-Wunused-value]
r_list_iter_free(self);
^
r_core_wrap.cxx: In function 'void RIO_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int, int)':
r_core_wrap.cxx:8266:57: error: too many arguments to function 'void r_io_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int)'
r_io_section_list_visual(self, addr, len, width, color);
^
In file included from /usr/include/libr/r_fs.h:6:0,
from r_core_wrap.cxx:3210:
/usr/include/libr/r_io.h:396:12: note: declared here
R_API void r_io_section_list_visual(RIO *io, ut64 seek, ut64 len, int color);
^
... r_core.so
Build r_bin -lr_bin -lr_util -lr_db -lr_io
valabind-cc python r_bin -NRadare -NSDB --swig -x --vapidir=../vapi ../vapi/r_bin -I/usr/include/libr -lr_bin -lr_util -lr_db -lr_io
valabind --swig -I /usr/include/libr -x -N SDB -N Radare -x --vapidir ../vapi -o r_bin.i -m r_bin ../vapi/r_bin --swig
NOTICE Symbol defined VALABIND_SWIG
NOTICE Adding dependency package glib-2.0
NOTICE Adding dependency package gobject-2.0
NOTICE Adding dependency package ../vapi/r_bin
NOTICE Adding dependency package r_util
NOTICE Adding dependency package r_io
swig -small -O -o r_bin_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/libr -c++ -c++ -python r_bin.i
r_bin.i:110: Warning 314: 'import' is a python keyword, renaming to '_import'
g++ -fPIC -shared r_bin_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -D_FORTIFY_SOURCE=2 -g --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -I/usr/include/libr -o _r_bin.so -lr_io -lr_db -lr_util -lr_bin -L/usr/local/lib -L/usr/pkg/lib -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
r_bin_wrap.cxx: In function 'void delete_RListIter(RListIter*)':
r_bin_wrap.cxx:6034:25: warning: statement has no effect [-Wunused-value]
r_list_iter_free(self);
^
r_bin_wrap.cxx: In function 'void RIO_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int, int)':
r_bin_wrap.cxx:6271:57: error: too many arguments to function 'void r_io_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int)'
r_io_section_list_visual(self, addr, len, width, color);
^
In file included from r_bin_wrap.cxx:3117:0:
/usr/include/libr/r_io.h:396:12: note: declared here
R_API void r_io_section_list_visual(RIO *io, ut64 seek, ut64 len, int color);
^
... r_bin.so
... r_asm.so
有谁知道如何解决这个问题?在这个安装过程中我已经遇到了很多问题,并且能够解决它们......但是这个问题现在真的让我陷入了困境。