Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot normally install nodejs bindings #89

Open
dukebarman opened this issue Oct 15, 2015 · 2 comments
Open

Cannot normally install nodejs bindings #89

dukebarman opened this issue Oct 15, 2015 · 2 comments

Comments

@dukebarman
Copy link

I try to use Nodejs bindings and have a problems with install. Make is normally finished but I see one error:

node-ffi # make
...
NOTICE >class Radare.RMagic
NOTICE >ns SDB
NOTICE >class SDB.Sdb
<stdin>: In function ‘main’:
<stdin>:30:15209: error: ‘R_ANAL_REFLINE_TYPE_STYLE’ undeclared (first use in this function)
<stdin>:30:15209: note: each undeclared identifier is reported only once for each function it appears in
<stdin>:30:17547: error: ‘R_DBG_REASON_NEW_PID’ undeclared (first use in this function)
<stdin>:30:17568: error: ‘R_DBG_REASON_NEW_TID’ undeclared (first use in this function)
<stdin>:30:17589: error: ‘R_DBG_REASON_NEW_LIB’ undeclared (first use in this function)
<stdin>:30:17610: error: ‘R_DBG_REASON_EXIT_PID’ undeclared (first use in this function)
<stdin>:30:17632: error: ‘R_DBG_REASON_EXIT_TID’ undeclared (first use in this function)
<stdin>:30:17654: error: ‘R_DBG_REASON_EXIT_LIB’ undeclared (first use in this function)
<stdin>:30:17676: error: ‘R_DBG_REASON_TRAP’ undeclared (first use in this function)
<stdin>:30:17694: error: ‘R_DBG_REASON_ILL’ undeclared (first use in this function)
<stdin>:30:17711: error: ‘R_DBG_REASON_SIGNAL’ undeclared (first use in this function)
<stdin>:30:17731: error: ‘R_DBG_REASON_FPU’ undeclared (first use in this function)
<stdin>:30:17748: error: ‘R_DBG_REASON_BP’ undeclared (first use in this function)
<stdin>:30:17764: error: ‘R_DBG_REASON_UNKNOWN’ undeclared (first use in this function)
ERROR gcc exited with status 256
... r_core.so
Build r_bin -lr_bin -lr_util -lr_db -lr_io 
valabind-cc node-ffi r_bin -NRadare -NSDB -x --vapidir=../vapi ../vapi/r_bin -I/usr/include/libr -lr_bin -lr_util -lr_db -lr_io
valabind --node-ffi -I /usr/include/libr -x -N SDB -N Radare --vapidir ../vapi -o r_bin.js -m r_bin ../vapi/r_bin
NOTICE Symbol defined VALABIND_NODEJS
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
NOTICE >ns Radare
...

After I try to start examples and see errors again: not load ffi & ref modules. And cannot npm install it from node-ffi folder: npm log https://dl.dropboxusercontent.com/u/10688770/npm-debug.log

But I could copy this modules from other folder and r_asm.js found it:
r2_core_binding

@jpenalbae
Copy link
Collaborator

node.js ffi bindings are broken since long time ago...

Please try with r2pipe:
https://www.npmjs.com/package/r2pipe
https://github.com/radare/radare2-bindings/tree/master/r2pipe/nodejs

@radare
Copy link
Collaborator

radare commented Oct 16, 2015

the node-ffi generator of valabind got broken when the ffi node modules changed the API, the current generated code is wrong, i am priorizing the r2pipe api for simplicity.

But anyone intersted in maintaining the native apis is welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants