Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Failed to compile Gazebo plugin #103

Open
alexsandercaac opened this issue Jun 16, 2021 · 6 comments
Open

error: Failed to compile Gazebo plugin #103

alexsandercaac opened this issue Jun 16, 2021 · 6 comments

Comments

@alexsandercaac
Copy link

Description

The 'install_dependencies.sh' executes without any error after updating "logname" in line 9, which was giving me an error, by "whoami" --- I believe their outputs should be equivalent.
When running the next command with pip3, I get the following error:

Processing /home/alex/workspace/gymfc
Collecting numpy (from gymfc==0.1.2)
  Using cached https://files.pythonhosted.org/packages/45/b2/6c7545bb7a38754d63048c7696804a0d947328125d81bf12beaa692c3ae3/numpy-1.19.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting protobuf (from gymfc==0.1.2)
  Using cached https://files.pythonhosted.org/packages/53/4e/e2db88d0bb0bda6a879eea62fddbaf813719ce3770d458bc5580512d9c95/protobuf-3.17.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Collecting psutil>=5.3.0 (from gymfc==0.1.2)
Collecting six>=1.9 (from protobuf->gymfc==0.1.2)
  Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Installing collected packages: numpy, six, protobuf, psutil, gymfc
  Running setup.py install for gymfc ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-jmpeqtxu-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xohlp8m_-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    [gymfc] starting Gazebo plugin build.
    [gymfc] plugin directory located at /tmp/pip-jmpeqtxu-build/gymfc/envs/assets/gazebo/plugins
    -- The C compiler identification is GNU 7.5.0
    -- The CXX compiler identification is GNU 7.5.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
    -- 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
    CMake Error at CMakeLists.txt:4 (find_package):
      By not providing "Findgazebo.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "gazebo", but
      CMake did not find one.

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

        gazeboConfig.cmake
        gazebo-config.cmake

      Add the installation prefix of "gazebo" to CMAKE_PREFIX_PATH or set
      "gazebo_DIR" to a directory containing one of the above files.  If "gazebo"
      provides a separate development package or SDK, be sure it has been
      installed.


    -- Configuring incomplete, errors occurred!
    See also "/tmp/pip-jmpeqtxu-build/gymfc/envs/assets/gazebo/plugins/build/CMakeFiles/CMakeOutput.log".
    make: *** No targets specified and no makefile found.  Stop.
    error: Failed to compile Gazebo plugin.

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-jmpeqtxu-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xohlp8m_-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-jmpeqtxu-build/

Steps to Reproduce

On a fresh install of Ubuntu 18.04, run apt-get update and upgrade. Next, substitute "logname" by "whoami" in the 'install_dependencies.sh' file. Run the script without any issues. Run the pip3 command and see the error.

Expected behavior
Expected the installation of gymfc.

@alexsandercaac alexsandercaac added the bug Something isn't working label Jun 16, 2021
@wil3
Copy link
Owner

wil3 commented Jun 16, 2021

Hi @alexsandercaac what was the error logname it was giving you? That is suspect, and has never been reported. Does the error get thrown if you don't do and upgrade? The dependencies are very sensitive to their versions which is why the script exists. The script does an update but not an upgrade so I suspect doing the upgrade caused a dependency issue. I find testing the install in a fresh virtual machine is useful.

@alexsandercaac
Copy link
Author

Thanks @wil3 for responding so quickly. The error with logname was: logname: no login name. I will repeat the installation without upgrading apt-get, hopefully that will fix it! I will report here the outcome. I should mention, by the way, that I am using a WSL (Windows Subsystem for Linux) based Ubuntu 18.04, would you say that could be the cause?

@wil3
Copy link
Owner

wil3 commented Jun 16, 2021

Gotcha ok that makes sense for why logname doesnt work then since its not native ubuntu. I'm not familiar with WSL so I'm not sure if thats the issue but since its not a supported environment its possible. Maybe the libraries aren't being installed in the correct location. I would think the upgrade would be the most obvious culprit but hard to know unless you check all the versions form what's expected in the dependency script.

@wil3 wil3 removed the bug Something isn't working label Jun 16, 2021
@CDM1619
Copy link

CDM1619 commented Oct 13, 2022

