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

make error #11

Closed
yuxiqun opened this issue Dec 29, 2018 · 10 comments · Fixed by #28
Closed

make error #11

yuxiqun opened this issue Dec 29, 2018 · 10 comments · Fixed by #28

Comments

@yuxiqun
Copy link

yuxiqun commented Dec 29, 2018

When I according to "
git clone https://github.com/khancyr/ardupilot_gazebo
cd ardupilot_gazebo
mkdir build
cd build
cmake ..
make -j4
sudo make install",
all is right in orders but when it come to 'make -j4', the error is

image
Why? Thank you!

@khancyr
Copy link
Owner

khancyr commented Jan 7, 2019

Hello,

Which version of ubuntu, and gazebo do you have ?

@yuxiqun
Copy link
Author

yuxiqun commented Jan 7, 2019

I use ubuntu 16.04 and gazebo 9.6.0. And I build the develop environment ,according to "http://gazebosim.org/tutorials?tut=install_ubuntu" where I found in your repositories "ardupilot_gazebo/README.md/Usage"。 @khancyr Thanks for your reply!

@khancyr
Copy link
Owner

khancyr commented Jan 7, 2019

I don't see error on my side. Could you update everything with sudo apt update && sudo apt upgrade ?

@yuxiqun
Copy link
Author

yuxiqun commented Jan 8, 2019

This my ubuntu system message:
yxq@ubuntu:~$ cat /etc/issue
Ubuntu 16.04.5 LTS \n \l

yxq@ubuntu:$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
yxq@ubuntu:
$ uname -sr
Linux 4.15.0-43-generic

After git clone your "ardupilot_gazebo" code, I did "cmake":
yxq@ubuntu:~/ardupilot_gazebo/build$ cmake ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.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
-- 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
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'bullet>=2.82'
-- Found bullet, version 2.83
-- Found Simbody: /usr/include/simbody
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- thread
-- system
-- filesystem
-- program_options
-- regex
-- iostreams
-- date_time
-- chrono
-- atomic
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so
-- Boost version: 1.58.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 (Required is at least version "2.3.0")
-- Config-file not installed for ZeroMQ -- checking for pkg-config
-- Checking for module 'libzmq >= 4'
-- Found libzmq , version 4.1.4
-- Found ZeroMQ: TRUE (Required is at least version "4")
-- Checking for module 'uuid'
-- Found uuid, version 2.27.0
-- Found UUID: TRUE
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 2.2.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Checking for module 'gts'
-- Found gts, version 0.7.6
-- Found GTS: TRUE
-- Checking for module 'libswscale'
-- Found libswscale, version 3.1.101
-- Found SWSCALE: TRUE
-- Checking for module 'libavdevice >= 56.4.100'
-- Found libavdevice , version 56.4.100
-- Found AVDEVICE: TRUE (Required is at least version "56.4.100")
-- Checking for module 'libavformat'
-- Found libavformat, version 56.40.101
-- Found AVFORMAT: TRUE
-- Checking for module 'libavcodec'
-- Found libavcodec, version 56.60.100
-- Found AVCODEC: TRUE
-- Checking for module 'libavutil'
-- Found libavutil, version 54.31.100
-- Found AVUTIL: TRUE
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.47.0")
-- Checking for module 'jsoncpp'
-- Found jsoncpp, version 1.7.2
-- Found JSONCPP: TRUE
-- Checking for module 'yaml-0.1'
-- Found yaml-0.1, version 0.1.6
-- Found YAML: TRUE
-- Checking for module 'libzip'
-- Found libzip, version 1.0.1
-- Found ZIP: TRUE
Gazebo version: 9.6
-- Performing Test R-Wall
-- Performing Test R-Wall - Success
-- Performing Test R-Wextra
-- Performing Test R-Wextra - Success
-- Performing Test R-Wno-long-long
-- Performing Test R-Wno-long-long - Success
-- Performing Test R-Wno-unused-value
-- Performing Test R-Wno-unused-value - Success
-- Performing Test R-Wfloat-equal
-- Performing Test R-Wfloat-equal - Success
-- Performing Test R-Wshadow
-- Performing Test R-Wshadow - Success
-- Performing Test R-Wswitch-default
-- Performing Test R-Wswitch-default - Success
-- Performing Test R-Wmissing-include-dirs
-- Performing Test R-Wmissing-include-dirs - Success
-- Performing Test R-pedantic
-- Performing Test R-pedantic - Success
-- Performing Test R-fvisibility=hidden
-- Performing Test R-fvisibility=hidden - Success
-- Performing Test R-fvisibility-inlines-hidden
-- Performing Test R-fvisibility-inlines-hidden - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yxq/ardupilot_gazebo/build

