flightmare icon indicating copy to clipboard operation
flightmare copied to clipboard

Errors on `catkin build`

Open varunagrawal opened this issue 3 years ago • 1 comments

I am using ROS Noetic (so gazebo 11 which is the default). Any help please?

  1. This is easy. It should be filename.c_str().
Errors     << flightlib:make /home/varun/ros_ws/flightmare/logs/flightlib/build.make.012.log                                                            
In file included from /home/varun/ros_ws/flightmare/src/flightmare/flightlib/src/common/logger.cpp:1:
/home/varun/ros_ws/flightmare/src/flightmare/flightlib/include/flightlib/common/logger.hpp:70:64: error: cannot pass object of non-trivial type 'const std::__cxx11::basic_string<char>' through variadic function; call will abort at runtime [-Wnon-pod-varargs]
  const int n = std::snprintf(buf, MAX_CHARS, message.c_str(), args...);
                                                               ^
/home/varun/ros_ws/flightmare/src/flightmare/flightlib/src/common/logger.cpp:24:7: note: in instantiation of function template specialization 'flightlib::Logger::warn<std::__cxx11::basic_string<char> >' requested here
      warn("Could not open file %s. Logging to console!", filename);
      ^
1 error generated.
make[2]: *** [CMakeFiles/flightlib.dir/build.make:146: CMakeFiles/flightlib.dir/src/common/logger.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:284: CMakeFiles/flightlib.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

  1. CMake cannot find OGRE. I don't know why this is the issue.
Package OGRE was not found in the pkg-config search path.
Perhaps you should add the directory containing `OGRE.pc'
to the PKG_CONFIG_PATH environment variable
No package 'OGRE' found
CMake Warning at /home/linuxbrew/.linuxbrew/Cellar/cmake/3.20.2/share/cmake/Modules/FindProtobuf.cmake:520 (message):
  Protobuf compiler version 3.17.0 doesn't match library version 3.6.1
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:207 (find_package)
  /opt/ros/noetic/share/gazebo_dev/cmake/gazebo_dev-extras.cmake:2 (find_package)
  /opt/ros/noetic/share/gazebo_dev/cmake/gazebo_devConfig.cmake:222 (include)
  CMakeLists.txt:125 (find_package)


CMake Error at /usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:217 (find_package):
  By not providing "FindOGRE.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OGRE", but
  CMake did not find one.

  Could not find a package configuration file provided by "OGRE" with any of
  the following names:

    OGREConfig.cmake
    ogre-config.cmake

  Add the installation prefix of "OGRE" to CMAKE_PREFIX_PATH or set
  "OGRE_DIR" to a directory containing one of the above files.  If "OGRE"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  /opt/ros/noetic/share/gazebo_dev/cmake/gazebo_dev-extras.cmake:2 (find_package)
  /opt/ros/noetic/share/gazebo_dev/cmake/gazebo_devConfig.cmake:222 (include)
  CMakeLists.txt:125 (find_package)
  1. Also easy: just update to .template as<
/home/varun/ros_ws/flightmare/src/flightmare/flightlib/src/envs/vec_env.cpp:33:41: error: use 'template' keyword to treat 'as' as a dependent template name
      unity_render_ = cfg_["env"]["render"].as<bool>();
                                            ^
                                            template
    /home/varun/ros_ws/flightmare/src/flightmare/flightlib/src/envs/vec_env.cpp:34:31: error: use 'template' keyword to treat 'as' as a dependent template name
      seed_ = cfg_["env"]["seed"].as<int>();
                                  ^
                                  template
    /home/varun/ros_ws/flightmare/src/flightmare/flightlib/src/envs/vec_env.cpp:35:39: error: use 'template' keyword to treat 'as' as a dependent template name
      num_envs_ = cfg_["env"]["num_envs"].as<int>();
                                          ^
                                          template
    /home/varun/ros_ws/flightmare/src/flightmare/flightlib/src/envs/vec_env.cpp:36:39: error: use 'template' keyword to treat 'as' as a dependent template name
      scene_id_ = cfg_["env"]["scene_id"].as<SceneID>();
                                          ^
                                          template
    /home/varun/ros_ws/flightmare/src/flightmare/flightlib/src/envs/vec_env.cpp:39:50: error: use 'template' keyword to treat 'as' as a dependent template name
      omp_set_num_threads(cfg_["env"]["num_threads"].as<int>());
                                                     ^
                                                     template

varunagrawal avatar May 19 '21 14:05 varunagrawal

@yun-long FYI I encounter the same errors when using the pip install . procedure.

varunagrawal avatar May 19 '21 15:05 varunagrawal