nowsecure / r2frida

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

Build Failed "error: ‘RIO’ {aka ‘struct r_io_t’} has no member named ‘corebind’" #246

Closed Cibertus closed 4 years ago

Cibertus commented 4 years ago

Getting the following error when trying to install with r2pm:

german@ubuntu:~$ r2pm -ci r2frida Cleaning r2frida... Cloning into 'r2frida'... remote: Enumerating objects: 77, done. remote: Counting objects: 100% (77/77), done. remote: Compressing objects: 100% (72/72), done. remote: Total 77 (delta 1), reused 41 (delta 0), pack-reused 0 Unpacking objects: 100% (77/77), 146.59 KiB | 777.00 KiB/s, done. Submodule 'ext/swift-frida' (https://github.com/trufae/swift-frida.git) registered for path 'ext/swift-frida' Cloning into '/home/german/.local/share/radare2/r2pm/git/r2frida/ext/swift-frida'... remote: Enumerating objects: 676, done.
remote: Total 676 (delta 0), reused 0 (delta 0), pack-reused 676
Receiving objects: 100% (676/676), 247.51 KiB | 844.00 KiB/s, done. Resolving deltas: 100% (446/446), done. Submodule path 'ext/swift-frida': checked out '23523bc23f2daecac0b7a67738d715b425660cc8' clean Done For r2frida /home/german/.local/share/radare2/r2pm/db/r2frida TGZ= Cleaning up /home/german/.local/share/radare2/r2pm/git//r2frida... Cloning into 'r2frida'... remote: Enumerating objects: 77, done. remote: Counting objects: 100% (77/77), done. remote: Compressing objects: 100% (72/72), done. remote: Total 77 (delta 1), reused 41 (delta 0), pack-reused 0 Unpacking objects: 100% (77/77), 146.59 KiB | 521.00 KiB/s, done. Submodule 'ext/swift-frida' (https://github.com/trufae/swift-frida.git) registered for path 'ext/swift-frida' Cloning into '/home/german/.local/share/radare2/r2pm/git/r2frida/ext/swift-frida'... remote: Enumerating objects: 676, done.
remote: Total 676 (delta 0), reused 0 (delta 0), pack-reused 676
Receiving objects: 100% (676/676), 247.51 KiB | 590.00 KiB/s, done. Resolving deltas: 100% (446/446), done. Submodule path 'ext/swift-frida': checked out '23523bc23f2daecac0b7a67738d715b425660cc8' Install Done For r2frida ./configure 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/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/bin/wget checking for git... /usr/bin/git checking for xz... /usr/bin/xz checking for node... /usr/bin/node checking for npm... /usr/bin/npm creating ./config.mk creating ./config.h cleaning temporally files... done

Final report:

core-js@2.6.11 postinstall /home/german/.local/share/radare2/r2pm/git/r2frida/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

r2frida-agent@4.5.0 prepare /home/german/.local/share/radare2/r2pm/git/r2frida npm run build

r2frida-agent@4.5.0 build /home/german/.local/share/radare2/r2pm/git/r2frida frida-compile -L -c src/agent -o src/_agent.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 567 packages from 267 contributors and audited 568 packages in 25.917s

28 packages are looking for funding run npm fund for details

found 334 low severity vulnerabilities run npm audit fix to fix them, or npm audit for details npm run build

r2frida-agent@4.5.0 build /home/german/.local/share/radare2/r2pm/git/r2frida frida-compile -L -c src/agent -o src/_agent.js

xxd -i < src/_agent.js > src/_agent.h cc -c -fPIC -g -I/usr/include/libr -I/usr/include/capstone -I/usr/include/libr -DWITH_CYLANG=0 -Iext/frida src/io_frida.c -o src/io_frida.o src/io_frida.c: In function ‘r_io_frida_new’: src/io_frida.c:127:17: error: ‘RIO’ {aka ‘struct r_io_t’} has no member named ‘corebind’ 127 rf->r2core = io->corebind.core; ^~ In file included from src/io_frida.c:15: src/io_frida.c: In function ‘r_io_frida_free’: ext/frida/frida-core.h:12840:18: warning: passing argument 1 of ‘_frida_g_object_unref’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers] 12840 (destroy) (_ptr); \ ^~~~ ext/frida/frida-core.h:29530:36: note: in expansion of macro ‘g_clear_pointer’ 29530 #define g_clear_object(object_ptr) g_clear_pointer ((object_ptr), g_object_unref) ^~~~~~~ src/io_frida.c:170:2: note: in expansion of macro ‘g_clear_object’ 170 g_clear_object (&rf->crash); ^~~~~~ In file included from src/io_frida.c:15: ext/frida/frida-core.h:29349:64: note: expected ‘gpointer’ {aka ‘void ’} but argument is of type ‘volatile FridaCrash ’ {aka ‘volatile struct _FridaCrash *’} 29349 void g_object_unref (gpointer object); ~~~~^~ src/io_frida.c: In function ‘__open’: src/io_frida.c:449:5: error: ‘RIO’ {aka ‘struct r_io_t’} has no member named ‘corebind’ 449 io->corebind.cmd (rf->r2core, autocompletions[i]); ^~ src/io_frida.c: In function ‘__system_continuation’: src/io_frida.c:732:26: warning: implicit declaration of function ‘r_str_trim_head_ro’; did you mean ‘r_str_trim_head’? [-Wimplicit-function-declaration] 732 gchar *path = strdup (r_str_trim_head_ro (command + 3)); ^~~~~~ r_str_trim_head src/io_frida.c:732:26: warning: passing argument 1 of ‘strdup’ makes pointer from integer without a cast [-Wint-conversion] 732 gchar *path = strdup (r_str_trim_head_ro (command + 3)); ^~~~~~~~
int

