Hi there,
I was trying to build OGS on a Ubuntu 20.04 machine with the latest source code from GitLab, but meet the following error:
[ 89%] Built target MaterialLib_SolidModels
[ 90%] Building CXX object MaterialLib/CMakeFiles/MaterialLib.dir/Unity/unity_6_cxx.cxx.o
[ 90%] Building CXX object MaterialLib/CMakeFiles/MaterialLib.dir/Unity/unity_7_cxx.cxx.o
[ 90%] Linking CXX static library ../../lib/libogs_embedded_python.a
[ 90%] Built target ogs_embedded_python
[ 90%] Building CXX object MaterialLib/CMakeFiles/MaterialLib.dir/Unity/unity_5_cxx.cxx.o
[ 90%] Building CXX object MaterialLib/CMakeFiles/MaterialLib.dir/Unity/unity_4_cxx.cxx.o
[ 90%] Building CXX object MaterialLib/CMakeFiles/MaterialLib.dir/Unity/unity_3_cxx.cxx.o
In file included from /HOME1/users/personal/userid/ogs/build/MaterialLib/CMakeFiles/MaterialLib.dir/Unity/unity_4_cxx.cxx:37:
/HOME1/users/personal/userid/ogs/source/MaterialLib/MPL/Properties/Enthalpy/WaterVapourLatentHeatWithCriticalTemperature.cpp: In member function ‘virtual MaterialPropertyLib::PropertyDataType MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::value(const VariableArray&, const ParameterLib::SpatialPosition&, double, double) const’:
/HOME1/users/personal/userid/ogs/source/MaterialLib/MPL/Properties/Enthalpy/WaterVapourLatentHeatWithCriticalTemperature.cpp:64:73: error: no matching function for call to ‘transform_reduce(std::array<double, 8>::const_iterator, std::array<double, 8>::const_iterator, std::array<double, 8>::iterator, double)’
64 | return 1000.0 * std::transform_reduce(begin(c), end(c), begin(v), 0.);
| ^
In file included from /usr/shared/packages/gcc-9.2.0/include/c++/9.2.0/numeric:229,
from /HOME1/users/personal/userid/ogs/source/MaterialLib/MPL/Properties/Enthalpy/WaterVapourLatentHeatWithCriticalTemperature.cpp:16,
from /HOME1/users/personal/userid/ogs/build/MaterialLib/CMakeFiles/MaterialLib.dir/Unity/unity_4_cxx.cxx:37:
/usr/shared/packages/gcc-9.2.0/include/c++/9.2.0/pstl/glue_numeric_defs.h:35:1: note: candidate: ‘template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2> std::transform_reduce(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Tp)’
35 | transform_reduce(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1,
| ^~~~~~~~~~~~~~~~
/usr/shared/packages/gcc-9.2.0/include/c++/9.2.0/pstl/glue_numeric_defs.h:35:1: note: template argument deduction/substitution failed:
In file included from /HOME1/users/personal/userid/ogs/build/MaterialLib/CMakeFiles/MaterialLib.dir/Unity/unity_4_cxx.cxx:37:
/HOME1/users/personal/userid/ogs/source/MaterialLib/MPL/Properties/Enthalpy/WaterVapourLatentHeatWithCriticalTemperature.cpp:64:73: note: deduced conflicting types for parameter ‘_ForwardIterator1’ (‘const double*’ and ‘std::array<double, 8>::value_type*’ {aka ‘double*’})
64 | return 1000.0 * std::transform_reduce(begin(c), end(c), begin(v), 0.);
I used the following commands to configure the building:
1, in the build
folder
$cmake ../source/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/usr/shared/packages/gcc-9.2.0/bin/g++ -DCMAKE_C_COMPILER=/usr/shared/packages/gcc-9.2.0/bin/gcc -DCMAKE_CXX_STANDARD=20
2, in the build
folder
make -j 3
Could you please give me a hint on what goes wrong here?
Regards,
Chao