Skip to content

Make error (no match for ‘operator[]’, remove_const_t is not a member of std, compiler too old) #604

Open
@Hartvi

Description

@Hartvi

I'm sorry if an issue for this exists, but I haven't been able to find it. Also I haven't worked with libraries in C++ that much, sorry if this seems trivial.
I have installed eigen3 and libccd and now I want to install fcl.

These are the commands I used:

git clone [email protected]:libeigen/eigen.git
cd eigen
mkdir build
cd build
cmake ..
sudo make install
cd ../..
git clone [email protected]:danfis/libccd.git
cd libccd/src
make
sudo make install
cd ../..
git clone [email protected]:flexible-collision-library/fcl.git
cd fcl
mkdir build
cd build
cmake ..
make >out.txt 2>&1

The compiler throws an error in the make step.

I have gcc9, which means it should support C++14, which eigen seems to need.

gcc --version

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

.../fcl/build$ cmake ..

-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Set RPATH explicitly to '/usr/local/lib'
-- Performing Test _compiler_supports_sse
-- Performing Test _compiler_supports_sse - Success
-- Checking for one of the modules 'ccd;libccd'
-- Checking for module 'octomap'
--   No package 'octomap' found
-- FCL does not use OctoMap
-- Performing Test COMPILER_SUPPORTS_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- The C compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Python: /usr/bin/python3.8 (found version "3.8.10") found components: Interpreter 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/hartvi/Documents/CVUT/diploma_thesis/fcl/build

And in the make step it says this:

make >out.txt 2>&1

[  0%] Building CXX object src/CMakeFiles/fcl.dir/broadphase/broadphase_SSaP.cpp.o
In file included from /usr/local/include/eigen3/Eigen/Core:19,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/common/types.h:46,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/math/bv/AABB.h:41,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/geometry/collision_geometry.h:43,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/narrowphase/collision_object.h:43,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/broadphase/broadphase_collision_manager.h:44,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/broadphase/broadphase_SSaP.h:42,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/broadphase/broadphase_SSaP-inl.h:41,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/src/broadphase/broadphase_SSaP.cpp:38:
/usr/local/include/eigen3/Eigen/src/Core/util/Macros.h:711:2: error: #error This compiler appears to be too old to be supported by Eigen
  711 | #error This compiler appears to be too old to be supported by Eigen
      |  ^~~~~
In file included from /usr/local/include/eigen3/Eigen/Core:169,
                 from /usr/local/include/eigen3/Eigen/Dense:1,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/common/types.h:46,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/math/bv/AABB.h:41,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/geometry/collision_geometry.h:43,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/narrowphase/collision_object.h:43,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/broadphase/broadphase_collision_manager.h:44,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/broadphase/broadphase_SSaP.h:42,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/include/fcl/broadphase/broadphase_SSaP-inl.h:41,
                 from /home/hartvi/Documents/CVUT/diploma_thesis/fcl/src/broadphase/broadphase_SSaP.cpp:38:
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:143:37: error: ‘remove_const_t’ is not a member of ‘std’; did you mean ‘remove_const’?
  143 | struct is_void : is_same<void, std::remove_const_t<T>> {};
      |                                     ^~~~~~~~~~~~~~
      |                                     remove_const
/usr/local/include/eigen3/Eigen/src/Core/util/Meta.h:143:37: error: ‘remove_const_t’ is not a member of ‘std’; did you mean ‘remove_const’?
  143 | struct is_void : is_same<void, std::remove_const_t<T>> {};
      |                                     ^~~~~~~~~~~~~~
      |                                     remove_const

and so on for 10000 lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions