Compile error with Ubuntu 16.04
astronaut71 opened this issue · 8 comments
Hi
I was following the usage guide to compile the source https://storm-irit.github.io/OpenGR/a00002.html#usage But then when
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install
I got this errors:
CMake Error in tests/CMakeLists.txt:
Specified unknown feature "cxx_std_17" for target "pair_extraction".
CMake Error in tests/CMakeLists.txt:
Specified unknown feature "cxx_std_17" for target "matching3pcs".
CMake Error in tests/CMakeLists.txt:
Specified unknown feature "cxx_std_17" for target "matching".
CMake Error in apps/Super4PCS/CMakeLists.txt:
Specified unknown feature "cxx_std_17" for target "Super4PCS".
CMake Error in apps/PCLWrapper/CMakeLists.txt:
Specified unknown feature "cxx_std_17" for target "OpenGR-PCLWrapper".
CMake Error in apps/ExtPointBinding/CMakeLists.txt:
Specified unknown feature "cxx_std_17" for target "ExtPointBinding".
Then with make install
got this error:
$ make install
[ 62%] Built target opengr_apps_io
[ 62%] Built target opengr
[ 62%] Linking CXX executable Super4PCS
[ 62%] Built target Super4PCS
[ 62%] Building CXX object apps/PCLWrapper/CMakeFiles/OpenGR-PCLWrapper.dir/main.cpp.o
/home/admini/darknet_ros/src/OpenGR/apps/PCLWrapper/main.cpp:2:29: fatal error: pcl/point_types.h: No such file or directory
Im using ubuntu 16.04 and have PCL 1.8 installed and also used without any problem
Any help?
Dear @astronaut71 ,
You need a compiler supporting C++17, which does not seems to be the case according to the cmake log.
Im using gcc 7.5/.0 and that one should support c++17 right? What can be the problem then?
I fix it with installing cmake 3.17. But now have other error
CMakeFiles/OpenGR-PCLWrapper.dir/main.cpp.o:(.data.rel.ro._ZTVN3pcl6search6SearchINS_11PointNormalEEE[_ZTVN3pcl6search6SearchINS_11PointNormalEEE]+0x20): undefined reference to
pcl::search::Searchpcl::PointNormal::getNameabi:cxx11 const'
CMakeFiles/OpenGR-PCLWrapper.dir/main.cpp.o:(.data.rel.ro._ZTVN3pcl6search6KdTreeINS_11PointNormalENS_11KdTreeFLANNIS2_N5flann9L2_SimpleIfEEEEEE[_ZTVN3pcl6search6KdTreeINS_11PointNormalENS_11KdTreeFLANNIS2_N5flann9L2_SimpleIfEEEEEE]+0x20): undefined reference to pcl::search::Search<pcl::PointNormal>::getName[abi:cxx11]() const' collect2: error: ld returned 1 exit status apps/PCLWrapper/CMakeFiles/OpenGR-PCLWrapper.dir/build.make:186: recipe for target 'apps/PCLWrapper/OpenGR-PCLWrapper' failed make[2]: *** [apps/PCLWrapper/OpenGR-PCLWrapper] Error 1 CMakeFiles/Makefile2:1515: recipe for target 'apps/PCLWrapper/CMakeFiles/OpenGR-PCLWrapper.dir/all' failed make[1]: *** [apps/PCLWrapper/CMakeFiles/OpenGR-PCLWrapper.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *** [all] Error 2
What can be this now? Any help?
Did you delete the cmake cache directory when you updated cmake ?
Could you also try this: PointCloudLibrary/pcl#2406 (comment) and see if ity solves your problem ? (add the include directive in pclwrapper/main.cpp). I'll update the code if needed.
No. Didnt delete cmake cashe dir. How to delete it? Where is located cmake cashe dir? I fix it with adding in main.cpp #ifndef PCL_NO_PRECOMPILE #include <pcl/impl/instantiate.hpp> #include <pcl/point_types.h> PCL_INSTANTIATE(Search, PCL_POINT_TYPES) #endif // PCL_NO_PRECOMPIL
Also, I think the PCL version affects it. Previously was using 1,7 and now installed 1.8. But not sure how to delete the 1.7.
Now I have a problem when trying to use it in ROS. I followed the https://github.com/STORM-IRIT/OpenGR/issues/28 but got an error : `CMake Error at key_points/CMakeLists.txt:24 (find_package):
By not providing "FindOpenGR.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenGR", but
CMake did not find one.
Could not find a package configuration file provided by "OpenGR" with any
of the following names:
OpenGRConfig.cmake
opengr-config.cmake
Add the installation prefix of "OpenGR" to CMAKE_PREFIX_PATH or set
"OpenGR_DIR" to a directory containing one of the above files. If "OpenGR"
provides a separate development `
should I open a new issue regarding the ROS problem?
Yes please.