zhangxy0517/3D-Registration-with-Maximal-Cliques

Linux version compiling error

jeff0908 opened this issue · 14 comments

thanks for your great contribution!!

here's a question , when i run linux version (igraph version=0.9.9,cmake version=3.25.2) it shows this message :

(base) kuan@DESKTOP-S32DOQL:/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/Release$ make
[ 14%] Building CXX object CMakeFiles/MAC.dir/PCR.cpp.o
/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/PCR.cpp: In function ‘void print_graph(igraph_t*)’:
/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/PCR.cpp:506:25: error: cannot convert ‘igraph_vector_t*’ to ‘igraph_vector_int_t*’
506 | igraph_get_edgelist(g, &el, 0);
| ^~~
| |
| igraph_vector_t*
In file included from /usr/local/include/igraph/igraph.h:69,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/Eva.h:34,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/PCR.cpp:16:
/usr/local/include/igraph/igraph_conversion.h:69:94: note: initializing argument 2 of ‘igraph_error_t igraph_get_edgelist(const igraph_t*, igraph_vector_int_t*, igraph_bool_t)’
69 | IGRAPH_EXPORT igraph_error_t igraph_get_edgelist(const igraph_t *graph, igraph_vector_int_t *res, igraph_bool_t bycol);
| ~~~~~~~~~~~~~~~~~~~~~^~~
make[2]: *** [CMakeFiles/MAC.dir/build.make:118: CMakeFiles/MAC.dir/PCR.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/MAC.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

i would like to figure out this error.
sincerely waiting your reply,thank you!!

The function print_graph is unused, just delete it and try again.

it has a little progress but it show another error!!
is there any function can instead igraph? it seems not a good one
here's the new error:

(base) kuan@DESKTOP-S32DOQL:/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/Release$ make
[ 14%] Building CXX object CMakeFiles/MAC.dir/PCR.cpp.o
[ 28%] Building CXX object CMakeFiles/MAC.dir/registration.cpp.o
/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp: In function ‘bool registration(const string&, std::string, std::string, const string&, const string&, const string&, const string&, const string&, double&, double&, double&, double&, double&, double&, double&, const string&, std::vector&)’:
/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp:767:67: error: invalid conversion from ‘int’ to ‘igraph_loops_t’ [-fpermissive]
767 | igraph_weighted_adjacency(&g, &g_mat, IGRAPH_ADJ_UNDIRECTED, 0, 1);
| ^
| |
| int
In file included from /usr/local/include/igraph/igraph.h:54,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/Eva.h:34,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp:14:
/usr/local/include/igraph/igraph_constructors.h:51:50: note: initializing argument 5 of ‘igraph_error_t igraph_weighted_adjacency(igraph_t*, const igraph_matrix_t*, igraph_adjacency_t, igraph_vector_t*, igraph_loops_t)’
51 | igraph_vector_t weights, igraph_loops_t loops);
| ~~~~~~~~~~~~~~~^~~~~
/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp:776:30: error: cannot convert ‘igraph_vector_ptr_t
’ {aka ‘s_vector_ptr*’} to ‘igraph_vector_int_list_t*’
776 | igraph_maximal_cliques(&g, &cliques, 3, 0); //3dlomatch 4 3dmatch; 3 Kitti 4
| ^~~~~~~~
| |
| igraph_vector_ptr_t* {aka s_vector_ptr*}
In file included from /usr/local/include/igraph/igraph.h:65,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/Eva.h:34,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp:14:
/usr/local/include/igraph/igraph_cliques.h:40:53: note: initializing argument 2 of ‘igraph_error_t igraph_maximal_cliques(const igraph_t*, igraph_vector_int_list_t*, igraph_integer_t, igraph_integer_t)’
40 | const igraph_t graph, igraph_vector_int_list_t res,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp: In function ‘bool registration(PointCloudPtr&, PointCloudPtr&, std::vector<Corre_3DMatch>&, std::vector&, std::string, float, float)’:
/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp:1231:69: error: invalid conversion from ‘int’ to ‘igraph_loops_t’ [-fpermissive]
1231 | igraph_weighted_adjacency(&g, &g_mat, IGRAPH_ADJ_UNDIRECTED, 0, 1);
| ^
| |
| int
In file included from /usr/local/include/igraph/igraph.h:54,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/Eva.h:34,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp:14:
/usr/local/include/igraph/igraph_constructors.h:51:50: note: initializing argument 5 of ‘igraph_error_t igraph_weighted_adjacency(igraph_t
, const igraph_matrix_t
, igraph_adjacency_t, igraph_vector_t*, igraph_loops_t)’
51 | igraph_vector_t weights, igraph_loops_t loops);
| ~~~~~~~~~~~~~~~^~~~~
/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp:1240:32: error: cannot convert ‘igraph_vector_ptr_t
’ {aka ‘s_vector_ptr*’} to ‘igraph_vector_int_list_t*’
1240 | igraph_maximal_cliques(&g, &cliques, 3, 0); //3dlomatch 4 3dmatch; 3 Kitti 4
| ^~~~~~~~
| |
| igraph_vector_ptr_t* {aka s_vector_ptr*}
In file included from /usr/local/include/igraph/igraph.h:65,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/Eva.h:34,
from /mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/registration.cpp:14:
/usr/local/include/igraph/igraph_cliques.h:40:53: note: initializing argument 2 of ‘igraph_error_t igraph_maximal_cliques(const igraph_t*, igraph_vector_int_list_t*, igraph_integer_t, igraph_integer_t)’
40 | const igraph_t *graph, igraph_vector_int_list_t *res,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
make[2]: *** [CMakeFiles/MAC.dir/build.make:132: CMakeFiles/MAC.dir/registration.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/MAC.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

sincerely waiting your reply,thank you!!

It seems that igraph is not correctly configured. Please double check the version is 0.9.9 and reinstall.

yes i install igraph 0.9.9 and these command are used in my installation steps:

$ cd igraph
$ mkdir build
$ cd build
$ cmake ..
$ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/local
$ cmake --build .
$ cmake --build . --target check
$ cmake --install .

is this correct to install igraph?

thanks a lot for your reply! really helpful!!

cmake .. -DCMAKE_INSTALL_PREFIX=/opt/local is not needed after you run cmake ..

Are all the tests passed?
截图 2023-09-28 15-27-06

yes these tests are pass
result

That's quite strange.

Is the PCL version you installed 1.12? Please install 1.10.1

i'll try it thank you!

/mnt/d/Desktop/research/3D-Registration-with-Maximal-Cliques/Linux/PCR.cpp:506:25: error: cannot convert ‘igraph_vector_t*’ to ‘igraph_vector_int_t*’
506 | igraph_get_edgelist(g, &el, 0);

If you see this then you are (without any doubt) using igraph 0.10, not 0.9.

I'm wondering why a project shared on github 6 months ago was written for 0.9, given that that 0.10 final was released over a year ago. I recommend updating the project to work with 0.10 (which has many reliability improvements).

image
image

my pcl version is 1.10 and igraph version is 0.9.9
it's really weird !!

dear all:

i just fix every issue above.
thanks for everything!!

happy moon festival!!

Could you provide more insights? I've encountered many similar issues. @jeff0908

Could you provide more insights? I've encountered many similar issues. @jeff0908

Can u provide some error message that i can figure what kind of problem u need to fix @Rusullhu