Next,I did "make",the error is :
yxq@ubuntu:~/ardupilot_gazebo/build$ make -j4
Scanning dependencies of target ArduPilotPlugin
Scanning dependencies of target ArduCopterIRLockPlugin
[ 25%] Building CXX object CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o
[ 50%] Building CXX object CMakeFiles/ArduCopterIRLockPlugin.dir/src/ArduCopterIRLockPlugin.cc.o
In file included from /usr/include/boost/type_index/stl_type_index.hpp:32:0,
from /usr/include/boost/type_index.hpp:29,
from /usr/include/boost/any.hpp:20,
from /usr/include/sdformat-6.1/sdf/Param.hh:23,
from /usr/include/sdformat-6.1/sdf/Element.hh:25,
from /usr/include/sdformat-6.1/sdf/sdf.hh:4,
from /home/yxq/ardupilot_gazebo/src/ArduPilotPlugin.cc:41:
/usr/include/boost/variant/get.hpp: In instantiation of ‘typename boost::add_reference::type boost::strict_get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2, ignition::math::v4::Vector2, ignition::math::v4::Vector3, ignition::math::v4::Quaternion, ignition::math::v4::Pose3}; typename boost::add_reference::type = short unsigned int&]’:
/usr/include/boost/variant/get.hpp:284:25: required from ‘typename boost::add_reference::type boost::get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2, ignition::math::v4::Vector2, ignition::math::v4::Vector3, ignition::math::v4::Quaternion, ignition::math::v4::Pose3}; typename boost::add_reference::type = short unsigned int&]’
/usr/include/sdformat-6.1/sdf/Param.hh:296:31: required from ‘bool sdf::Param::Get(T&) const [with T = short unsigned int]’
/usr/include/sdformat-6.1/sdf/Element.hh:454:7: required from ‘std::pair<T, bool> sdf::Element::Get(const string&, const T&) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string]’
/home/yxq/ardupilot_gazebo/src/ArduPilotPlugin.cc:879:57: required from here
/usr/include/boost/variant/get.hpp:212:5: error: static assertion failed: boost::variant does not contain specified type U, call to boost::get(boost::variant<T...>&) will always throw boost::bad_get exception
BOOST_STATIC_ASSERT_MSG(
^
CMakeFiles/ArduPilotPlugin.dir/build.make:62: recipe for target 'CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o' failed
make[2]: *** [CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/ArduPilotPlugin.dir/all' failed
make[1]: *** [CMakeFiles/ArduPilotPlugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Could you find any clue from above message?

@yuxiqun
Copy link
Author

yuxiqun commented Jan 8, 2019

I have update everything with" sudo apt update" and "sudo apt upgrade", restart virtual machine. I did "cmake" and "make", the message is same as my previous reply .

@SteveJos
Copy link

SteveJos commented Jan 8, 2019

@yuxiqun Please do a boost upgrade to the latest version. Ubuntu 16.04 stock version is 1.58, which is apparently too old for ardupilot_gazebo plugin.

@yuxiqun
Copy link
Author

yuxiqun commented Jan 10, 2019

@SteveJos I have upgarde ubuntu from 16.04 LTS to 18.04 LTS, gazebo is still 9.6.0, and "the make error" is solved! Thanks!

@r0ch1n
Copy link

r0ch1n commented Jan 26, 2019

I need to run a ROS version which is only available under 16.04 so upgrading to 18.04 is not an option.

After running make -j4 I get this output:

frank@ubuntu:~/ardupilot_gazebo/build$ make -j4
Scanning dependencies of target ArduCopterIRLockPlugin
Scanning dependencies of target ArduPilotPlugin
[ 25%] Building CXX object CMakeFiles/ArduCopterIRLockPlugin.dir/src/ArduCopterIRLockPlugin.cc.o
[ 50%] Building CXX object CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o
In file included from /usr/include/boost/type_index/stl_type_index.hpp:32:0,
from /usr/include/boost/type_index.hpp:29,
from /usr/include/boost/any.hpp:20,
from /usr/include/sdformat-6.2/sdf/Param.hh:21,
from /usr/include/sdformat-6.2/sdf/Element.hh:25,
from /usr/include/sdformat-6.2/sdf/sdf.hh:4,
from /home/frank/ardupilot_gazebo/src/ArduPilotPlugin.cc:41:
/usr/include/boost/variant/get.hpp: In instantiation of ‘typename boost::add_reference::type boost::strict_get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2, ignition::math::v4::Vector2, ignition::math::v4::Vector3, ignition::math::v4::Quaternion, ignition::math::v4::Pose3}; typename boost::add_reference::type = short unsigned int&]’:
/usr/include/boost/variant/get.hpp:284:25: required from ‘typename boost::add_reference::type boost::get(boost::variant<T0, TN ...>&) [with U = short unsigned int; T0 = bool; TN = {char, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, int, long unsigned int, unsigned int, double, float, sdf::Time, ignition::math::v4::Color, ignition::math::v4::Vector2, ignition::math::v4::Vector2, ignition::math::v4::Vector3, ignition::math::v4::Quaternion, ignition::math::v4::Pose3}; typename boost::add_reference::type = short unsigned int&]’
/usr/include/sdformat-6.2/sdf/Param.hh:300:31: required from ‘bool sdf::Param::Get(T&) const [with T = short unsigned int]’
/usr/include/sdformat-6.2/sdf/Element.hh:454:7: required from ‘std::pair<T, bool> sdf::Element::Get(const string&, const T&) const [with T = short unsigned int; std::__cxx11::string = std::__cxx11::basic_string]’
/home/frank/ardupilot_gazebo/src/ArduPilotPlugin.cc:879:57: required from here
/usr/include/boost/variant/get.hpp:212:5: error: static assertion failed: boost::variant does not contain specified type U, call to boost::get(boost::variant<T...>&) will always throw boost::bad_get exception
BOOST_STATIC_ASSERT_MSG(
^
CMakeFiles/ArduPilotPlugin.dir/build.make:62: recipe for target 'CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o' failed
make[2]: *** [CMakeFiles/ArduPilotPlugin.dir/src/ArduPilotPlugin.cc.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/ArduPilotPlugin.dir/all' failed
make[1]: *** [CMakeFiles/ArduPilotPlugin.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 75%] Linking CXX shared library libArduCopterIRLockPlugin.so
[ 75%] Built target ArduCopterIRLockPlugin
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

After a lot of digging I found this issue ethereum/solidity#4124

The problem seems to be the Boost Version, no idea how to fix it but as a workaround I modified the following file /usr/include/sdformat-6.2/sdf/Param.hh in line 300 as follows.

299 #if BOOST_VERSION < 105800
300 // _value = boost::get(this->dataPtr->value);
301 _value = boost::relaxed_get(this->dataPtr->value);
302 #else
303 _value = boost::relaxed_get(this->dataPtr->value);
304 #endif

After this change I was able to run make using Ubuntu 16.04 and gazebo 9.6.0!

Best or lucks

I recommend returning the file to its original code after compiling and installing.

@mohammedshafeeqet
Copy link

@r0ch1n 's changes worked for me as well. Thanks :)
Screenshot from 2020-01-13 15-07-39

@mhashimoto-hmk
Copy link

mhashimoto-hmk commented Apr 6, 2020

I got the same error and solved by changing <uint16_t> to <uint32_t>
at ArdupilotPlugin.cc Line 879 and 881.

I've got no side effect so far.

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

Successfully merging a pull request may close this issue.

6 participants