-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Build error -- Cantera 2.6.0 #1277
Comments
Hi @fbisetti ... thanks for the report. This looks like a RHEL 7 system, where tools are relatively dated (GCC 4.8.5 is from 2015, boost 1.53.0 is from 2013; likewise, yamlcpp doesn't include some newer features). The compilation error reported above shows up in a reactor type introduced in Cantera 2.6, but hasn't appeared in any of the other environments we're testing. As a work-around, do you have any alternative compilers on your environment? (e.g. Intel OneAPI) |
Thanks Ingmar. You are correct that the tools are dated. We'll try again with |
I've built 2.6.0 successfully using gcc 8.2.0. I also pointed
|
Ciao Fabrizio, happy it worked! Also good to hear that SUNDIALS 6.2 didn’t cause issues as it’s not something we’re testing against yet. PS: tagging Cantera/enhancements#152 and Cantera/enhancements#148 |
These are the only warnings thrown around Sundials 6.2.0. Hope this helps. |
The accepted answer in this StackOverflow post suggests that this error message is due to a bug in that version of GCC that has clearly been fixed in more recent versions. |
This compiler error is only the tip of the iceberg for problems with GCC 4.8. The compiler error above can be worked around by running Compiling with GCC 4.9 still fails with the (incorrect) error about Compiling Cantera 2.6.0 with GCC 5.4.0 (available on Ubuntu 16.04) works without any modifications, so I'm inclined to update our list of known/expected supported versions to make this our minimum. I don't think it's worth the extra effort to try testing the earlier releases in the 5.x series. |
Two weeks ago I tried to compile on CentOS with gcc 4.8.5, and using Sundials that ships with Cantera. I did not get the Sundials error (maybe scons did not get to that point), but it had an issue with BOOST (my boost version is 1.79) I was able to build/test/install fine with gcc 9.2.0. Just relaying this here, in case it helps:
g++ -o build/src/thermo/PengRobinson.os -c -std=c++11 -pthread -O3 -Wno-inline -g -Wall -include src/pch/system.h -fPIC -DNDEBUG -Iinclude -Iinclude/cantera/ext -Ibuild/src -I/home/santosh1/.conda/envs/default/include -I/home/santosh1/packages/boost src/thermo/PengRobinson.cpp
In file included from /home/santosh1/packages/boost/boost/config.hpp:61:0,
from /home/santosh1/packages/boost/boost/algorithm/string/std_containers_traits.hpp:18,
from /home/santosh1/packages/boost/boost/algorithm/string.hpp:18,
from src/pch/system.h:16:
/home/santosh1/packages/boost/boost/math/tools/precision.hpp:41:83: error: redeclaration 'int boost::math::tools::digits()' differs in 'constexpr'
inline BOOST_MATH_CONSTEXPR int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_NOEXCEPT
^
In file included from /home/santosh1/packages/boost/boost/math/special_functions/math_fwd.hpp:31:0,
from /home/santosh1/packages/boost/boost/math/special_functions/sign.hpp:17,
from /home/santosh1/packages/boost/boost/math/tools/roots.hpp:22,
from src/thermo/PengRobinson.cpp:12:
/home/santosh1/packages/boost/boost/math/policies/policy.hpp:25:15: error: from previous declaration 'constexpr int boost::math::tools::digits()'
constexpr int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept;
^
In file included from /home/santosh1/packages/boost/boost/math/tools/roots.hpp:18:0,
from src/thermo/PengRobinson.cpp:12:
/home/santosh1/packages/boost/boost/math/tools/config.hpp:261:77: error: redeclaration 'T boost::math::tools::epsilon()' differs in 'constexpr'
# define BOOST_MATH_NOEXCEPT(T) noexcept(boost::is_floating_point::value)
^
/home/santosh1/packages/boost/boost/math/tools/precision.hpp:246:82: note: in expansion of macro 'BOOST_MATH_NOEXCEPT'
inline BOOST_MATH_CONSTEXPR T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_MATH_NOEXCEPT(T)
^
In file included from /home/santosh1/packages/boost/boost/math/special_functions/math_fwd.hpp:31:0,
from /home/santosh1/packages/boost/boost/math/special_functions/sign.hpp:17,
from /home/santosh1/packages/boost/boost/math/tools/roots.hpp:22,
from src/thermo/PengRobinson.cpp:12:
/home/santosh1/packages/boost/boost/math/policies/policy.hpp:27:13: error: from previous declaration 'constexpr T boost::math::tools::epsilon()'
constexpr T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) noexcept(std::is_floating_point::value);
^
/home/santosh1/packages/boost/boost/math/policies/policy.hpp:27:13: warning: inline function 'constexpr T boost::math::tools::epsilon() [with T = double]' used but never defined [enabled by default]
scons: *** [build/src/thermo/PengRobinson.os] Error 1
scons: building terminated because of errors.
|
Thanks to all for your help and support. It is obvious that Cantera has established itself as the de-facto kinetics library thanks to all of the active developers and maintainers. |
Problem description
Compile error when building Cantera 2.6.0
Steps to reproduce
System information
The text was updated successfully, but these errors were encountered: