rdiankov/openrave

Error when building code: 'error: ‘directory_options’ is not a member of ‘fs’; did you mean ‘directory_file’'

jstmn opened this issue · 1 comments

jstmn commented

Hi,

I'm getting the following error when trying to build this library:

[ 52%] Building CXX object src/libopenrave/CMakeFiles/libopenrave.dir/trajectory.cpp.o
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp: In member function ‘virtual int OpenRAVE::planningutils::DynamicsCollisionConstraint::Check(const std::vector<double>&, const std::vector<double>&, const std::vector<double>&, const std::vector<double>&, OpenRAVE::dReal, OpenRAVE::IntervalType, int, OpenRAVE::ConstraintFilterReturnPtr)’:
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp:2694:23: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
 2694 |         for (i = 0; i < params->GetDOF(); i++,itres++) {
      |                     ~~^~~~~~~~~~~~~~~~~~
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp:2737:23: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
 2737 |         for (i = 0; i < params->GetDOF(); i++,itres++) {
      |                     ~~^~~~~~~~~~~~~~~~~~
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp:2802:19: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
 2802 |     for (i = 0; i < params->GetDOF(); i++) {
      |                 ~~^~~~~~~~~~~~~~~~~~
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp:2910:35: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
 2910 |                     for( i = 0; i < numroots; ++i) {
      |                                 ~~^~~~~~~~~~
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp:2921:39: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
 2921 |                         for( i = 0; i < numroots; ++i) {
      |                                     ~~^~~~~~~~~~
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp: In member function ‘virtual int OpenRAVE::planningutils::DynamicsCollisionConstraint::Check(const std::vector<double>&, const std::vector<double>&, const std::vector<double>&, const std::vector<double>&, const std::vector<double>&, const std::vector<double>&, OpenRAVE::dReal, OpenRAVE::IntervalType, int, OpenRAVE::ConstraintFilterReturnPtr)’:
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp:3677:27: warning: unused variable ‘accelerationError’ [-Wunused-variable]
 3677 |                     dReal accelerationError = RaveFabs( (2*temp1 + temp2) - ddq1.at(idof) );
      |                           ^~~~~~~~~~~~~~~~~
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp:4087:17: warning: variable ‘iScaleIndex’ set but not used [-Wunused-but-set-variable]
 4087 |             int iScaleIndex = -1; // TODO: write a correct description for this variable later
      |                 ^~~~~~~~~~~
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp:3718:9: warning: variable ‘nLargestStepIndex’ set but not used [-Wunused-but-set-variable]
 3718 |     int nLargestStepIndex = -1; // index to the DOF that moves the most
      |         ^~~~~~~~~~~~~~~~~
/home/jstm/repos/openrave/src/libopenrave/planningutils.cpp:3932:10: warning: variable ‘bHasNewTempConfigToAdd’ set but not used [-Wunused-but-set-variable]
 3932 |     bool bHasNewTempConfigToAdd = false; // TODO: write a correct description for this variable later
      |          ^~~~~~~~~~~~~~~~~~~~~~
/home/jstm/repos/openrave/src/libopenrave/plugindatabase.cpp: In member function ‘void OpenRAVE::DynamicRaveDatabase::_LoadPluginsFromPath(const string&, bool)’:
/home/jstm/repos/openrave/src/libopenrave/plugindatabase.cpp:235:66: error: ‘directory_options’ is not a member of ‘fs’; did you mean ‘directory_file’?
  235 |         for (const auto entry : fs::directory_iterator(path, fs::directory_options::skip_permission_denied)) {
      |                                                                  ^~~~~~~~~~~~~~~~~
      |                                                                  directory_file
[ 52%] Building CXX object src/libopenrave/CMakeFiles/libopenrave.dir/utils.cpp.o
[ 53%] Building CXX object src/libopenrave/CMakeFiles/libopenrave.dir/xmlreaders.cpp.o
make[2]: *** [src/libopenrave/CMakeFiles/libopenrave.dir/build.make:297: src/libopenrave/CMakeFiles/libopenrave.dir/plugindatabase.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1259: src/libopenrave/CMakeFiles/libopenrave.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

To reproduce:

git clone --branch master https://github.com/rdiankov/openrave.git
cd openrave; mkdir build; cd build
cmake .. -DOPT_VIDEORECORDING=OFF -DOPT_PYTHON=OFF
make -j$(nproc)  # The error happens here

I'm on Ubuntu 20 if that matters.

Thanks,
Jeremy

Seems you now need Boost 1.72 or later; Debian 11 or Ubuntu 22.04 or later.

Otherwise you need to use 68e67a1 (Now I need to force my installation script)

/cc @undisputed-seraphim