radareorg / radare2-bindings

Bindings of the r2 api for Valabind and friends
GNU Lesser General Public License v3.0
132 stars 92 forks source link

Makefile:164: recipe for target 'install-python' failed #153

Closed deshmukhsudarshan closed 5 years ago

deshmukhsudarshan commented 7 years ago

After installing all packages, typing command PYTHON_CONFIG=python2.7-config make install

Gives below message and Error....

cd .. ; make install-python make[1]: Entering directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' test -f python/_rcore.so E=so ; [ uname = Darwin ] && E=so ; \ echo "Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2" ; \ mkdir -p / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 ; \ : > / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2/init.py ; \ cp -rf python/r.py python/.$E / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 /bin/sh: 3: --exec-prefix: not found /bin/sh: 3: --includes: not found /bin/sh: 3: --libs: not found /bin/sh: 3: --cflags: not found /bin/sh: 3: --ldflags: not found /bin/sh: 3: --extension-suffix: not found /bin/sh: 3: --help: not found /bin/sh: 3: --configdir: not found mkdir: unrecognized option '--prefix' Try 'mkdir --help' for more information. /bin/sh: 4: cannot create /: Is a directory /bin/sh: 4: --exec-prefix: not found /bin/sh: 4: --includes: not found /bin/sh: 4: --libs: not found /bin/sh: 4: --cflags: not found /bin/sh: 4: --ldflags: not found /bin/sh: 4: --extension-suffix: not found /bin/sh: 4: --help: not found /bin/sh: 4: --configdir: not found /bin/sh: 5: --exec-prefix: not found /bin/sh: 5: --includes: not found /bin/sh: 5: --libs: not found /bin/sh: 5: --cflags: not found /bin/sh: 5: --ldflags: not found /bin/sh: 5: --extension-suffix: not found /bin/sh: 5: --help: not found /bin/sh: 5: --configdir: not found cp: unrecognized option '--prefix' Try 'cp --help' for more information. Makefile:164: recipe for target 'install-python' failed make[1]: [install-python] Error 127 make[1]: Leaving directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' ../rules.mk:57: recipe for target 'install' failed make: [install] Error 2

Maijin commented 7 years ago

From @radare

There are 3 python bindings right now:

r2pipe is just a wrapper for r_core_cmd(), it spawns or connects to an r2 session and runs commands and returns the output. As long as many commands have json output you can use cmdj() that will return a native object for the langauge you use. from my tests, this is way faster than using the swig bindings because the data serialization and ffi are really expensive. and json parsers are WAY faster.

swig, (using valabind) full automatically generated bindings using the vapi definitions of most of the native C api of libr. the r2 libraries. This have sometimes some issues because of missing apis (not much maintained, because most work is done in core) so you will probably find some double frees or other random crash issues depending on version of swig, r2, python , … but it works and its quite handy to integrate with other tools. The APIs should be enhaced to make them more adapted to the language.

ctypes: automatically generated bindings using valabind, but targetting ctypes instead of swig. this bindings are much faster to generate and maintain and run than the swig ones. but they are not as complete as the swig ones because the ctypes backend of valabind is not much maintained.

r2pipe requires no maintainance, and it will help you in most of the usecases you want. but it will be great to have more people using the other native bindings, so it will be useful in order to identify which apis from core are causing problems with the bindings to rename, refactor or reorganize them to make the apis easier to use.

You can use r2pm command to install r2pipe or the bindings.

radare commented 7 years ago

why do you need to set this env? its already done by the python-config wrapper.

i see several problems in this output. like backticks not being honored, , executing help messages, just drop that env var and it should work fine.

On 03 Apr 2017, at 08:29, deshmukhsudarshan notifications@github.com wrote:

After installing all packages, typing command PYTHON_CONFIG=python2.7-config make install

Gives below message and Error....

