From 1a1b5223a852b4a45a5735fe5aa287abc12d0be9 Mon Sep 17 00:00:00 2001 From: SALOME support Date: Fri, 25 Jun 2021 12:33:29 +0200 Subject: [PATCH] spns #24300 compile SALOME native on FD34 --- applications/SALOME-master-native.pyconf | 6 +- products/ParaView.pyconf | 1 + products/compil_scripts/gmsh.sh | 2 +- products/compil_scripts/opencv.sh | 8 +- products/openturns.pyconf | 2 +- products/patches/openturns-1.16.0002.patch | 16 ++++ .../patches/paraview-5.9.0-gcc.11.0.patch | 94 +++++++++++++++++++ products/patches/root-6.22.02-gcc-11.0.patch | 11 +++ products/qt.pyconf | 2 +- products/root.pyconf | 2 +- 10 files changed, 135 insertions(+), 9 deletions(-) create mode 100644 products/patches/openturns-1.16.0002.patch create mode 100644 products/patches/paraview-5.9.0-gcc.11.0.patch create mode 100644 products/patches/root-6.22.02-gcc-11.0.patch diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index f28f004..8a316b7 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -72,8 +72,8 @@ APPLICATION : netgen : '5.3.1_with_CAS_7.2' nlopt : '2.4.2' numpy : 'native' - omniORB : '4.2.3' - omniORBpy : '4.2.3' + omniORB : '4.2.4' + omniORBpy : '4.2.4' opencv : 'native' openVKL : '0.11.0' openturns: '1.16' @@ -187,7 +187,7 @@ __overwrite__ : # Although recent adaptations of GEOM CMake procedure to be compliant with openCV 4.X, some # deeper investigations need to be done in its sources. Use embedded openCV product where # native one is 4.X. - __condition__ : "VARS.dist in ['FD32', 'UB20.04']" + __condition__ : "VARS.dist in ['FD32', 'UB20.04', 'FD34']" 'APPLICATION.products.opencv' : '3.2.0' } { diff --git a/products/ParaView.pyconf b/products/ParaView.pyconf index 4b7bcf9..179f5c6 100755 --- a/products/ParaView.pyconf +++ b/products/ParaView.pyconf @@ -110,6 +110,7 @@ version_5_9_0 : 'paraview.0008-ParaView_coincident_rendering.patch', 'paraview.0011-ParaView_protobuf_crash.patch', 'paraview.0015-Paraview_VTKM_ioss.patch' + 'paraview-5.9.0-gcc.11.0.patch' ] } diff --git a/products/compil_scripts/gmsh.sh b/products/compil_scripts/gmsh.sh index 4f86412..758674e 100755 --- a/products/compil_scripts/gmsh.sh +++ b/products/compil_scripts/gmsh.sh @@ -27,7 +27,7 @@ if version_ge $VERSION "4."; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_CGNS=OFF" # default value is set to ON in release 4.1.4 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_LIBDIR=${PRODUCT_INSTALL}/lib" # strangely on Ubuntu GMSH installs the .so in lib instead of lib/lib64 - so force to lib64 CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_PREFIX_PATH=${LAPACK_ROOT_DIR}" # set path of third libraries to our associated internal products - if [[ $DIST_NAME == "FD" && $DIST_VERSION == "32" ]] + if [[ $DIST_NAME == "FD" && ($DIST_VERSION == "32" || $DIST_VERSION == "34") ]] then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DENABLE_MMG3D=OFF" # removed anyhow in GMS 4.6 fi diff --git a/products/compil_scripts/opencv.sh b/products/compil_scripts/opencv.sh index 237bfc4..eae07ad 100755 --- a/products/compil_scripts/opencv.sh +++ b/products/compil_scripts/opencv.sh @@ -5,7 +5,7 @@ echo "opencv" $VERSION echo "##########################################################################" function version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; } - +CPPSTD="\"-std=c++14\"" CMAKE_OPTIONS="" CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release" @@ -28,7 +28,11 @@ if version_ge $VERSION "3."; then CMAKE_OPTIONS+=" -DENABLE_PRECOMPILED_HEADERS:BOOL=OFF" CMAKE_OPTIONS+=" -DCMAKE_CXX_FLAGS=-fPIC" CMAKE_OPTIONS+=" -DCMAKE_C_FLAGS=-fPIC" - + if [[ $DIST_NAME == "FD" && $DIST_VERSION == "34" ]] + then + CMAKE_OPTIONS+=" -DCMAKE_CXX_FLAGS=${CPPSTD}" + fi + CMAKE_OPTIONS+=" -DCMAKE_C_FLAGS=-fPIC" # else echo "*** openCV version $VERSION < 3." diff --git a/products/openturns.pyconf b/products/openturns.pyconf index d9db64f..7b50d65 100644 --- a/products/openturns.pyconf +++ b/products/openturns.pyconf @@ -37,7 +37,7 @@ default_win : version_1_16 : { - patches : ['openturns-1.16.0001.patch'] + patches : ['openturns-1.16.0001.patch','openturns-1.16.0002.patch'] } version_1_16_win : diff --git a/products/patches/openturns-1.16.0002.patch b/products/patches/openturns-1.16.0002.patch new file mode 100644 index 0000000..4a95719 --- /dev/null +++ b/products/patches/openturns-1.16.0002.patch @@ -0,0 +1,16 @@ +diff -Naur openturns_ref/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx openturns_new/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx +--- openturns_ref/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2020-11-10 13:21:21.000000000 +0100 ++++ openturns_new/lib/src/Base/Algo/openturns/KarhunenLoeveAlgorithmImplementation.hxx 2021-05-21 11:08:48.206212694 +0200 +@@ -24,6 +24,12 @@ + #include "openturns/PersistentObject.hxx" + #include "openturns/CovarianceModel.hxx" + #include "openturns/KarhunenLoeveResult.hxx" ++#ifdef __GNUC__ ++# include ++# if __GNUC_PREREQ(11,0) ++# include ++# endif ++#endif // __GNUC__ + + BEGIN_NAMESPACE_OPENTURNS + diff --git a/products/patches/paraview-5.9.0-gcc.11.0.patch b/products/patches/paraview-5.9.0-gcc.11.0.patch new file mode 100644 index 0000000..443e2cf --- /dev/null +++ b/products/patches/paraview-5.9.0-gcc.11.0.patch @@ -0,0 +1,94 @@ +diff -Naur ParaView_ref ParaView_new +diff -Naur ParaView_ref/VTK/Common/Core/vtkDataArrayPrivate.txx ParaView_new/VTK/Common/Core/vtkDataArrayPrivate.txx +--- ParaView_ref/VTK/Common/Core/vtkDataArrayPrivate.txx 2021-02-04 15:22:02.000000000 +0100 ++++ ParaView_new/VTK/Common/Core/vtkDataArrayPrivate.txx 2021-06-22 13:11:58.767853208 +0200 +@@ -25,6 +25,14 @@ + #include + #include // for assert() + #include ++#ifdef __GNUC__ ++#include ++# ifdef __GNUC_PREREQ ++# if __GNUC_PREREQ(11,0) ++# include ++# endif ++# endif ++#endif // __GNUC__ + + namespace vtkDataArrayPrivate + { +diff -Naur ParaView_ref/VTK/Common/Core/vtkGenericDataArrayLookupHelper.h ParaView_new/VTK/Common/Core/vtkGenericDataArrayLookupHelper.h +--- ParaView_ref/VTK/Common/Core/vtkGenericDataArrayLookupHelper.h 2021-02-04 15:22:02.000000000 +0100 ++++ ParaView_new/VTK/Common/Core/vtkGenericDataArrayLookupHelper.h 2021-06-22 13:12:33.343455420 +0200 +@@ -27,6 +27,14 @@ + #include + #include + #include ++#ifdef __GNUC__ ++#include ++# ifdef __GNUC_PREREQ ++# if __GNUC_PREREQ(11,0) ++# include ++# endif ++# endif ++#endif // __GNUC__ + + namespace detail + { +diff -Naur ParaView_ref/VTK/Common/DataModel/vtkPiecewiseFunction.cxx ParaView_new/VTK/Common/DataModel/vtkPiecewiseFunction.cxx +--- ParaView_ref/VTK/Common/DataModel/vtkPiecewiseFunction.cxx 2021-02-04 15:22:03.000000000 +0100 ++++ ParaView_new/VTK/Common/DataModel/vtkPiecewiseFunction.cxx 2021-06-22 16:03:40.045670686 +0200 +@@ -24,7 +24,14 @@ + #include + #include + #include +- ++#ifdef __GNUC__ ++#include ++# ifdef __GNUC_PREREQ ++# if __GNUC_PREREQ(11,0) ++# include ++# endif ++# endif ++#endif // __GNUC__ + vtkStandardNewMacro(vtkPiecewiseFunction); + + // The Node structure +diff -Naur ParaView_ref/VTK/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx ParaView_new/VTK/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx +--- ParaView_ref/VTK/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx 2021-02-04 15:22:03.000000000 +0100 ++++ ParaView_new/VTK/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx 2021-06-22 16:36:07.933839424 +0200 +@@ -27,6 +27,14 @@ + #include "vtkHyperTreeGridNonOrientedCursor.h" + + #include ++#ifdef __GNUC__ ++#include ++# ifdef __GNUC_PREREQ ++# if __GNUC_PREREQ(11,0) ++# include ++# endif ++# endif ++#endif // __GNUC__ + + vtkStandardNewMacro(vtkHyperTreeGridThreshold); + +diff -Naur ParaView_ref/VTK/Rendering/Core/vtkColorTransferFunction.cxx ParaView_new/VTK/Rendering/Core/vtkColorTransferFunction.cxx +--- ParaView_ref/VTK/Rendering/Core/vtkColorTransferFunction.cxx 2021-02-04 15:22:03.000000000 +0100 ++++ ParaView_new/VTK/Rendering/Core/vtkColorTransferFunction.cxx 2021-06-23 11:25:49.494921639 +0200 +@@ -23,7 +23,15 @@ + #include + #include + #include +- ++#include ++#ifdef __GNUC__ ++#include ++# ifdef __GNUC_PREREQ ++# if __GNUC_PREREQ(11,0) ++# include ++# endif ++# endif ++#endif // __GNUC__ + vtkStandardNewMacro(vtkColorTransferFunction); + + #define MY_MAX(x, y) ((x) > (y) ? (x) : (y)) diff --git a/products/patches/root-6.22.02-gcc-11.0.patch b/products/patches/root-6.22.02-gcc-11.0.patch new file mode 100644 index 0000000..f567ca6 --- /dev/null +++ b/products/patches/root-6.22.02-gcc-11.0.patch @@ -0,0 +1,11 @@ +diff -Naur root_ref/core/foundation/inc/ROOT/libcpp_string_view.h root_new/core/foundation/inc/ROOT/libcpp_string_view.h +--- root_ref/core/foundation/inc/ROOT/libcpp_string_view.h 2020-08-17 14:41:56.000000000 +0200 ++++ root_new/core/foundation/inc/ROOT/libcpp_string_view.h 2021-05-21 12:52:20.897359685 +0200 +@@ -15,6 +15,7 @@ + #error "Do not use libcpp_string_view.h directly. #include \"RWrap_libcpp_string_view.h\" instead." + #endif // RWrap_libcpp_string_view_h + ++#include + /* + string_view synopsis + diff --git a/products/qt.pyconf b/products/qt.pyconf index 2d9eb44..c0fe669 100644 --- a/products/qt.pyconf +++ b/products/qt.pyconf @@ -7,7 +7,7 @@ default: system_info : { rpm : [] - rpm_dev : ["qt5-devel"] + rpm_dev : ["qt5-qtbase-devel"] apt : [] apt_dev : ["qttools5-dev", "libqt5svg5-dev", "libqt5x11extras5-dev", "qtxmlpatterns5-dev-tools"] } diff --git a/products/root.pyconf b/products/root.pyconf index 1783824..862f5bf 100644 --- a/products/root.pyconf +++ b/products/root.pyconf @@ -62,7 +62,7 @@ version_6_22_06_win: version_6_22_02: { get_source : "archive" - patches : ['root-6.22.02.patch'] + patches : ['root-6.22.02.patch', 'root-6.22.02-gcc-11.0.patch'] } version_6_22_02_win: -- 2.39.2