Hi,I have met the similar error when I run the pip3 install . Could you help me? Great thanks for you!

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing /home/chengdong/gymfc
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /home/chengdong/anaconda3/envs/flightmare/lib/python3.6/site-packages (from gymfc==0.1.2) (1.15.4)
Requirement already satisfied: protobuf in /home/chengdong/anaconda3/envs/flightmare/lib/python3.6/site-packages (from gymfc==0.1.2) (3.10.0)
Requirement already satisfied: psutil>=5.3.0 in /home/chengdong/anaconda3/envs/flightmare/lib/python3.6/site-packages (from gymfc==0.1.2) (5.6.3)
Requirement already satisfied: six>=1.9 in /home/chengdong/anaconda3/envs/flightmare/lib/python3.6/site-packages (from protobuf->gymfc==0.1.2) (1.12.0)
Requirement already satisfied: setuptools in /home/chengdong/anaconda3/envs/flightmare/lib/python3.6/site-packages (from protobuf->gymfc==0.1.2) (49.6.0.post20210108)
Building wheels for collected packages: gymfc
Building wheel for gymfc (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/chengdong/anaconda3/envs/flightmare/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/chengdong/gymfc/setup.py'"'"'; file='"'"'/home/chengdong/gymfc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-5b0i3z2n
cwd: /home/chengdong/gymfc/
Complete output (123 lines):
running bdist_wheel
running build
[gymfc] starting Gazebo plugin build.
[gymfc] plugin directory located at /home/chengdong/gymfc/gymfc/envs/assets/gazebo/plugins
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.

-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at /home/chengdong/anaconda3/envs/flightmare/lib/python3.6/site-packages/cmake/data/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (PkgConfig)
does not match the name of the calling package (gazebo). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
/home/chengdong/anaconda3/envs/flightmare/lib/python3.6/site-packages/cmake/data/share/cmake-3.24/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
/usr/local/lib/cmake/gazebo/gazebo-config.cmake:31 (include)
CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'bullet>=2.82'
-- Found bullet, version 2.88
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/simbody/SimbodyConfig.cmake:131 (if):
if given arguments:

  "TRUE"

An argument named "TRUE" appears in a conditional statement.  Policy
CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
"cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
command to set the policy and suppress this warning.

Call Stack (most recent call first):
/usr/local/lib/cmake/gazebo/gazebo-config.cmake:119 (find_package)
CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
-- Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version "3.6.1", minimum required is "2.3.0")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
-- Found libzmq , version 4.3.2
-- Found ZeroMQ: TRUE (Required is at least version "4")
-- Checking for module 'uuid'
-- Found uuid, version 2.34.0
-- Found UUID: TRUE
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Checking for module 'protobuf'
-- Found protobuf, version 3.6.1
Gazebo version: 10.1
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Simbody_LIBRARIES (ADVANCED)
linked by target "AircraftConfigPlugin" in directory /home/chengdong/gymfc/gymfc/envs/assets/gazebo/plugins
linked by target "FlightControllerPlugin" in directory /home/chengdong/gymfc/gymfc/envs/assets/gazebo/plugins

-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
[ 4%] Running cpp protocol buffer compiler on msgs/MotorCommand.proto
[ 9%] Building CXX object CMakeFiles/control_msgs.dir/MotorCommand.pb.cc.o
[ 13%] Linking CXX shared library libcontrol_msgs.so
[ 13%] Built target control_msgs
[ 18%] Running cpp protocol buffer compiler on /usr/local/include/gazebo-10/gazebo/msgs/proto/vector3d.proto
[ 22%] Running cpp protocol buffer compiler on msgs/Action.proto
[ 27%] Running cpp protocol buffer compiler on msgs/EscSensor.proto
[ 31%] Running cpp protocol buffer compiler on msgs/Float.proto
[ 36%] Running cpp protocol buffer compiler on msgs/Imu.proto
[ 40%] Running cpp protocol buffer compiler on msgs/State.proto
[ 45%] Running cpp protocol buffer compiler on /usr/local/include/gazebo-10/gazebo/msgs/proto/quaternion.proto
[ 50%] Building CXX object CMakeFiles/sensor_msgs.dir/Float.pb.cc.o
[ 54%] Building CXX object CMakeFiles/sensor_msgs.dir/Imu.pb.cc.o
[ 59%] Building CXX object CMakeFiles/sensor_msgs.dir/EscSensor.pb.cc.o
[ 63%] Building CXX object CMakeFiles/sensor_msgs.dir/State.pb.cc.o
[ 68%] Building CXX object CMakeFiles/sensor_msgs.dir/Action.pb.cc.o
[ 72%] Building CXX object CMakeFiles/sensor_msgs.dir/vector3d.pb.cc.o
[ 77%] Building CXX object CMakeFiles/sensor_msgs.dir/quaternion.pb.cc.o
[ 81%] Linking CXX shared library libsensor_msgs.so
[ 81%] Built target sensor_msgs
[ 86%] Building CXX object CMakeFiles/FlightControllerPlugin.dir/FlightControllerPlugin.cpp.o
/home/chengdong/gymfc/gymfc/envs/assets/gazebo/plugins/FlightControllerPlugin.cpp:68:10: fatal error: gazebo/physics/dart/DARTModel.hh: No such file or directory
68 | #include <gazebo/physics/dart/DARTModel.hh>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/FlightControllerPlugin.dir/build.make:76: CMakeFiles/FlightControllerPlugin.dir/FlightControllerPlugin.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:142: CMakeFiles/FlightControllerPlugin.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
error: Failed to compile Gazebo plugin.