cd .. ; make install-python make[1]: Entering directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' test -f python/r_core.so E=so ; [ uname = Darwin ] && E=so ; echo "Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2" ; mkdir -p / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 ; : > / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2/init.py ; cp -rf python/r.py python/.$E / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 /bin/sh: 3: --exec-prefix: not found /bin/sh: 3: --includes: not found /bin/sh: 3: --libs: not found /bin/sh: 3: --cflags: not found /bin/sh: 3: --ldflags: not found /bin/sh: 3: --extension-suffix: not found /bin/sh: 3: --help: not found /bin/sh: 3: --configdir: not found mkdir: unrecognized option '--prefix' Try 'mkdir --help' for more information. /bin/sh: 4: cannot create /: Is a directory /bin/sh: 4: --exec-prefix: not found /bin/sh: 4: --includes: not found /bin/sh: 4: --libs: not found /bin/sh: 4: --cflags: not found /bin/sh: 4: --ldflags: not found /bin/sh: 4: --extension-suffix: not found /bin/sh: 4: --help: not found /bin/sh: 4: --configdir: not found /bin/sh: 5: --exec-prefix: not found /bin/sh: 5: --includes: not found /bin/sh: 5: --libs: not found /bin/sh: 5: --cflags: not found /bin/sh: 5: --ldflags: not found /bin/sh: 5: --extension-suffix: not found /bin/sh: 5: --help: not found /bin/sh: 5: --configdir: not found cp: unrecognized option '--prefix' Try 'cp --help' for more information. Makefile:164: recipe for target 'install-python' failed make[1]: [install-python] Error 127 make[1]: Leaving directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' ../rules.mk:57: recipe for target 'install' failed make: [install] Error 2

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/radare/radare2-bindings/issues/153, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lvw6BIj_W4KOpoNlKx06F_Tj1UNsks5rsJG1gaJpZM4MxIy8.

nohope91 commented 5 years ago

why do you need to set this env? its already done by the python-config wrapper. i see several problems in this output. like backticks not being honored, , executing help messages, just drop that env var and it should work fine. On 03 Apr 2017, at 08:29, deshmukhsudarshan @.> wrote: After installing all packages, typing command PYTHON_CONFIG=python2.7-config make install Gives below message and Error.... cd .. ; make install-python make[1]: Entering directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' test -f python/r_core.so E=so ; [ uname = Darwin ] && E=so ; echo "Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2" ; mkdir -p / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 ; : > / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2/init.py ; cp -rf python/r.py python/.$E / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 /bin/sh: 3: --exec-prefix: not found /bin/sh: 3: --includes: not found /bin/sh: 3: --libs: not found /bin/sh: 3: --cflags: not found /bin/sh: 3: --ldflags: not found /bin/sh: 3: --extension-suffix: not found /bin/sh: 3: --help: not found /bin/sh: 3: --configdir: not found mkdir: unrecognized option '--prefix' Try 'mkdir --help' for more information. /bin/sh: 4: cannot create /: Is a directory /bin/sh: 4: --exec-prefix: not found /bin/sh: 4: --includes: not found /bin/sh: 4: --libs: not found /bin/sh: 4: --cflags: not found /bin/sh: 4: --ldflags: not found /bin/sh: 4: --extension-suffix: not found /bin/sh: 4: --help: not found /bin/sh: 4: --configdir: not found /bin/sh: 5: --exec-prefix: not found /bin/sh: 5: --includes: not found /bin/sh: 5: --libs: not found /bin/sh: 5: --cflags: not found /bin/sh: 5: --ldflags: not found /bin/sh: 5: --extension-suffix: not found /bin/sh: 5: --help: not found /bin/sh: 5: --configdir: not found cp: unrecognized option '--prefix' Try 'cp --help' for more information. Makefile:164: recipe for target 'install-python' failed make[1]: [install-python] Error 127 make[1]: Leaving directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' ../rules.mk:57: recipe for target 'install' failed make: *** [install] Error 2 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#153>, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lvw6BIj_W4KOpoNlKx06F_Tj1UNsks5rsJG1gaJpZM4MxIy8.