In file included from /usr/include/libr/r_types.h:210, from /usr/include/libr/r_main.h:6, from /usr/include/libr/r_core.h:6, from src/io_frida.c:3: /usr/include/string.h:167:14: note: expected ‘const char ’ but argument is of type ‘int’ 167 | extern char strdup (const char __s) | ^~ src/io_frida.c:772:23: warning: initialization of ‘const char ’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 772 | const char arg = r_str_trim_head_ro (command + 2); | ^~~~~~ src/io_frida.c: In function ‘exec_pending_cmd_if_needed’: src/io_frida.c:1301:23: error: ‘RIO’ {aka ‘struct r_io_t’} has no member named ‘corebind’ 1301 | char output = rf->io->corebind.cmdstr (rf->r2core, rf->pending_cmd->cmd_string); | ^~ make[1]: [Makefile:158: src/io_frida.o] Error 1 make[1]: Leaving directory '/home/german/.local/share/radare2/r2pm/git/r2frida' make: [Makefile:113: all] Error 2 ERROR: Build failed

trufae commented 4 years ago

Which version of r2 you have? 4.4 is the minimum requirement

On 19 Jul 2020, at 23:32, Cibertus notifications@github.com wrote:

 Getting the following error when trying to install with r2pm:

german@ubuntu:~$ r2pm -ci r2frida Cleaning r2frida... Cloning into 'r2frida'... remote: Enumerating objects: 77, done. remote: Counting objects: 100% (77/77), done. remote: Compressing objects: 100% (72/72), done. remote: Total 77 (delta 1), reused 41 (delta 0), pack-reused 0 Unpacking objects: 100% (77/77), 146.59 KiB | 777.00 KiB/s, done. Submodule 'ext/swift-frida' (https://github.com/trufae/swift-frida.git) registered for path 'ext/swift-frida' Cloning into '/home/german/.local/share/radare2/r2pm/git/r2frida/ext/swift-frida'... remote: Enumerating objects: 676, done. remote: Total 676 (delta 0), reused 0 (delta 0), pack-reused 676 Receiving objects: 100% (676/676), 247.51 KiB | 844.00 KiB/s, done. Resolving deltas: 100% (446/446), done. Submodule path 'ext/swift-frida': checked out '23523bc23f2daecac0b7a67738d715b425660cc8' clean Done For r2frida /home/german/.local/share/radare2/r2pm/db/r2frida TGZ= Cleaning up /home/german/.local/share/radare2/r2pm/git//r2frida... Cloning into 'r2frida'... remote: Enumerating objects: 77, done. remote: Counting objects: 100% (77/77), done. remote: Compressing objects: 100% (72/72), done. remote: Total 77 (delta 1), reused 41 (delta 0), pack-reused 0 Unpacking objects: 100% (77/77), 146.59 KiB | 521.00 KiB/s, done. Submodule 'ext/swift-frida' (https://github.com/trufae/swift-frida.git) registered for path 'ext/swift-frida' Cloning into '/home/german/.local/share/radare2/r2pm/git/r2frida/ext/swift-frida'... remote: Enumerating objects: 676, done. remote: Total 676 (delta 0), reused 0 (delta 0), pack-reused 676 Receiving objects: 100% (676/676), 247.51 KiB | 590.00 KiB/s, done. Resolving deltas: 100% (446/446), done. Submodule path 'ext/swift-frida': checked out '23523bc23f2daecac0b7a67738d715b425660cc8' Install Done For r2frida ./configure 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/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/bin/wget checking for git... /usr/bin/git checking for xz... /usr/bin/xz checking for node... /usr/bin/node checking for npm... /usr/bin/npm creating ./config.mk creating ./config.h cleaning temporally files... done

Final report:

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

mv ext/frida ext/frida-linux-12.10.0

cd ext && ln -fs frida-linux-12.10.0 frida [ "readlink ext/frida" = frida-linux-12.10.0 ] || (cd ext && rm -f frida ; ln -fs frida-linux-12.10.0 frida) make io_frida.so make[1]: Entering directory '/home/german/.local/share/radare2/r2pm/git/r2frida' mkdir -p node_modules npm i core-js@2.6.11 postinstall /home/german/.local/share/radare2/r2pm/git/r2frida/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

r2frida-agent@4.5.0 prepare /home/german/.local/share/radare2/r2pm/git/r2frida npm run build

r2frida-agent@4.5.0 build /home/german/.local/share/radare2/r2pm/git/r2frida frida-compile -L -c src/agent -o src/_agent.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 567 packages from 267 contributors and audited 568 packages in 25.917s

28 packages are looking for funding run npm fund for details

found 334 low severity vulnerabilities run npm audit fix to fix them, or npm audit for details npm run build

r2frida-agent@4.5.0 build /home/german/.local/share/radare2/r2pm/git/r2frida frida-compile -L -c src/agent -o src/_agent.js

xxd -i < src/_agent.js > src/_agent.h cc -c -fPIC -g -I/usr/include/libr -I/usr/include/capstone -I/usr/include/libr -DWITH_CYLANG=0 -Iext/frida src/io_frida.c -o src/io_frida.o src/io_frida.c: In function ‘r_io_frida_new’: src/io_frida.c:127:17: error: ‘RIO’ {aka ‘struct r_io_t’} has no member named ‘corebind’ 127 rf->r2core = io->corebind.core; ^~ In file included from src/io_frida.c:15: src/io_frida.c: In function ‘r_io_frida_free’: ext/frida/frida-core.h:12840:18: warning: passing argument 1 of ‘_frida_g_object_unref’ discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers] 12840 (destroy) (_ptr); ^~~~ ext/frida/frida-core.h:29530:36: note: in expansion of macro ‘g_clear_pointer’ 29530 #define g_clear_object(object_ptr) g_clear_pointer ((object_ptr), g_object_unref) ^~~~~~~ src/io_frida.c:170:2: note: in expansion of macro ‘g_clear_object’ 170 g_clear_object (&rf->crash); ^~~~~~ In file included from src/io_frida.c:15: ext/frida/frida-core.h:29349:64: note: expected ‘gpointer’ {aka ‘void ’} but argument is of type ‘volatile FridaCrash ’ {aka ‘volatile struct _FridaCrash *’} 29349 void g_object_unref (gpointer object); ~~~~^~ src/io_frida.c: In function ‘__open’: src/io_frida.c:449:5: error: ‘RIO’ {aka ‘struct r_io_t’} has no member named ‘corebind’ 449 io->corebind.cmd (rf->r2core, autocompletions[i]); ^~ src/io_frida.c: In function ‘__system_continuation’: src/io_frida.c:732:26: warning: implicit declaration of function ‘r_str_trim_head_ro’; did you mean ‘r_str_trim_head’? [-Wimplicit-function-declaration] 732 gchar *path = strdup (r_str_trim_head_ro (command + 3)); ^~~~~~ r_str_trim_head src/io_frida.c:732:26: warning: passing argument 1 of ‘strdup’ makes pointer from integer without a cast [-Wint-conversion] 732 gchar *path = strdup (r_str_trim_head_ro (command + 3)); ^~~~~~~~
int

In file included from /usr/include/libr/r_types.h:210, from /usr/include/libr/r_main.h:6, from /usr/include/libr/r_core.h:6, from src/io_frida.c:3: /usr/include/string.h:167:14: note: expected ‘const char ’ but argument is of type ‘int’ 167 | extern char strdup (const char __s) | ^~ src/io_frida.c:772:23: warning: initialization of ‘const char ’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 772 | const char arg = r_str_trim_head_ro (command + 2); | ^~~~~~ src/io_frida.c: In function ‘exec_pending_cmd_if_needed’: src/io_frida.c:1301:23: error: ‘RIO’ {aka ‘struct r_io_t’} has no member named ‘corebind’ 1301 | char output = rf->io->corebind.cmdstr (rf->r2core, rf->pending_cmd->cmd_string); | ^~ make[1]: [Makefile:158: src/io_frida.o] Error 1 make[1]: Leaving directory '/home/german/.local/share/radare2/r2pm/git/r2frida' make: [Makefile:113: all] Error 2 ERROR: Build failed

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

Cibertus commented 4 years ago

that worked, thanks!