ERROR: Failed building wheel for gymfc
Running setup.py clean for gymfc
Failed to build gymfc
Installing collected packages: gymfc
Running setup.py install for gymfc ... error
ERROR: Command errored out with exit status 1:
command: /home/chengdong/anaconda3/envs/flightmare/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/chengdong/gymfc/setup.py'"'"'; file='"'"'/home/chengdong/gymfc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-kjk7l8_q/install-record.txt --single-version-externally-managed --compile --install-headers /home/chengdong/anaconda3/envs/flightmare/include/python3.6m/gymfc
cwd: /home/chengdong/gymfc/
Complete output (123 lines):
running install
running build
[gymfc] starting Gazebo plugin build.
[gymfc] plugin directory located at /home/chengdong/gymfc/gymfc/envs/assets/gazebo/plugins
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at /home/chengdong/anaconda3/envs/flightmare/lib/python3.6/site-packages/cmake/data/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (PkgConfig)
  does not match the name of the calling package (gazebo).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /home/chengdong/anaconda3/envs/flightmare/lib/python3.6/site-packages/cmake/data/share/cmake-3.24/Modules/FindPkgConfig.cmake:99 (find_package_handle_standard_args)
  /usr/local/lib/cmake/gazebo/gazebo-config.cmake:31 (include)
  CMakeLists.txt:4 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'bullet>=2.82'
--   Found bullet, version 2.88
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/simbody/SimbodyConfig.cmake:131 (if):
  if given arguments:

    "TRUE"

  An argument named "TRUE" appears in a conditional statement.  Policy
  CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
  "cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/local/lib/cmake/gazebo/gazebo-config.cmake:119 (find_package)
  CMakeLists.txt:4 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found suitable version "3.6.1", minimum required is "2.3.0")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
--   Found libzmq , version 4.3.2
-- Found ZeroMQ: TRUE (Required is at least version "4")
-- Checking for module 'uuid'
--   Found uuid, version 2.34.0
-- Found UUID: TRUE
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Checking for module 'protobuf'
--   Found protobuf, version 3.6.1
Gazebo version: 10.1
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Simbody_LIBRARIES (ADVANCED)
    linked by target "AircraftConfigPlugin" in directory /home/chengdong/gymfc/gymfc/envs/assets/gazebo/plugins
    linked by target "FlightControllerPlugin" in directory /home/chengdong/gymfc/gymfc/envs/assets/gazebo/plugins

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
[  4%] Running cpp protocol buffer compiler on msgs/MotorCommand.proto
[  9%] Building CXX object CMakeFiles/control_msgs.dir/MotorCommand.pb.cc.o
[ 13%] Linking CXX shared library libcontrol_msgs.so
[ 13%] Built target control_msgs
[ 18%] Running cpp protocol buffer compiler on /usr/local/include/gazebo-10/gazebo/msgs/proto/vector3d.proto
[ 22%] Running cpp protocol buffer compiler on msgs/Action.proto
[ 27%] Running cpp protocol buffer compiler on msgs/EscSensor.proto
[ 31%] Running cpp protocol buffer compiler on msgs/Float.proto
[ 36%] Running cpp protocol buffer compiler on msgs/Imu.proto
[ 40%] Running cpp protocol buffer compiler on msgs/State.proto
[ 45%] Running cpp protocol buffer compiler on /usr/local/include/gazebo-10/gazebo/msgs/proto/quaternion.proto
[ 50%] Building CXX object CMakeFiles/sensor_msgs.dir/Float.pb.cc.o
[ 54%] Building CXX object CMakeFiles/sensor_msgs.dir/Imu.pb.cc.o
[ 59%] Building CXX object CMakeFiles/sensor_msgs.dir/EscSensor.pb.cc.o
[ 63%] Building CXX object CMakeFiles/sensor_msgs.dir/State.pb.cc.o
[ 68%] Building CXX object CMakeFiles/sensor_msgs.dir/Action.pb.cc.o
[ 72%] Building CXX object CMakeFiles/sensor_msgs.dir/vector3d.pb.cc.o
[ 77%] Building CXX object CMakeFiles/sensor_msgs.dir/quaternion.pb.cc.o
[ 81%] Linking CXX shared library libsensor_msgs.so
[ 81%] Built target sensor_msgs
[ 86%] Building CXX object CMakeFiles/FlightControllerPlugin.dir/FlightControllerPlugin.cpp.o
/home/chengdong/gymfc/gymfc/envs/assets/gazebo/plugins/FlightControllerPlugin.cpp:68:10: fatal error: gazebo/physics/dart/DARTModel.hh: No such file or directory
   68 | #include <gazebo/physics/dart/DARTModel.hh>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/FlightControllerPlugin.dir/build.make:76: CMakeFiles/FlightControllerPlugin.dir/FlightControllerPlugin.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:142: CMakeFiles/FlightControllerPlugin.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
