Closed bartoszek closed 6 years ago
Its r_util/r_print.h
Can you fix the vapi and send a pr?
On 19 Nov 2018, at 16:06, bartoszek notifications@github.com wrote:
After radare/radare2@4a2bc97#diff-7744d966f1b1185ce735be8800178f98 r_print.h got moved to include/r_util witch breaks bindings build.
r_core_wrap.cxx:3285:11: fatal error: r_print.h: No such file or directory
include
^~~~~~~~~~~
compilation terminated. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
I've tried to bend r_print.vapi
slightly to see what could happen.
diff --git a/vapi/r_print.vapi b/vapi/r_print.vapi
index 345f42b..df36042 100644
--- a/vapi/r_print.vapi
+++ b/vapi/r_print.vapi
@@ -1,7 +1,7 @@
/* radare - LGPL - Copyright 2010-2015 pancake */
[Compact]
-[CCode (cheader_filename="r_print.h", cprefix="r_print_", cname="RPrint", free_function="r_print_free")]
+[CCode (cheader_filename="r_util/r_print.h", cprefix="r_print_", cname="RPrint", free_function="r_print_free")]
public class Radare.RPrint {
/* constructor */
public RPrint();
it gets through, though more error pops up:
$sh: make python2
...
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/python2.7 -march=x86-64 -mtune=generic -O2 -pipe -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -I/usr/include/libr -I/usr/include/capstone -o _r_core.so -ldl -lr_util -lr_hash -lr_crypto -lr_magic -lr_socket -lr_io -lr_fs -lr_syscall -lr_search -lr_reg -lr_cons -lr_flag -lr_parse -lr_lang -lr_asm -lr_egg -lr_bp -lr_anal -lr_bin -lr_debug -lr_config -lcapstone -lcrypto -lssl -lr_core -L/usr/local/lib -L/usr/pkg/lib -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "",
LC_ALL = (unset),
LC_MEASUREMENT = "pl_PL.UTF-8",
LC_PAPER = "pl_PL.UTF-8",
LC_MONETARY = "pl_PL.UTF-8",
LC_NUMERIC = "pl_PL.UTF-8",
LC_TIME = "pl_PL.UTF-8",
LANG = "python"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
In file included from /usr/include/libr/sdb/sdb.h:14,
from /usr/include/libr/sdb.h:1,
from r_core_wrap.cxx:3282:
/usr/include/libr/sdb/sdbht.h: In function 'char* sdbkv_key(const SdbKv*)'
/usr/include/libr/sdb/sdbht.h:15:18: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
return kv->base.key;
~~~~~~~~~^~~
r_core_wrap.cxx: In function 'void RBin_iobind(RBin*, RIO*)'
r_core_wrap.cxx:8668:3: error: 'r_bin_iobind' was not declared in this scope
r_bin_iobind(self, io);
^~~~~~~~~~~~
r_core_wrap.cxx:8668:3: note: suggested alternative: 'r_bin_bind'
r_bin_iobind(self, io);
^~~~~~~~~~~~
r_bin_bind
r_core_wrap.cxx: In function 'int RBin_load(RBin*, char*, long long unsigned int, long long unsigned int, int, int, int)'
r_core_wrap.cxx:8680:10: error: 'r_bin_load' was not declared in this scope
return r_bin_load(self, file, baddr, laddr, xtr_idx, fd, rawstr);
^~~~~~~~~~
r_core_wrap.cxx:8680:10: note: suggested alternative: 'r_sign_load'
return r_bin_load(self, file, baddr, laddr, xtr_idx, fd, rawstr);
^~~~~~~~~~
r_sign_load
r_core_wrap.cxx: In function 'int RBin_select_idx(RBin*, char*, int)'
r_core_wrap.cxx:8692:10: error: 'r_bin_select_idx' was not declared in this scope
return r_bin_select_idx(self, name, idx);
^~~~~~~~~~~~~~~~
r_core_wrap.cxx:8692:10: note: suggested alternative: 'RBin_select_idx'
return r_bin_select_idx(self, name, idx);
^~~~~~~~~~~~~~~~
RBin_select_idx
r_core_wrap.cxx: In function 'int RBin_is_stripped(RBin*)'
r_core_wrap.cxx:8798:10: error: 'r_bin_is_stripped' was not declared in this scope
return r_bin_is_stripped(self);
^~~~~~~~~~~~~~~~~
r_core_wrap.cxx:8798:10: note: suggested alternative: 'RBin_is_stripped'
return r_bin_is_stripped(self);
^~~~~~~~~~~~~~~~~
RBin_is_stripped
r_core_wrap.cxx: In function 'int RBin_has_dbg_linenums(RBin*)'
r_core_wrap.cxx:8804:10: error: 'r_bin_has_dbg_linenums' was not declared in this scope
return r_bin_has_dbg_linenums(self);
^~~~~~~~~~~~~~~~~~~~~~
r_core_wrap.cxx:8804:10: note: suggested alternative: 'RBin_has_dbg_linenums'
return r_bin_has_dbg_linenums(self);
^~~~~~~~~~~~~~~~~~~~~~
RBin_has_dbg_linenums
r_core_wrap.cxx: In function 'int RBin_has_dbg_syms(RBin*)'
r_core_wrap.cxx:8807:10: error: 'r_bin_has_dbg_syms' was not declared in this scope
return r_bin_has_dbg_syms(self);
^~~~~~~~~~~~~~~~~~
r_core_wrap.cxx:8807:10: note: suggested alternative: 'RBin_has_dbg_syms'
return r_bin_has_dbg_syms(self);
^~~~~~~~~~~~~~~~~~
RBin_has_dbg_syms
r_core_wrap.cxx: In function 'int RBin_has_dbg_relocs(RBin*)'
r_core_wrap.cxx:8810:10: error: 'r_bin_has_dbg_relocs' was not declared in this scope
return r_bin_has_dbg_relocs(self);
^~~~~~~~~~~~~~~~~~~~
r_core_wrap.cxx:8810:10: note: suggested alternative: 'RBin_has_dbg_relocs'
return r_bin_has_dbg_relocs(self);
^~~~~~~~~~~~~~~~~~~~
RBin_has_dbg_relocs
r_core_wrap.cxx: In function 'RBinObject* RBin_get_object(RBin*)'
r_core_wrap.cxx:8819:10: error: 'r_bin_get_object' was not declared in this scope
return r_bin_get_object(self);
^~~~~~~~~~~~~~~~
r_core_wrap.cxx:8819:10: note: suggested alternative: 'RBin_get_object'
return r_bin_get_object(self);
^~~~~~~~~~~~~~~~
RBin_get_object
r_core_wrap.cxx: In function 'bool RParse_filter(RParse*, RFlag*, char*, char*, int, bool)'
r_core_wrap.cxx:8834:31: error: invalid conversion from 'RFlag*' {aka 'r_flag_t*'} to 'long long unsigned int' [-fpermissive]
return r_parse_filter(self, flag, data, str, len, bigendian);
^~~~
r_core_wrap.cxx:8834:37: error: cannot convert 'char*' to 'RFlag*' {aka 'r_flag_t*'}
return r_parse_filter(self, flag, data, str, len, bigendian);
^~~~
In file included from /usr/include/libr/r_asm.h:9,
from /usr/include/libr/r_egg.h:4,
from /usr/include/libr/r_debug.h:10,
from r_core_wrap.cxx:3287:
/usr/include/libr/r_parse.h:62:55: note: initializing argument 3 of 'int r_parse_filter(RParse*, long long unsigned int, RFlag*, char*, char*, int, bool)'
R_API int r_parse_filter(RParse *p, ut64 addr, RFlag *f, char *data, char *str, int len, bool big_endian);
~~~~~~~^
r_core_wrap.cxx: In function 'PyObject* _wrap_RIODesc_flags_set(PyObject*, PyObject*)'
r_core_wrap.cxx:29313:54: error: 'RIODesc' {aka 'struct r_io_desc_t'} has no member named 'flags'
arg2 = static_cast< int >(val2); if (arg1) (arg1)->flags = arg2; resultobj = SWIG_Py_Void(); return resultobj; fail:
^~~~~
r_core_wrap.cxx: In function 'PyObject* _wrap_RIODesc_flags_get(PyObject*, PyObject*)'
r_core_wrap.cxx:29319:73: error: 'RIODesc' {aka 'struct r_io_desc_t'} has no member named 'flags'
arg1 = reinterpret_cast< RIODesc * >(argp1); result = (int) ((arg1)->flags);
^~~~~
r_core_wrap.cxx: In function 'PyObject* _wrap_RBinSection_srwx_set(PyObject*, PyObject*)'
r_core_wrap.cxx:32802:71: error: 'RBinSection' {aka 'struct r_bin_section_t'} has no member named 'srwx'
arg2 = static_cast< unsigned long long >(val2); if (arg1) (arg1)->srwx = arg2; resultobj = SWIG_Py_Void(); return resultobj;
^~~~
r_core_wrap.cxx: In function 'PyObject* _wrap_RBinSection_srwx_get(PyObject*, PyObject*)'
r_core_wrap.cxx:32809:92: error: 'RBinSection' {aka 'struct r_bin_section_t'} has no member named 'srwx'
arg1 = reinterpret_cast< RBinSection * >(argp1); result = (unsigned long long) ((arg1)->srwx);
^~~~
make[1]: *** [../rules.mk:34: r_core.so] Błąd 1
make[1]: Opuszczenie katalogu '/home/bartus/AUR/radare2-bindings-git/src/radare2-bindings-git/python'
It appears there is more to be fixed, or my meddling somewhat breaks more than it should...
To clarify: my last successful build was f219e29 against radare/radare2@deafc51, which was at Sep 6'th.
After radare/radare2@4a2bc97a35c7e25962da7ffe54b4092fdeaf38fa
r_print.h
got moved toinclude/r_util
witch breaks bindings build.