Closed EvanLind closed 3 years ago
it should be in /usr/include/c++/11.1.0/chrono
line 3165
inline namespace chrono_literals
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wliteral-suffix"
Are you sure that you install gcc correctly? Mine is gcc 11.1.0-1
~ ❯❯❯ gcc --version
gcc (GCC) 11.1.0
Copyright (C) 2021 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.
The gcc version is correct, ‘chrono_literals’ namespace-name is also defined...
Hm, What is the version of your ignition-math? run this yay -Qi ignition-math
https://aur.archlinux.org/cgit/aur.git/log/?h=ignition-math newest 6.8.0-1, I try to downgrade to 6.7.0 and rebuild, but it still doesn't work
~ ❯❯❯ yay -Qi ignition-math
Name : ignition-math
Version : 6.8.0-1
Description : Math classes and functions for robot applications
Architecture : x86_64
URL : https://ignitionrobotics.org/libs/math
Licenses : Apache
Groups : development
Provides : None
Depends On : gcc-libs
Optional Deps : eigen [installed]
Required By : gazebo ignition-common ignition-common-3 ignition-msgs-5 sdformat-9
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 2.71 MiB
Packager : Unknown Packager
Build Date : Wed 26 May 2021 12:48:49 PM CST
Install Date : Wed 26 May 2021 12:51:53 PM CST
Install Reason : Explicitly installed
Install Script : No
Validated By : None
Ok I I think I found the the problem, the ros-noetic-gazebo-ros
in AUR is outdated. I am also failed to build 2.9.1 with same error. Current version that can be build is 2.9.2.
These are the oudated AUR packages
ros-noetic-controller-manager-msgs ros-noetic-rqt-srv ros-noetic-rqt-reconfigure ros-noetic-rospy ros-noetic-roscpp ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros-control ros-noetic-gazebo-ros ros-noetic-gazebo-plugins ros-noetic-gazebo-dev ros-noetic-gazebo-msgs ros-noetic-gazebo-dev
You can find updated version in my github repo for example https://github.com/AchmadFathoni/ros-noetic-gazebo-ros
makepkg
for each package manually?
ros-noetic-controller-manager-msgs error for :
[ 1%] Generating Lisp code from controller_manager_msgs/ControllerState.msg
Traceback (most recent call last):
File "/opt/ros/noetic/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py", line 39, in <module>
import genlisp
ModuleNotFoundError: No module named 'genlisp'
pip install genlisp ✘ 4 master ◼
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement genlisp (from versions: none)
ERROR: No matching distribution found for genlisp
Could you please update to AUR official repo?
For ModuleNotFoundError: No module named 'genlisp'
, just install ros-noetic-genlisp
. If you support more updated AUR, you can complain at #20 and here
ros-noetic-gazebo-ros ros-noetic-gazebo-plugins version 2.9.2 from your github repo also failed to build with same error
Remove the src folder and build again
I have already rm folder src, and run makepkg -fiC
, still the same error
/usr/include/ignition/math6/ignition/math/Helpers.hh:990:28: error: ‘chrono_literals’ is not a namespace-name
Do you build ros-noetic-gazebo-ros, ros-noetic-gazebo-plugins successfully for version 2.9.2
Oh, I am sorry. After I delete my own src and do clean build, I get your error. The problem is: after newest gcc update ros package needs to explicitly use -DCMAKE_CXX_STANDARD=17
flag in PKGBUILD. I will update my repo, maybe 10 minute or so.
ros-noetic-gazebo-ros is updated
and ros-noetic-gazebo-plugins
If you done please close this issue @EvanLind
Build successfully after I add -DCMAKE_CXX_STANDARD=17
to AUR 2.9.1 ros-noetic-gazebo-ros PKGBUILD
~using namespace is supported since C++11, why must flag -DCMAKE_CXX_STANDARD=17
be explicitly add in cmake?~
https://en.cppreference.com/w/cpp/chrono/operator%22%22h since C++14
Why C++17? Because it's work+newer and time always moving forward.
How do I know that flag solved the problem? So, there is amazing technology called search engine, the most popular one is Google. You can type your error there and hit enter and then a catalog of link will be displayed. You click one of the link in that catalog and you will be redirected to a website that contain information about the solution candidate. If the first solution candidate doesn't work, you can try the next link in catalog.
I hace tried several solution candidates with "amazing google", but it doesn't work... Then I found ignition-math update 4 days ago, misunderstood it was a version update problem. Thanks all the same.
==> Making package: ros-noetic-gazebo-ros 2.9.1-1 (Wed 26 May 2021 01:23:05 PM CST)
And I have tried
yay -Syu ros-noetic-desktop-full --rebuildtree
, but it still doesn't work