error: Failed to compile Gazebo plugin.
----------------------------------------

ERROR: Command errored out with exit status 1: /home/chengdong/anaconda3/envs/flightmare/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/chengdong/gymfc/setup.py'"'"'; file='"'"'/home/chengdong/gymfc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-kjk7l8_q/install-record.txt --single-version-externally-managed --compile --install-headers /home/chengdong/anaconda3/envs/flightmare/include/python3.6m/gymfc Check the logs for full command output.

@njpzn
Copy link

njpzn commented Nov 30, 2022

I also have this probeles when I run the pip3 install . Could you solve it?
/home/pzn/gymfc/gymfc/envs/assets/gazebo/plugins/FlightControllerPlugin.cpp:68:10: fatal error: gazebo/physics/dart/DARTModel.hh: 没有那个文件或目录
#include <gazebo/physics/dart/DARTModel.hh>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/FlightControllerPlugin.dir/build.make:62: recipe for target 'CMakeFiles/FlightControllerPlugin.dir/FlightControllerPlugin.cpp.o' failed
make[2]: *** [CMakeFiles/FlightControllerPlugin.dir/FlightControllerPlugin.cpp.o] Error 1
CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/FlightControllerPlugin.dir/all' failed
make[1]: *** [CMakeFiles/FlightControllerPlugin.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
error: Failed to compile Gazebo plugin.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> gymfc

@luoshenhua1
Copy link

Description

The 'install_dependencies.sh' executes without any error after updating "logname" in line 9, which was giving me an error, by "whoami" --- I believe their outputs should be equivalent. When running the next command with pip3, I get the following error:

Processing /home/alex/workspace/gymfc
Collecting numpy (from gymfc==0.1.2)
  Using cached https://files.pythonhosted.org/packages/45/b2/6c7545bb7a38754d63048c7696804a0d947328125d81bf12beaa692c3ae3/numpy-1.19.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting protobuf (from gymfc==0.1.2)
  Using cached https://files.pythonhosted.org/packages/53/4e/e2db88d0bb0bda6a879eea62fddbaf813719ce3770d458bc5580512d9c95/protobuf-3.17.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Collecting psutil>=5.3.0 (from gymfc==0.1.2)
Collecting six>=1.9 (from protobuf->gymfc==0.1.2)
  Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Installing collected packages: numpy, six, protobuf, psutil, gymfc
  Running setup.py install for gymfc ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-jmpeqtxu-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xohlp8m_-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    [gymfc] starting Gazebo plugin build.
    [gymfc] plugin directory located at /tmp/pip-jmpeqtxu-build/gymfc/envs/assets/gazebo/plugins
    -- The C compiler identification is GNU 7.5.0
    -- The CXX compiler identification is GNU 7.5.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
    -- 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
    CMake Error at CMakeLists.txt:4 (find_package):
      By not providing "Findgazebo.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "gazebo", but
      CMake did not find one.

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

        gazeboConfig.cmake
        gazebo-config.cmake

      Add the installation prefix of "gazebo" to CMAKE_PREFIX_PATH or set
      "gazebo_DIR" to a directory containing one of the above files.  If "gazebo"
      provides a separate development package or SDK, be sure it has been
      installed.


    -- Configuring incomplete, errors occurred!
    See also "/tmp/pip-jmpeqtxu-build/gymfc/envs/assets/gazebo/plugins/build/CMakeFiles/CMakeOutput.log".
    make: *** No targets specified and no makefile found.  Stop.
    error: Failed to compile Gazebo plugin.

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-jmpeqtxu-build/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-xohlp8m_-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-jmpeqtxu-build/

Steps to Reproduce

On a fresh install of Ubuntu 18.04, run apt-get update and upgrade. Next, substitute "logname" by "whoami" in the 'install_dependencies.sh' file. Run the script without any issues. Run the pip3 command and see the error.

Expected behavior Expected the installation of gymfc.
I encountered the same problem, how did you solve it at that time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants