Closed bindt closed 1 year ago
Are you building iaito against a 3 year old version of r2?
Well, perhaps I missed something. Downloaded sources from this branch, read readme, what says ## Building from sources
./configure
make
make run
followed, and got compilation error. As far I can see there is no configuration option for r2 directory so I guess it should be compiled as standalone branch. Correct me where I am wrong.
Iaito depends on radare2 and the rcodemeta struct was defined 3 yars ago. So my guess is that you are using an old version of r2. Try installing it from git or any recent release
Ok, r2 was compiled from sources as well
radare2 4.3.1 0 @ linux-x86-64 git.4.3.1 commit: HEAD build: 2023-03-06__17:13:23
is it suitable version?
No, r2-4.3 was released in 2020, thats quite a long time ago and lots of things has changed in r2 since then. Last release is 5.8.2 and this week i'll cut 5.8.4. I dont think you can compile iaito with anything lower than r2-5.6
you need r2-5.6 or r2-5.7 at least. but i dont see a reason why not use the latest release
5.19.0-32-generic #33~22.04.1-Ubuntu SMP
g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Using Qt version 5.15.8 in /usr/lib/x86_64-linux-gnu
~~~~ ../src/common/Decompiler.h:33:13: error: 'RCodeMeta' does not name a type 33~~~~ ../src/common/Decompiler.h:37:19: error: 'RCodeMeta' has not been declared 37~~~~ ../src/common/Decompiler.h:49:5: error: 'RCodeMeta' does not name a type 49~~~~ ../src/core/Iaito.cpp: In member function 'bool IaitoCore::loadFile(QString, long long unsigned int, long long unsigned int, int, int, bool, bool, const QString&)': ../src/core/Iaito.cpp:613:5: error: 'r_config_set_b' was not declared in this scope; did you mean 'r_config_set_i'? 613~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~In file included from /usr/local/include/libr/r_parse.h:8, from /usr/local/include/libr/r_asm.h:9, from /usr/local/include/libr/r_egg.h:4, from /usr/local/include/libr/r_core.h:15, from ../src/core/IaitoCommon.h:8, from ../src/common/TempConfig.h:5, from ../src/core/Iaito.cpp:13: /usr/local/include/libr/r_anal.h:1624:37: note: initializing argument 1 of 'int r_anal_var_rename(RAnal, long long unsigned int, int, char, const char, const char, bool)' 1624 | R_API int r_anal_var_rename (RAnal a, ut64 var_addr, int scope, char kind, | IaitoCore::getRAsmPluginDescriptions()':
../src/core/Iaito.cpp:2596:29: error: 'RCore' {aka 'struct r_core_t'} has no member named 'rasm'
2596 | IaitoRListForeach(core->rasm->plugins, it, RAsmPlugin, ap) {
| ^~~~
../src/core/IaitoCommon.h:19:9: note: in definition of macro 'IaitoRListForeach'
19 | if (list) for (it = list->head; it && ((x=static_cast<type >(it->data))); it = it->n)
| ^~~~
../src/core/Iaito.cpp:2596:29: error: 'RCore' {aka 'struct r_core_t'} has no member named 'rasm'
2596 | IaitoRListForeach(core->rasm->plugins, it, RAsmPlugin, ap) {
../src/core/IaitoCommon.h:19:25: note: in definition of macro 'IaitoRListForeach'
19 | if (list) for (it = list->head; it && ((x=static_cast<type*>(it->data))); it = it->n)
| ^~~~
../src/core/Iaito.cpp: In member function 'QList IaitoCore::getRAnalPluginDescriptions()':
../src/core/Iaito.cpp:2628:27: error: 'RAnalPlugin' {aka 'struct r_anal_plugin_t'} has no member named 'cpus'
2628 | plugin.cpus = ap->cpus;
~~~^ ../src/core/Iaito.cpp: In member function 'void IaitoCore::setConfig(const char, bool)': ../src/core/Iaito.cpp:1049:5: error: 'r_config_set_b' was not declared in this scope; did you mean 'r_config_set_i'? 1049 | r_config_set_b (core->config, k, v); | ^~~~~~ | r_config_set_i ../src/core/Iaito.cpp: In member function 'QByteArray IaitoCore::assemble(const QString&)': ../src/core/Iaito.cpp:1154:42: error: 'RCore' {aka 'struct r_core_t'} has no member named 'rasm' 1154 | RAsmCode ac = r_asm_massemble(core->rasm, code.toUtf8().constData()); | ^~~~ ../src/core/Iaito.cpp: In member function 'QString IaitoCore::disassemble(const QByteArray&)': ../src/core/Iaito.cpp:1166:45: error: 'RCore' {aka 'struct r_core_t'} has no member named 'rasm' 1166 | RAsmCode ac = r_asm_mdisassemble(core->rasm, reinterpret_cast<const ut8 >(data.constData()), data.length()); | ^~~~ ../src/core/Iaito.cpp: In member function 'QJsonObject IaitoCore::getAddrRefs(RVA, int)': ../src/core/Iaito.cpp:1524:32: error: 'RCore' {aka 'struct r_core_t'} has no member named 'rasm' 1524 | r_asm_set_pc(core->rasm, addr); | ^~~~ ../src/core/Iaito.cpp:1525:37: error: 'RCore' {aka 'struct r_core_t'} has no member named 'rasm' 1525 | r_asm_disassemble(core->rasm, &op, (unsigned char)buf.data(), buf.size()); | ^~~~ In file included from ../src/common/TempConfig.h:5, from ../src/core/Iaito.cpp:13: ../src/core/Iaito.cpp: In member function 'QStringList IaitoCore::getAsmPluginNames()': ../src/core/Iaito.cpp:2462:29: error: 'RCore' {aka 'struct r_core_t'} has no member named 'rasm' 2462 | IaitoRListForeach(core->rasm->plugins, it, RAsmPlugin, ap) { | ^~~~ ../src/core/IaitoCommon.h:19:9: note: in definition of macro 'IaitoRListForeach' 19 | if (list) for (it = list->head; it && ((x=static_cast<type>(it->data))); it = it->n) | ^~~~ ../src/core/Iaito.cpp:2462:29: error: 'RCore' {aka 'struct r_core_t'} has no member named 'rasm' 2462 | IaitoRListForeach(core->rasm->plugins, it, RAsmPlugin, ap) { | ^~~~ ../src/core/IaitoCommon.h:19:25: note: in definition of macro 'IaitoRListForeach' 19 | if (list) for (it = list->head; it && ((x=static_cast<type>(it->data))); it = it->n) | ^~~~ ../src/core/Iaito.cpp: In member function 'QList../src/core/Iaito.cpp: In member function 'QList IaitoCore::getAllFunctions()':
../src/core/Iaito.cpp:2661:26: error: 'r_anal_function_count_edges' was not declared in this scope; did you mean 'r_anal_fcn_count_edges'?
2661 | function.edges = r_anal_function_count_edges(fcn, nullptr);
| ^
~~~~~~ | r_anal_fcn_count_edgesmake[1]: ** Waiting for unfinished jobs.... In file included from ../src/widgets/DecompilerWidget.h:9, from ../src/core/MainWindow.cpp:71: ../src/common/Decompiler.h:25:12: error: 'RCodeMeta' does not name a type 25 | static RCodeMeta makeWarning(QString warningMessage); | ^
~~~~ ../src/common/Decompiler.h:33:13: error: 'RCodeMeta' does not name a type 33 | virtual RCodeMeta decompileSync(RVA addr) =0; | ^~~~~ ../src/common/Decompiler.h:37:19: error: 'RCodeMeta' has not been declared 37 | void finished(RCodeMeta codeDecompiled); | ^~~~~ ../src/common/Decompiler.h:49:5: error: 'RCodeMeta' does not name a type 49 | RCodeMeta decompileSync(RVA addr) override; | ^~~~~ In file included from ../src/core/MainWindow.cpp:71: ../src/widgets/DecompilerWidget.h:57:32: error: 'RCodeMeta' has not been declared 57 | void decompilationFinished(RCodeMeta code); | ^~~~~ ../src/widgets/DecompilerWidget.h:79:21: error: 'RCodeMeta' was not declared in this scope 79 | std::unique_ptr<RCodeMeta, void ()(RCodeMeta )> code; | ^~~~~ ../src/widgets/DecompilerWidget.h:79:53: error: template argument 1 is invalid 79 | std::unique_ptr<RCodeMeta, void ()(RCodeMeta )> code; | ^ ../src/widgets/DecompilerWidget.h:79:53: error: template argument 2 is invalid In file included from ../src/core/MainWindow.cpp:71: ../src/widgets/DecompilerWidget.h:196:31: error: 'RCodeMeta' has not been declared 196 | void gatherBreakpointInfo(RCodeMeta &codeDecompiled, size_t startPos, size_t endPos); | ^~~~~ ../src/widgets/DecompilerWidget.h:238:18: error: 'RCodeMeta' has not been declared 238 | void setCode(RCodeMeta *code); | ^~~~~