Sir, I'm stuck in this issue since a MONTH :'( I have the very same log above when I run the exact command : PYTHON_CONFIG=python2.7-config make install

I've installed EVERY NECESSARY PACKAGE that relates to radare2-bindings but it'll NEVER complete

PLEASE SIR, PLEASE EXPLAIN what you meant by (just drop that env var and it should work fine)

radare commented 5 years ago

Do you have pythob2.7-config in path?

On 15 Dec 2018, at 09:00, nohope91 notifications@github.com wrote:

why do you need to set this env? its already done by the python-config wrapper. i see several problems in this output. like backticks not being honored, , executing help messages, just drop that env var and it should work fine. … On 03 Apr 2017, at 08:29, deshmukhsudarshan @.> wrote: After installing all packages, typing command PYTHON_CONFIG=python2.7-config make install Gives below message and Error.... cd .. ; make install-python make[1]: Entering directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' test -f python/r_core.so E=so ; [ uname = Darwin ] && E=so ; echo "Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2" ; mkdir -p / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 ; : > / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2/init.py ; cp -rf python/r.py python/.$E / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 /bin/sh: 3: --exec-prefix: not found /bin/sh: 3: --includes: not found /bin/sh: 3: --libs: not found /bin/sh: 3: --cflags: not found /bin/sh: 3: --ldflags: not found /bin/sh: 3: --extension-suffix: not found /bin/sh: 3: --help: not found /bin/sh: 3: --configdir: not found mkdir: unrecognized option '--prefix' Try 'mkdir --help' for more information. /bin/sh: 4: cannot create /: Is a directory /bin/sh: 4: --exec-prefix: not found /bin/sh: 4: --includes: not found /bin/sh: 4: --libs: not found /bin/sh: 4: --cflags: not found /bin/sh: 4: --ldflags: not found /bin/sh: 4: --extension-suffix: not found /bin/sh: 4: --help: not found /bin/sh: 4: --configdir: not found /bin/sh: 5: --exec-prefix: not found /bin/sh: 5: --includes: not found /bin/sh: 5: --libs: not found /bin/sh: 5: --cflags: not found /bin/sh: 5: --ldflags: not found /bin/sh: 5: --extension-suffix: not found /bin/sh: 5: --help: not found /bin/sh: 5: --configdir: not found cp: unrecognized option '--prefix' Try 'cp --help' for more information. Makefile:164: recipe for target 'install-python' failed make[1]: [install-python] Error 127 make[1]: Leaving directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' ../rules.mk:57: recipe for target 'install' failed make: *** [install] Error 2 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#153>, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lvw6BIj_W4KOpoNlKx06F_Tj1UNsks5rsJG1gaJpZM4MxIy8.

Sir, I'm stuck in this issue since a MONTH :'( I have the very same log above when I run the exact command : PYTHON_CONFIG=python2.7-config make install

I've installed EVERY NECESSARY PACKAGE that relates to radare2-bindings but it'll NEVER complete

PLEASE SIR, PLEASE EXPLAIN what you meant by (just drop that env var and it should work fine)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

radare commented 5 years ago

You dont need to set any env. Its automatically detected

On 15 Dec 2018, at 09:00, nohope91 notifications@github.com wrote:

why do you need to set this env? its already done by the python-config wrapper. i see several problems in this output. like backticks not being honored, , executing help messages, just drop that env var and it should work fine. … On 03 Apr 2017, at 08:29, deshmukhsudarshan @.> wrote: After installing all packages, typing command PYTHON_CONFIG=python2.7-config make install Gives below message and Error.... cd .. ; make install-python make[1]: Entering directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' test -f python/r_core.so E=so ; [ uname = Darwin ] && E=so ; echo "Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2" ; mkdir -p / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 ; : > / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2/init.py ; cp -rf python/r.py python/.$E / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 Installing pythonUsage: r2 modules in / Usage: /usr/bin/python2.7-config --prefix | --exec-prefix | --includes | --libs | --cflags | --ldflags | --extension-suffix | --help | --configdir /r2 /bin/sh: 3: --exec-prefix: not found /bin/sh: 3: --includes: not found /bin/sh: 3: --libs: not found /bin/sh: 3: --cflags: not found /bin/sh: 3: --ldflags: not found /bin/sh: 3: --extension-suffix: not found /bin/sh: 3: --help: not found /bin/sh: 3: --configdir: not found mkdir: unrecognized option '--prefix' Try 'mkdir --help' for more information. /bin/sh: 4: cannot create /: Is a directory /bin/sh: 4: --exec-prefix: not found /bin/sh: 4: --includes: not found /bin/sh: 4: --libs: not found /bin/sh: 4: --cflags: not found /bin/sh: 4: --ldflags: not found /bin/sh: 4: --extension-suffix: not found /bin/sh: 4: --help: not found /bin/sh: 4: --configdir: not found /bin/sh: 5: --exec-prefix: not found /bin/sh: 5: --includes: not found /bin/sh: 5: --libs: not found /bin/sh: 5: --cflags: not found /bin/sh: 5: --ldflags: not found /bin/sh: 5: --extension-suffix: not found /bin/sh: 5: --help: not found /bin/sh: 5: --configdir: not found cp: unrecognized option '--prefix' Try 'cp --help' for more information. Makefile:164: recipe for target 'install-python' failed make[1]: [install-python] Error 127 make[1]: Leaving directory '/home/ssdeshmukh/Downloads/radare2-bindings-1.3.0' ../rules.mk:57: recipe for target 'install' failed make: *** [install] Error 2 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#153>, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lvw6BIj_W4KOpoNlKx06F_Tj1UNsks5rsJG1gaJpZM4MxIy8.

Sir, I'm stuck in this issue since a MONTH :'( I have the very same log above when I run the exact command : PYTHON_CONFIG=python2.7-config make install

I've installed EVERY NECESSARY PACKAGE that relates to radare2-bindings but it'll NEVER complete

PLEASE SIR, PLEASE EXPLAIN what you meant by (just drop that env var and it should work fine)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

nohope91 commented 5 years ago

Well, I copied the original python2.7-config from its default path "/usr/bin" to the path of r2-bindings But still have almost the same error log :

root@kali:~/Downloads/radare2-bindings-3.1.0# PYTHON_CONFIG=python2.7-config make install mkdir -p /usr/local/share/vala/vapi /usr/bin/install -m 644 vapi/.vapi vapi/.deps /usr/local/share/vala/vapi make -C libr/lang/p install make[1]: Entering directory '/root/Downloads/radare2-bindings-3.1.0/libr/lang/p' r2: symbol lookup error: r2: undefined symbol: r_magic_version r2: symbol lookup error: r2: undefined symbol: r_magic_version r2: symbol lookup error: r2: undefined symbol: r_magic_version r2: symbol lookup error: r2: undefined symbol: r_magic_version mkdir -p / [ -n "ls *.so" ] && cp -f .so / || true cp -f radare.lua / make[1]: Leaving directory '/root/Downloads/radare2-bindings-3.1.0/libr/lang/p' test -f python/_r_core.so E=so ; \ if [ Linux = Darwin ];then \ for a in python/.dylib ; do cp $a echo $a | sed -e s,dylib,so, ; done ; \ E=so ; \ fi ; \ echo "Installing python/usr/bin/python2.7-config r2 modules in /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2" ; \ mkdir -p /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2 ; \ : > /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2/init.py ; \ cp -rf python/r_.py python/.$E /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2 Installing python/usr/bin/python2.7-config r2 modules in /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2 /bin/sh: 7: --help: not found /bin/sh: 7: --ldflags: not found /bin/sh: 7: --libs: not found /bin/sh: 7: --exec-prefix: not found /bin/sh: 7: --cflags: not found /bin/sh: 7: --includes: not found /bin/sh: 7: --extension-suffix: not found mkdir: unrecognized option '--prefix' Try 'mkdir --help' for more information. /bin/sh: 7: --configdir/r2: not found /bin/sh: 8: --cflags: not found /bin/sh: 8: /bin/sh: 8: --configdir/r2/init.py: not found --includes: not found /bin/sh: 8: --extension-suffix: not found /bin/sh: 8: --libs: not found /bin/sh: 8: --help: not found/bin/sh: 8: --exec-prefix: not found

/bin/sh: 8: --ldflags: not found /bin/sh: 9: --help: not found /bin/sh: 9: --ldflags: not found /bin/sh: 9: --libs: not found /bin/sh: 9: --exec-prefix: not found cp: unrecognized option '--prefix' Try 'cp --help' for more information. /bin/sh: 9: --configdir/r2: not found/bin/sh: 9: --cflags: not found

/bin/sh: 9: --includes: not found /bin/sh: 9: --extension-suffix: not found make: *** [Makefile:166: install-python] Error 127

I have EVERY PYTHON LIBRARY YOU COULD IMAGINE, TONS OF TONS & NOTHING CONFLICTS First I have installed all of those >> https://www.radare.org/r/down.html & I have installed all of the dependencies mentioned in the r2-bindings README file

I am really sorry for this stupidity, but after a daily attempting for a month, now I really surrender & now I must ask for your help :'( I can't figure it out, this is MADNESS !!!!!!! IT CAUSES A PERMANENT HEADACHE TO ME X_X

radare commented 5 years ago

Wtf why did you did that?

On 15 Dec 2018, at 19:27, nohope91 notifications@github.com wrote:

Well, I copied the original python2.7-config from its default path "/usr/bin" to the path of r2-bindings But still have almost the same error log :

root@kali:~/Downloads/radare2-bindings-3.1.0# PYTHON_CONFIG=python2.7-config make install mkdir -p /usr/local/share/vala/vapi /usr/bin/install -m 644 vapi/.vapi vapi/.deps /usr/local/share/vala/vapi make -C libr/lang/p install make[1]: Entering directory '/root/Downloads/radare2-bindings-3.1.0/libr/lang/p' r2: symbol lookup error: r2: undefined symbol: r_magic_version r2: symbol lookup error: r2: undefined symbol: r_magic_version r2: symbol lookup error: r2: undefined symbol: r_magic_version r2: symbol lookup error: r2: undefined symbol: r_magic_version mkdir -p / [ -n "ls *.so" ] && cp -f .so / || true cp -f radare.lua / make[1]: Leaving directory '/root/Downloads/radare2-bindings-3.1.0/libr/lang/p' test -f python/_rcore.so E=so ; if [ Linux = Darwin ];then for a in python/.dylib ; do cp $a echo $a | sed -e s,dylib,so, ; done ; E=so ; fi ; echo "Installing python/usr/bin/python2.7-config r2 modules in /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2" ; mkdir -p /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2 ; : > /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2/init.py ; cp -rf python/r.py python/.$E /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2 Installing python/usr/bin/python2.7-config r2 modules in /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2 /bin/sh: 7: --help: not found /bin/sh: 7: --ldflags: not found /bin/sh: 7: --libs: not found /bin/sh: 7: --exec-prefix: not found /bin/sh: 7: --cflags: not found /bin/sh: 7: --includes: not found /bin/sh: 7: --extension-suffix: not found mkdir: unrecognized option '--prefix' Try 'mkdir --help' for more information. /bin/sh: 7: --configdir/r2: not found /bin/sh: 8: --cflags: not found /bin/sh: 8: /bin/sh: 8: --configdir/r2/init.py: not found --includes: not found /bin/sh: 8: --extension-suffix: not found /bin/sh: 8: --libs: not found /bin/sh: 8: --help: not found/bin/sh: 8: --exec-prefix: not found

/bin/sh: 8: --ldflags: not found /bin/sh: 9: --help: not found /bin/sh: 9: --ldflags: not found /bin/sh: 9: --libs: not found /bin/sh: 9: --exec-prefix: not found cp: unrecognized option '--prefix' Try 'cp --help' for more information. /bin/sh: 9: --configdir/r2: not found/bin/sh: 9: --cflags: not found

/bin/sh: 9: --includes: not found /bin/sh: 9: --extension-suffix: not found make: *** [Makefile:166: install-python] Error 127

I have EVERY PYTHON LIBRARY YOU COULD IMAGINE, TONS OF TONS & NOTHING CONFLICTS First I have installed all of those >> https://www.radare.org/r/down.html & I have installed all of the dependencies mentioned in the r2-bindings README file

I am really sorry for this stupidity, but after a daily attempting for a month, now I really surrender & now I must ask for your help :'( I can't figure it out, this is MADNESS !!!!!!! IT CAUSES A PERMANENT HEADACHE TO ME X_X

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

radare commented 5 years ago

This error message is pretty clear. Your r2 is not built correctly or have library issues

On 15 Dec 2018, at 19:27, nohope91 notifications@github.com wrote:

Well, I copied the original python2.7-config from its default path "/usr/bin" to the path of r2-bindings But still have almost the same error log :

root@kali:~/Downloads/radare2-bindings-3.1.0# PYTHON_CONFIG=python2.7-config make install mkdir -p /usr/local/share/vala/vapi /usr/bin/install -m 644 vapi/.vapi vapi/.deps /usr/local/share/vala/vapi make -C libr/lang/p install make[1]: Entering directory '/root/Downloads/radare2-bindings-3.1.0/libr/lang/p' r2: symbol lookup error: r2: undefined symbol: r_magic_version r2: symbol lookup error: r2: undefined symbol: r_magic_version r2: symbol lookup error: r2: undefined symbol: r_magic_version r2: symbol lookup error: r2: undefined symbol: r_magic_version mkdir -p / [ -n "ls *.so" ] && cp -f .so / || true cp -f radare.lua / make[1]: Leaving directory '/root/Downloads/radare2-bindings-3.1.0/libr/lang/p' test -f python/_rcore.so E=so ; if [ Linux = Darwin ];then for a in python/.dylib ; do cp $a echo $a | sed -e s,dylib,so, ; done ; E=so ; fi ; echo "Installing python/usr/bin/python2.7-config r2 modules in /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2" ; mkdir -p /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2 ; : > /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2/init.py ; cp -rf python/r.py python/.$E /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2 Installing python/usr/bin/python2.7-config r2 modules in /Usage: /usr/bin/python2.7-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir/r2 /bin/sh: 7: --help: not found /bin/sh: 7: --ldflags: not found /bin/sh: 7: --libs: not found /bin/sh: 7: --exec-prefix: not found /bin/sh: 7: --cflags: not found /bin/sh: 7: --includes: not found /bin/sh: 7: --extension-suffix: not found mkdir: unrecognized option '--prefix' Try 'mkdir --help' for more information. /bin/sh: 7: --configdir/r2: not found /bin/sh: 8: --cflags: not found /bin/sh: 8: /bin/sh: 8: --configdir/r2/init.py: not found --includes: not found /bin/sh: 8: --extension-suffix: not found /bin/sh: 8: --libs: not found /bin/sh: 8: --help: not found/bin/sh: 8: --exec-prefix: not found

/bin/sh: 8: --ldflags: not found /bin/sh: 9: --help: not found /bin/sh: 9: --ldflags: not found /bin/sh: 9: --libs: not found /bin/sh: 9: --exec-prefix: not found cp: unrecognized option '--prefix' Try 'cp --help' for more information. /bin/sh: 9: --configdir/r2: not found/bin/sh: 9: --cflags: not found

/bin/sh: 9: --includes: not found /bin/sh: 9: --extension-suffix: not found make: *** [Makefile:166: install-python] Error 127

I have EVERY PYTHON LIBRARY YOU COULD IMAGINE, TONS OF TONS & NOTHING CONFLICTS First I have installed all of those >> https://www.radare.org/r/down.html & I have installed all of the dependencies mentioned in the r2-bindings README file

I am really sorry for this stupidity, but after a daily attempting for a month, now I really surrender & now I must ask for your help :'( I can't figure it out, this is MADNESS !!!!!!! IT CAUSES A PERMANENT HEADACHE TO ME X_X

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

nohope91 commented 5 years ago

Did what Sir ??? I have followed the instructions exactly step by step from this link : https://www.radare.org/r/down.html I don't even have any library issues, otherwise Kali Linux will tell me about the conflict whenever I do my daily system update Anyway, I will try to uninstall R2 completely from the system & rebuild & reinstall it again :) Hehehe, sorry for bullshit Sir :(

radare commented 5 years ago

it works for me, so i assume its a problem in your r2 installation.

the help message u get in there should come from "${PYTHON} mp.py", but i dont see why that shuold fail unless you have a broken python installation or environment

radare commented 5 years ago

purge the debian package from Kali. and install r2 from git, clone the repo and run sys/install.sh

nohope91 commented 5 years ago

I did everything & still getting the same error log T_T Reinstalled Kali, upgraded, & dist-upgraded like 9 times in the last 40 days & switched many times between x86/x64 because someone on the web had a similar issue & he solved it when switched to x86 system Anyway Sir, your assumption is right, my GODDAMN problem was in my R2 installation First, I had to completely remove all the old related packages that were installed with the full system upgrade/dist-upgrade >> using ( dpkg -l | grep radare ) BIG THANKS @mossberg for mentioning that in this post : https://github.com/radare/radare2/issues/2182 Second, MY REAL PROBLEM THAT I WAS MISSING NECESSARY PYTHON PACKAGES, which are : python2.7-dbg python2.7-dev python2.7-examples Obviously having python2.7 is NOT ENOUGH & Actually I had them when I told you that I have EVERY PYTHON LIBRARY YOU COULD IMAGINE, TONS OF TONS & NOTHING CONFLICTS ,, but I have been executing the wrong commands !!!!!

The default CORRECT COMMAND LINES as mentioned in https://www.radare.org/r/down.html are respectively : ~ $ git clone https://github.com/radare/radare2-bindings ~ $ cd radare2-bindings ~ $ ./configure --prefix=/usr OR IN MY CASE >> ./configure --prefix=/usr --enable=python ~ $ cd python ~/python $ make OR >> PYTHON_CONFIG=python2.7-config make ~/python $ make install

Instead of (make install) I have been executing >> PYTHON_CONFIG=python2.7-config make install Which is everytime throwing the above error X_X

I want to thank you so much Sir & I'm kindly asking you to forgive me for this shit xD I'm VERY HAPPY to see this issue solved FINALLY ^_^ I wish you all a happy end of year ;)

radare commented 5 years ago

welcome to the python hell

On 22 Dec 2018, at 11:02, nohope91 notifications@github.com wrote:

I did everything & still gettings the same error log T_T Reinstalled Kali, upgraded, & dist-upgraded like 9 times in the last 40 days & switched many times between x86/x64 because someone on the web had a similar issue & he solved it when switched to x86 system Anyway Sir, your assumption is right, my GODDAMN problem was in my R2 installation First, I had to completely remove all the old related packages that were installed with the full system upgrade/dist-upgrade >> using ( dpkg -l | grep radare ) BIG THANKS @mossberg https://github.com/mossberg for mentioning that in this post : radare/radare2#2182 https://github.com/radare/radare2/issues/2182 Second, MY REAL PROBLEM THAT I WAS MISSING NECESSARY PYTHON PACKAGES, which are : python2.7-dbg python2.7-dev python2.7-examples Obviously having python2.7 is NOT ENOUGH & Actually I had them when I told you that I have EVERY PYTHON LIBRARY YOU COULD IMAGINE, TONS OF TONS & NOTHING CONFLICTS ,, but I was executing the wrong commands !!!!! The default correct command lines are respectively : ~ $ git clone https://github.com/radare/radare2-bindings https://github.com/radare/radare2-bindings ~ $ cd radare2-bindings ~ $ ./configure --prefix=/usr OR IN MY CASE >> ./configure –prefix=/usr –enable=python ~ $ cd python ~/python $ make OR >> PYTHON_CONFIG=python2.7-config make ~/python $ make install

Instead of (make install) I have been executing >> PYTHON_CONFIG=python2.7-config make install Which is everytime throwing the above error X_X

I want to thank you so much Sir & I'm kindly asking you to forgive me for this shit xD I'm VERY HAPPY to see this issue solved FINALLY ^^ I wish you all a happy end of year *^

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/radare/radare2-bindings/issues/153#issuecomment-449559494, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3-lrIRRLGczIQeB4c-uwtXC2_d0B7Zks5u7gNHgaJpZM4MxIy8.