Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to build on gentoo #340

Open
rpolasek opened this issue Jan 25, 2024 · 1 comment
Open

failed to build on gentoo #340

rpolasek opened this issue Jan 25, 2024 · 1 comment

Comments

@rpolasek
Copy link

using gcc 13.2.1

[ 35%] Built target ghidra_libdecomp
[ 36%] Building CXX object CMakeFiles/core_ghidra.dir/src/core_ghidra.cpp.o
[ 36%] Building CXX object CMakeFiles/core_ghidra.dir/src/RizinArchitecture.cpp.o
[ 37%] Building CXX object CMakeFiles/core_ghidra.dir/src/RizinLoadImage.cpp.o
/usr/local/src/rz-ghidra/src/RizinLoadImage.cpp: In lambda function:
/usr/local/src/rz-ghidra/src/RizinLoadImage.cpp:47:69: error: no matching function for call to ‘rz_pvector_foreach_cpp<RzBinSection>(RzList*&, RizinLoadImage::getReadonly(ghidra::RangeList&) const::<lambda(RzSkylineItem*)>::<lambda(RzBinFile*)>::<lambda(RzBinSection*)>)’
   47 |                                 rz_pvector_foreach_cpp<RzBinSection>(bf->o->sections, [&](RzBinSection *sec) {
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   48 |                                         if(!sec->name || !sec->vsize)
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   49 |                                                 return true;
      |                                                 ~~~~~~~~~~~~         
   50 |                                         if(strstr(sec->name, "__objc_data") || strstr(sec->name, "__objc_classrefs") || strstr(sec->name, "__objc_msgrefs") ||
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   51 |                                                 strstr(sec->name, "__objc_selrefs") || strstr(sec->name, "__objc_superrefs") || strstr(sec->name, "__objc_protorefs"))
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   52 |                                                 list.insertRange(space, sec->vaddr, sec->vaddr + sec->vsize - 1);
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   53 |                                         return true;
      |                                         ~~~~~~~~~~~~                 
   54 |                                 });
      |                                 ~~                                   
In file included from /usr/local/src/rz-ghidra/src/RizinLoadImage.cpp:6:
/usr/local/src/rz-ghidra/src/RizinUtils.h:39:39: note: candidate: ‘template<class T, class F> bool rz_pvector_foreach_cpp(RzPVector*, const F&)’
   39 | template<typename T, typename F> bool rz_pvector_foreach_cpp(RzPVector *vec, const F &func)
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/src/rz-ghidra/src/RizinUtils.h:39:39: note:   template argument deduction/substitution failed:
/usr/local/src/rz-ghidra/src/RizinLoadImage.cpp:47:77: note:   cannot convert ‘bf->rz_bin_file_t::o->rz_bin_object_t::sections’ (type ‘RzList*’ {aka ‘rz_list_t*’}) to type ‘RzPVector*’ {aka ‘rz_pvector_t*’}
   47 |                                 rz_pvector_foreach_cpp<RzBinSection>(bf->o->sections, [&](RzBinSection *sec) {
      |                                                                      ~~~~~~~^~~~~~~~
make[2]: *** [CMakeFiles/core_ghidra.dir/build.make:104: CMakeFiles/core_ghidra.dir/src/RizinLoadImage.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:136: CMakeFiles/core_ghidra.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
[  1%] Built target pugixml
[  6%] Built target ghidra_base
[ 29%] Built target ghidra_decompiler
[ 34%] Built target ghidra_sleigh
[ 35%] Built target ghidra_libdecomp
[ 36%] Building CXX object CMakeFiles/core_ghidra.dir/src/RizinLoadImage.cpp.o
/usr/local/src/rz-ghidra/src/RizinLoadImage.cpp: In lambda function:
/usr/local/src/rz-ghidra/src/RizinLoadImage.cpp:47:69: error: no matching function for call to ‘rz_pvector_foreach_cpp<RzBinSection>(RzList*&, RizinLoadImage::getReadonly(ghidra::RangeList&) const::<lambda(RzSkylineItem*)>::<lambda(RzBinFile*)>::<lambda(RzBinSection*)>)’
   47 |                                 rz_pvector_foreach_cpp<RzBinSection>(bf->o->sections, [&](RzBinSection *sec) {
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   48 |                                         if(!sec->name || !sec->vsize)
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   49 |                                                 return true;
      |                                                 ~~~~~~~~~~~~         
   50 |                                         if(strstr(sec->name, "__objc_data") || strstr(sec->name, "__objc_classrefs") || strstr(sec->name, "__objc_msgrefs") ||
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   51 |                                                 strstr(sec->name, "__objc_selrefs") || strstr(sec->name, "__objc_superrefs") || strstr(sec->name, "__objc_protorefs"))
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   52 |                                                 list.insertRange(space, sec->vaddr, sec->vaddr + sec->vsize - 1);
      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   53 |                                         return true;
      |                                         ~~~~~~~~~~~~                 
   54 |                                 });
      |                                 ~~                                   
In file included from /usr/local/src/rz-ghidra/src/RizinLoadImage.cpp:6:
/usr/local/src/rz-ghidra/src/RizinUtils.h:39:39: note: candidate: ‘template<class T, class F> bool rz_pvector_foreach_cpp(RzPVector*, const F&)’
   39 | template<typename T, typename F> bool rz_pvector_foreach_cpp(RzPVector *vec, const F &func)
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/src/rz-ghidra/src/RizinUtils.h:39:39: note:   template argument deduction/substitution failed:
/usr/local/src/rz-ghidra/src/RizinLoadImage.cpp:47:77: note:   cannot convert ‘bf->rz_bin_file_t::o->rz_bin_object_t::sections’ (type ‘RzList*’ {aka ‘rz_list_t*’}) to type ‘RzPVector*’ {aka ‘rz_pvector_t*’}
   47 |                                 rz_pvector_foreach_cpp<RzBinSection>(bf->o->sections, [&](RzBinSection *sec) {
      |                                                                      ~~~~~~~^~~~~~~~
make[2]: *** [CMakeFiles/core_ghidra.dir/build.make:104: CMakeFiles/core_ghidra.dir/src/RizinLoadImage.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:136: CMakeFiles/core_ghidra.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
@XVilka
Copy link
Member

XVilka commented Jan 26, 2024

Thanks for reporting this! It is because we refactored and continue to refactor some of the Rizin APIs:

We will update rz-ghidra code once this refactoring is complete to avoid double work. We plan the release soon, so stay tuned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants