-
Notifications
You must be signed in to change notification settings - Fork 225
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
boost/math/constants/constants.hpp:297:3: error: unable to find numeric literal operator ‘operator""Q’ #272
Comments
@zengletian1491 : What compiler and what OS are you using? |
If you are using GCC, -std=gnu++11 or -fext-numeric-literals are compiler options that you must add. Otherwise we need details on your platform chip type and compiler version. and what includes you have to help further. |
There is a mis-configuration in Boost.Config somewhere that it believes My guess is that you're using a compiler that is pretending to be GCC, but isn't. More details please! In any case defining BOOST_MATH_DISABLE_FLOAT128 will fix the issue. |
Ummm, cmake is not a compiler, we need the actual compiler being invoked by cmake (looks like it might be gcc but we can't be sure), PLUS the command line it is invoked with, otherwise there's no way to reproduce. |
System-Product-Name:~/SoftwareExtractPackages$ lsb_release -a System-Product-Name: System-Product-Name:~/Work/rtabmap/build$ cmake .. Thanks very much! |
Nope, still missing something.... I updated the Boost.Config CI tests to check gcc-5 in gnu mode and all the tests are still passing (and verify that __float128 support is turned on): https://travis-ci.org/boostorg/config/jobs/615513039 So I think we need the full g++ command line. |
I'm really sorry for my late reply. Well, after "cmake .." is typed, the results are shown in the attached file "afer cmake.docx"; |
Still not seeing a compiler command line in there, can you post the generated Makefile as well? |
The Makefile is in the attached file!Thank you! |
Ah... that's just the top level Makefile and the actual commands are apparently split between multiple sub-files :( After a bit of googling, it looks like running: make VERBOSE=1 should hopefully spit out the actual commands being used. |
This is the “build”file obtained with "cmake.." and "make VERBOSE=1" |
Reduced test case (with gcc-5.x only) is:
Everything is fine with either one or the other -std options, it's mixing the 2 that confuses things. |
OK, more investigation reveals that this is an issue for gcc-5 and 6, but was fixed for gcc-7 and later. So the workarounds are:
At present I simply don't see any way to fix this at our end because the list of predefined macros gcc sets is identical between I'm inclined to close this as "not our problem", but perhaps I'll leave open for future Googlers to find... or in hopes of a bright idea from someone. In any case, I doubt there will be any more patches/releases of gcc-5 at this stage. |
Thanks very much for your help!@jzmaddock |
Errors occurred when I compile other projects, and the errors were listed in the following:
/usr/local/include/boost/math/constants/constants.hpp:296:3: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
/usr/local/include/boost/math/constants/constants.hpp: In static member function ‘static constexpr T boost::math::constants::detail::constant_root_half_pi::get(const mpl_::int_<5>&)’:
/usr/local/include/boost/math/constants/constants.hpp:297:3: error: unable to find numeric literal operator ‘operator""Q’
BOOST_DEFINE_MATH_CONSTANT(root_half_pi, 1.253314137315500251207882642405522626e+00, "1.2533141373155002512078826424055226265034933703049691583149617881711468273039209874732
^
I did not know how to solve this problem. Please give me some suggestions if you have. Thanks very much!
The text was updated successfully, but these errors were encountered: