radareorg / r2ghidra

Native Ghidra Decompiler for r2

Home Page:https://www.radare.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error

Rhythm113 opened this issue · comments

Not sure if it's compiler side problem. I tried building with termux 64bit. I got these errors while building :

[1/109] Compiling C object libc...so.p/src_anal_ghidra_plugin.c.o
FAILED: libcore_r2ghidra.so.p/src_anal_ghidra_plugin.c.o
cc -Ilibcore_r2ghidra.so.p -I. -I.. -I../src -I../third-party/pugixml/src -I../ghidra-native/src/decompiler -I/data/data/com.termux/files/usr/include/libr -fcolor-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O0 -g -fPIC -MD -MQ libcore_r2ghidra.so.p/src_anal_ghidra_plugin.c.o -MF libcore_r2ghidra.so.p/src_anal_ghidra_plugin.c.o.d -o libcore_r2ghidra.so.p/src_anal_ghidra_plugin.c.o -c ../src/anal_ghidra_plugin.c
../src/anal_ghidra_plugin.c:66:10: error: incompatible function pointer types initializing 'int (*)(void )' with an expression of type 'bool ()(void )' [-Wincompatible-function-pointer-types]
.init = &sanal_init,
^~~~~~~~~~~
../src/anal_ghidra_plugin.c:67:10: error: incompatible function pointer types initializing 'int (
)(void )' with an expression of type 'bool ()(void )' [-Wincompatible-function-pointer-types]
.fini = &sanal_fini,
^~~~~~~~~~~
../src/anal_ghidra_plugin.c:68:14: error: incompatible function pointer types initializing 'int (
)(RAnal , int)' (aka 'int ()(struct r_anal_t , int)') with an expression of type 'int ()(RArchSession , uint32_t)' (aka 'int ()(struct r_arch_session_t *, unsigned int)') [-Wincompatible-function-pointer-types]
.archinfo = &archinfo,
^~~~~~~~~
3 errors generated.

What version of r2 are you using?

I'm using the latest version of radare2 on my termux. I checked all the packages & also tried self building with ninja & make. Same error.

Package: radare2
Version: 5.8.8

Ill add a ci job to test with previous releases. i merged api breaking changes yesterday. You have different options now:

  • Use r2pm -t to specify an older date and build the code from the working past
  • Wait few mins

Alright thanks for your response. Instead of installing the older date versions I'll wait for an update.

that's weird, it builds fine for me with r2-5.8.8. no warnings or so

I'm keep getting those error. It's probably caused while linking.

Seems like your compiler is treating warnings as errors even if -w is passed, but anyway, i just fixed those warnings and i think it should be working for you, can you confirm?

Thanks it worked & installed successfully.