nowsecure / r2frida

Radare2 and Frida better together.
MIT License
1.18k stars 121 forks source link

Error when building `io_frida.dylib` #59

Closed berkedel closed 7 years ago

berkedel commented 7 years ago

I try to install r2frida by executing r2pm install r2frida, but it gives me an error below.

syntax error: error in error handling
syntax error: error in error handling
Processing r2frida ...
Already up-to-date.
Install Done For r2frida
Makefile:1: config.mk: No such file or directory
./configure
checking build system type... x86_64-unknown-darwin
checking host system type... x86_64-unknown-darwin
checking target system type... x86_64-unknown-darwin
checking for working directories... current
using prefix '/usr/local'
checking for c compiler... gcc
checking for c++ compiler... g++
Using PKGCONFIG: pkg-config
checking pkg-config flags for r_core... yes
checking for curl... /usr/bin/curl
checking for wget... /usr/local/bin/wget
checking for git... /usr/bin/git
checking for xz... /usr/local/bin/xz
checking for node... /usr/local/bin/node
checking for npm... /usr/local/bin/npm
creating ./config.mk
cleaning temporally files... done

Final report:
 - WITH_CYLANG = 0
rm -f ext/frida
mkdir -p ext/frida-mac-9.1.26/_
curl -Ls https://github.com/frida/frida/releases/download/9.1.26/frida-core-devkit-9.1.26-mac-x86_64.tar.xz | xz -d | tar -C ext/frida-mac-9.1.26/_ -xf -
mv ext/frida-mac-9.1.26/_/* ext/frida-mac-9.1.26
rmdir ext/frida-mac-9.1.26/_
#mv ext/frida ext/frida-mac-9.1.26
cd ext && ln -fs frida-mac-9.1.26 frida
[ "`readlink ext/frida`" = frida-mac-9.1.26 ] || \
        (cd ext && rm -f frida ; ln -fs frida-mac-9.1.26 frida)
make io_frida.dylib
pkg-config --cflags r_core
-I/usr/local/Cellar/radare2/1.1.0_1/include/libr
c++ src/io_frida.o -o io_frida.dylib -shared -fPIC -L/usr/local/Cellar/radare2/1.1.0_1/lib -lr_core -lr_config -lr_cons -lr_io -lr_util -lr_flag -lr_asm -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 -lr_crypto -Wl,-no_compact_unwind ext/frida/libfrida-core.a -lresolv -framework Foundation -lbsm -framework AppKit
Undefined symbols for architecture x86_64:
  "_r_str_appendf", referenced from:
      _slurpFile in io_frida.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [io_frida.dylib] Error 1
make: *** [all] Error 2
ERROR: Build failed

Did I miss any steps here?

trufae commented 7 years ago

you have an old version of r2

On Mon, Apr 17, 2017 at 1:59 AM, Akhmad Syaikhul Hadi < notifications@github.com> wrote:

I try to install r2frida by executing r2pm install r2frida, but it gives me an error below.

syntax error: error in error handling syntax error: error in error handling Processing r2frida ... Already up-to-date. Install Done For r2frida Makefile:1: config.mk: No such file or directory ./configure checking build system type... x86_64-unknown-darwin checking host system type... x86_64-unknown-darwin checking target system type... x86_64-unknown-darwin checking for working directories... current using prefix '/usr/local' checking for c compiler... gcc checking for c++ compiler... g++ Using PKGCONFIG: pkg-config checking pkg-config flags for r_core... yes checking for curl... /usr/bin/curl checking for wget... /usr/local/bin/wget checking for git... /usr/bin/git checking for xz... /usr/local/bin/xz checking for node... /usr/local/bin/node checking for npm... /usr/local/bin/npm creating ./config.mk cleaning temporally files... done

Final report:

  • WITHCYLANG = 0 rm -f ext/frida mkdir -p ext/frida-mac-9.1.26/ curl -Ls https://github.com/frida/frida/releases/download/9.1.26/frida-core-devkit-9.1.26-mac-x86_64.tar.xz | xz -d | tar -C ext/frida-mac-9.1.26/ -xf - mv ext/frida-mac-9.1.26//* ext/frida-mac-9.1.26 rmdir ext/frida-mac-9.1.26/_

    mv ext/frida ext/frida-mac-9.1.26

    cd ext && ln -fs frida-mac-9.1.26 frida [ "readlink ext/frida" = frida-mac-9.1.26 ] || \ (cd ext && rm -f frida ; ln -fs frida-mac-9.1.26 frida) make io_frida.dylib pkg-config --cflags r_core -I/usr/local/Cellar/radare2/1.1.0_1/include/libr c++ src/io_frida.o -o io_frida.dylib -shared -fPIC -L/usr/local/Cellar/radare2/1.1.0_1/lib -lr_core -lr_config -lr_cons -lr_io -lr_util -lr_flag -lr_asm -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 -lr_crypto -Wl,-no_compact_unwind ext/frida/libfrida-core.a -lresolv -framework Foundation -lbsm -framework AppKit Undefined symbols for architecture x86_64: "_r_str_appendf", referenced from: _slurpFile in io_frida.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [io_frida.dylib] Error 1 make: [all] Error 2 ERROR: Build failed

Did I miss any steps here?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nowsecure/r2frida/issues/59, or mute the thread https://github.com/notifications/unsubscribe-auth/AGIjG36SwmDHxUHsLRf_tPbJbjdlMJmBks5rwqtvgaJpZM4M-xIU .

berkedel commented 7 years ago

Should I install radare2 from repository instead of homebrew?

After build and install from latest version, I got no error. Thanks @trufae

radare commented 7 years ago

Or wait for today's 1.4 release

On 17 Apr 2017, at 03:08, Akhmad Syaikhul Hadi notifications@github.com wrote:

Should I install radare2 from repository instead of homebrew?

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