From 5af9b00396b208a0e4b82c19d18e6bb25975230e Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Wed, 26 Jan 2022 19:02:43 +0100 Subject: [PATCH] spns #28761: MEDCOUPLING 7.8 CentOS 8 - fix XDR issues --- applications/MEDCOUPLING-7.8.2.pyconf | 29 +++------- products/MEDCOUPLING.pyconf | 18 ++++++ products/patches/FindXDR-CO8.patch | 83 +++++++++++++++++++++++++++ 3 files changed, 110 insertions(+), 20 deletions(-) create mode 100644 products/patches/FindXDR-CO8.patch diff --git a/applications/MEDCOUPLING-7.8.2.pyconf b/applications/MEDCOUPLING-7.8.2.pyconf index 8c580e6..3a8bc8d 100644 --- a/applications/MEDCOUPLING-7.8.2.pyconf +++ b/applications/MEDCOUPLING-7.8.2.pyconf @@ -3,10 +3,11 @@ APPLICATION : { - name : 'MEDCOUPLING-7.8.2-SAT5' + name : 'MEDCOUPLING-7.8.2' workdir : $LOCAL.workdir + $VARS.sep + $APPLICATION.name + '-' + $VARS.dist tag : 'V7_8_0' - #base : 'no' + base : 'no' + debug : 'no' environ : { } @@ -14,14 +15,12 @@ APPLICATION : { # PREREQUISITES : - Python : '2.7.10' -# OP 18/04/2017 Artifact 8489 : passage a boost 1.58.0 - #boost : '1.52.0' + Python : '2.7.16' boost : '1.58.0' hdf5 : '1.8.14' swig : '2.0.8' medfile : '3.2.0' - doxygen : '1.8.3.1' + doxygen : '1.8.14' graphviz : '2.38.0' libxml2 : '2.9.0' cppunit : '1.12.1' @@ -35,12 +34,7 @@ APPLICATION : Jinja2 : '2.7.3' docutils : '0.12' markupsafe : '0.23' - - # SALOME MODULES : -# OP 18/04/2017 Artifact 8489 : passage au tag V7_8_2 - #'MEDCOUPLING' : {section: 'version_V7_8_0', tag : 'V7_8_BR'} 'MEDCOUPLING' : {section: 'version_V7_8_0', tag : 'V7_8_2'} - } test_base : { @@ -49,15 +43,10 @@ APPLICATION : } } - __overwrite__ : [ - { - __condition__ : "VARS.dist in ['FD24']" -# OP 18/04/2017 Artifact 8498 : Passage de la compilation de medfile a cmake -# La section CMake devient la section par defaut -# # medfile does not compile under Fedora 24 using autotools -# 'PRODUCTS.medfile.default.compil_script' : "medCMake.sh" -# 'PRODUCTS.medfile.default.test_build' : "make test" - } + { + __condition__ : "VARS.dist in ['CO8']" + 'APPLICATION.products.MEDCOUPLING' : {tag:'V7_8_2', base : 'no', section: 'version_V7_8_2_CO8'} + } ] diff --git a/products/MEDCOUPLING.pyconf b/products/MEDCOUPLING.pyconf index e6e6b5c..f1ca604 100644 --- a/products/MEDCOUPLING.pyconf +++ b/products/MEDCOUPLING.pyconf @@ -195,6 +195,24 @@ version_V8_5_0 : ] } +version_V7_8_2_CO8 : +{ + cmake_options : "-DMEDCOUPLING_ENABLE_PARTITIONER=OFF -DMEDCOUPLING_PARTITIONER_METIS=OFF -DMEDCOUPLING_PARTITIONER_SCOTCH=OFF" + depend : [ + "boost", + "Python", + "hdf5", + "medfile", + "libxml2", + "Sphinx", + "setuptools", + "numpy", + "scipy", + "lapack" + ] + patches: ["FindXDR-CO8.patch"] +} + version_7_8_2_to_8_4_0 : { cmake_options : "-DMEDCOUPLING_ENABLE_PYTHON=ON -DMEDCOUPLING_ENABLE_PARTITIONER=ON -DMEDCOUPLING_ENABLE_RENUMBER=ON -DMEDCOUPLING_PARTITIONER_METIS=ON -DMEDCOUPLING_PARTITIONER_SCOTCH=ON -DMEDCOUPLING_PARTITIONER_PARMETIS=OFF -DMEDCOUPLING_MICROMED=OFF -DMEDCOUPLING_USE_MPI=OFF" diff --git a/products/patches/FindXDR-CO8.patch b/products/patches/FindXDR-CO8.patch new file mode 100644 index 0000000..712045e --- /dev/null +++ b/products/patches/FindXDR-CO8.patch @@ -0,0 +1,83 @@ +diff --git a/cmake_files/FindXDR.cmake b/cmake_files/FindXDR.cmake +index e8e86253..d8b4bb7a 100644 +--- a/cmake_files/FindXDR.cmake ++++ b/cmake_files/FindXDR.cmake +@@ -21,8 +21,16 @@ MESSAGE(STATUS "Check for XDR ...") + + FIND_PATH(XDR_INCLUDE_DIRS rpc/xdr.h) + IF(XDR_INCLUDE_DIRS) +- SET(XDR_DEFINITIONS "-DHAS_XDR") +-ENDIF() ++ SET(XDR_DEFINITIONS "-DHAS_XDR") ++ELSE(XDR_INCLUDE_DIRS) ++ IF(EXISTS "/usr/include/tirpc/rpc/xdr.h") ++ MESSAGE(STATUS "XDR was found in /usr/include/tirpc ...") ++ include_directories(/usr/include/tirpc) ++ SET(XDR_DEFINITIONS "-DHAS_XDR") ++ SET(XDR_INCLUDE_DIRS "/usr/include/tirpc") ++ FIND_LIBRARY(XDR_LIBRARIES tirpc xdr) ++ ENDIF() ++ENDIF(XDR_INCLUDE_DIRS) + + IF(WIN32) + FIND_LIBRARY(XDR_LIBRARIES xdr) # To get the .lib file from XDR +diff --git a/src/INTERP_KERNELTest/CMakeLists.txt b/src/INTERP_KERNELTest/CMakeLists.txt +index b63df2ac..d6178314 100644 +--- a/src/INTERP_KERNELTest/CMakeLists.txt ++++ b/src/INTERP_KERNELTest/CMakeLists.txt +@@ -81,12 +81,12 @@ IF(NOT MEDCOUPLING_MICROMED) + PerfTest.cxx + ) + ADD_EXECUTABLE(PerfTest ${PerfTest_SOURCES}) +- TARGET_LINK_LIBRARIES(PerfTest InterpKernelTest ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS}) ++ TARGET_LINK_LIBRARIES(PerfTest InterpKernelTest ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS} ${XDR_LIBRARIES}) + INSTALL(TARGETS PerfTest DESTINATION ${MEDCOUPLING_INSTALL_BINS}) + ENDIF(NOT MEDCOUPLING_MICROMED) + + ADD_LIBRARY(InterpKernelTestUtils ${InterpKernelTestUtils_SOURCES}) +-TARGET_LINK_LIBRARIES(InterpKernelTestUtils interpkernel) ++TARGET_LINK_LIBRARIES(InterpKernelTestUtils interpkernel ) + ADD_LIBRARY(InterpKernelTest ${InterpKernelTest_SOURCES}) + + SET(InterpKernelTest_LIBS medcoupling interpkernel ${CPPUNIT_LIBRARIES}) +@@ -96,7 +96,7 @@ ENDIF(NOT MEDCOUPLING_MICROMED) + TARGET_LINK_LIBRARIES(InterpKernelTest ${InterpKernelTest_LIBS} InterpKernelTestUtils) + + ADD_EXECUTABLE(TestINTERP_KERNEL ${TestINTERP_KERNEL_SOURCES}) +-TARGET_LINK_LIBRARIES(TestINTERP_KERNEL InterpKernelTest ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS}) ++TARGET_LINK_LIBRARIES(TestINTERP_KERNEL InterpKernelTest ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS} ${XDR_LIBRARIES}) + ADD_TEST(TestINTERP_KERNEL TestINTERP_KERNEL) + SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) + SET_TESTS_PROPERTIES(TestINTERP_KERNEL PROPERTIES ENVIRONMENT "${tests_env}") +diff --git a/src/MEDLoader/CMakeLists.txt b/src/MEDLoader/CMakeLists.txt +index 6d0ed57c..9ea3b7b6 100644 +--- a/src/MEDLoader/CMakeLists.txt ++++ b/src/MEDLoader/CMakeLists.txt +@@ -39,6 +39,7 @@ IF(WIN32) + ENDIF(MEDCOUPLING_MEDLOADER_USE_XDR) + ELSE(WIN32) + SET(MEDLOADER_XDR_INCLUDE_DIRS ${XDR_INCLUDE_DIRS}) ++ SET(MEDLOADER_XDR_LIBRARIES ${XDR_LIBRARIES}) + ENDIF(WIN32) + + INCLUDE_DIRECTORIES( +diff --git a/src/MEDLoader/Test/CMakeLists.txt b/src/MEDLoader/Test/CMakeLists.txt +index a230e8e5..36640deb 100644 +--- a/src/MEDLoader/Test/CMakeLists.txt ++++ b/src/MEDLoader/Test/CMakeLists.txt +@@ -42,13 +42,13 @@ SET(TestSauvLoader_SOURCES + SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) + + ADD_EXECUTABLE(TestMEDLoader ${TestMEDLoader_SOURCES}) +-TARGET_LINK_LIBRARIES(TestMEDLoader medloader InterpKernelTestUtils ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS}) ++TARGET_LINK_LIBRARIES(TestMEDLoader medloader InterpKernelTestUtils ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS} ${XDR_LIBRARIES}) + ADD_TEST(TestMEDLoader TestMEDLoader) + SET_TESTS_PROPERTIES(TestMEDLoader PROPERTIES ENVIRONMENT "${tests_env}") + + ADD_EXECUTABLE(TestSauvLoader ${TestSauvLoader_SOURCES}) + +-TARGET_LINK_LIBRARIES(TestSauvLoader medloader InterpKernelTestUtils ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS}) ++TARGET_LINK_LIBRARIES(TestSauvLoader medloader InterpKernelTestUtils ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS} ${XDR_LIBRARIES}) + ADD_TEST(TestSauvLoader TestSauvLoader) + SET_TESTS_PROPERTIES(TestSauvLoader PROPERTIES ENVIRONMENT "${tests_env}") + -- 2.39.2