ethz-asl / segmap

A map representation based on 3D segments
BSD 3-Clause "New" or "Revised" License
1.05k stars 394 forks source link

failed to build segmapper #150

Closed LiShuaixin closed 4 years ago

LiShuaixin commented 4 years ago

Hi, there, I am using Ubuntu 16.04 and ROS kinetic, and have compiled the latest tensorflow-master from source. Here are versions of tf and cude:

Tensorflow version: 1.14.0
Cuda version: 10.0.130

I met two build errors using the command catkin build segmapper throwing out as follow:

1.

Errors     << eigen_checks:cmake /home/lee/segmap_ws/logs/eigen_checks/build.cmake.002.log                                                                           
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:151 (message):
  skipping gtest 'test_gtest_near' in project 'eigen_checks' because gtest
  was not found
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:80 (_catkin_add_executable_with_google_test)
  /opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake:28 (_catkin_add_google_test)
  CMakeLists.txt:36 (catkin_add_gtest)

CMake Error at /home/lee/segmap_ws/src/eigen_checks/CMakeLists.txt:38 (target_link_libraries):
  Cannot specify link libraries for target "test_gtest_near" which is not
  built by this project.

cd /home/lee/segmap_ws/build/eigen_checks; catkin build --get-env eigen_checks | catkin env -si  /usr/bin/cmake /home/lee/segmap_ws/src/eigen_checks --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/lee/segmap_ws/devel -DCMAKE_INSTALL_PREFIX=/home/lee/segmap_ws/install -DCMAKE_BUILD_TYPE=Release; cd -

2.

/usr/include/boost/math/constants/constants.hpp:277:3: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
/usr/include/boost/math/constants/constants.hpp: In static member function ‘static constexpr T boost::math::constants::detail::constant_third<T>::get(const mpl_::int_<5>&)’:
/usr/include/boost/math/constants/constants.hpp:278:3: error: unable to find numeric literal operator ‘operator""Q’
   BOOST_DEFINE_MATH_CONSTANT(third, 3.333333333333333333333333333333333333e-01, "3.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-01")

It seems like problems related to gtest and boost. Dose anybody have some suggestion on this? Many thanks!!

LiShuaixin commented 4 years ago

The first error could be fixed as the instruction on the stack overflow post

LiShuaixin commented 4 years ago

The second issue could be solved by this post on stack overflow. Add -fext-numeric-literals at PCL_CXX_FLAGS in the pcl_catkin cmakelist.