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

Linux version compiling error #33

Open
jeff0908 opened this issue Sep 28, 2023 · 14 comments
Open

Linux version compiling error #33

jeff0908 opened this issue Sep 28, 2023 · 14 comments

Comments

@jeff0908
Copy link

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!!

@zhangxy0517
Copy link
Owner

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

@jeff0908
Copy link
Author

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!!

@zhangxy0517
Copy link
Owner

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

@jeff0908
Copy link
Author

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!!

@zhangxy0517
Copy link
Owner

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

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

@jeff0908
Copy link
Author

yes these tests are pass
result

@zhangxy0517
Copy link
Owner

That's quite strange.

@zhangxy0517
Copy link
Owner

Is the PCL version you installed 1.12? Please install 1.10.1

@jeff0908
Copy link
Author

i'll try it thank you!

@szhorvat
Copy link

/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).

@jeff0908
Copy link
Author

image
image

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

@jeff0908
Copy link
Author

dear all:

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

happy moon festival!!

@Rusullhu
Copy link

Rusullhu commented Nov 4, 2023

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

@jeff0908
Copy link
Author

jeff0908 commented Nov 6, 2023

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

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

4 participants