From: Nabil Ghodbane Date: Sun, 23 Jan 2022 22:06:37 +0000 (+0100) Subject: netcfd: OK, zeromq: OK, nose: OK, gdal: OK, PERSALYS: KO X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fspns%2F26828;p=tools%2Fsat_salome.git netcfd: OK, zeromq: OK, nose: OK, gdal: OK, PERSALYS: KO --- diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index fb38e38..d612675 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -53,6 +53,7 @@ APPLICATION : mpc : 'native' gmp : 'native' mpfr : 'native' + gdal : '2.4.0' gmsh : '4.8.4' graphviz : '2.38.0' hdf5 : '1.10.3' @@ -71,7 +72,9 @@ APPLICATION : MeshGems : '2.14-1' metis : '5.1.0' netgen : '6.2.2101' + netcdf : '4.6.2' nlopt : '2.5.0' + nose: '1.3.7' numpy : '1.16.4' omniORB : '4.2.2' omniORBpy : '4.2.2' @@ -83,6 +86,7 @@ APPLICATION : pandas : '0.25.2' patsy : '0.5.2' ParaView : '5.9.0' + PERSALYS: 'V11.0' petsc : {tag : '3.16.0', section: 'version_3_16_0'} Pillow : '7.1.1' planegcs : '0.18-3cb6890' @@ -119,6 +123,7 @@ APPLICATION : tk : '8.6.0' topo2volmesh: 'develop' urllib3 : '1.23' + zeromq: '4.3.1' URANIE : '4.5.0' # SALOME MODULES : 'CONFIGURATION' diff --git a/products/PERSALYS.pyconf b/products/PERSALYS.pyconf new file mode 100644 index 0000000..536b6dd --- /dev/null +++ b/products/PERSALYS.pyconf @@ -0,0 +1,42 @@ +default : +{ + name : "PERSALYS" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + archive_info : + { + archive_name : "PERSALYS-" + $APPLICATION.products.PERSALYS + ".tar.gz" + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'netcdf', 'gdal'] + build_depend : ["cmake", "swig"] + opt_depend : ['openmpi'] + patches : [] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties : + { + single_install_dir : "no" + incremental : "yes" + } +} + +default_win : +{ + properties : + { + single_install_dir : "yes" + } + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'pthreads', 'netcdf', 'gdal'] + opt_depend : [] +} + +version_V11_0 +{ + compil_script : 'PERSALYS-V11.0' + $VARS.scriptExtension +} diff --git a/products/compil_scripts/PERSALYS-V11.0.sh b/products/compil_scripts/PERSALYS-V11.0.sh new file mode 100644 index 0000000..e01996a --- /dev/null +++ b/products/compil_scripts/PERSALYS-V11.0.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +echo "##########################################################################" +echo "zeromq" $VERSION +echo "##########################################################################" + +if [ -n "$MPI_ROOT_DIR" ] +then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + export CC=${MPI_ROOT_DIR}/bin/mpicc + export CXX=${MPI_ROOT_DIR}/bin/mpicxx +fi + +CMAKE_OPTIONS="" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" + +if [ -n "$TBB_ROOT_DIR" ] && [ "${TBB_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DTBB_ROOT_DIR=${TBB_ROOT_DIR}" +fi + +### libxml2 settings +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" + CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" + CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" +fi + +# HDF5 +if [ -n "$HDF5_ROOT_DIR" ] && [ "${HDF5_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" + CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" + CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" + CMAKE_OPTIONS+=" -DHDF5_hdf5_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib" + CMAKE_OPTIONS+=" -DHDF5_hdf5_hl_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" + CMAKE_OPTIONS+=" -DHDF5_HL_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" + CMAKE_OPTIONS+=" -DHDF5_C_INCLUDE_DIR=${HDF5_ROOT_DIR}/include" +fi + +### libxml2 settings +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" + CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" + CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" +fi + +## nlopt +if [ -n "$NLOPT_ROOT_DIR" ] && [ "${NLOPT_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIRS:STRING=${NLOPT_ROOT_DIR}/include" + CMAKE_OPTIONS+=" -DNLOPT_LIBRARIES:STRING=${NLOPT_ROOT_DIR}/lib" + CMAKE_OPTIONS+=" -DNLOPT_DIR:STRING=${NLOPT_ROOT_DIR}" +fi + +echo +echo "*** cmake" $CMAKE_OPTIONS +cd $BUILD_DIR +cmake $CMAKE_OPTIONS $SOURCE_DIR/ +if [ $? -ne 0 ] +then + echo "ERROR on cmake" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "########## END" diff --git a/products/compil_scripts/gdal-2.4.0.sh b/products/compil_scripts/gdal-2.4.0.sh index e95e566..9147a98 100755 --- a/products/compil_scripts/gdal-2.4.0.sh +++ b/products/compil_scripts/gdal-2.4.0.sh @@ -11,13 +11,47 @@ CONFIGURE_FLAGS+=" --with-xml2=${LIBXML_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-hdf5=${HDF5_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-netcdf=${NETCDF_ROOT_DIR}" +./configure --prefix=$CURRENT_SOFTWARE_INSTALL_DIR +LDFLAGS= +LDFLAGS+=" -L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" +LDFLAGS+=" -L${NETCDF_ROOT_DIR}/lib -lnetcdf" + +HDF5_CFLAGS= +HDF5_CFLAGS+=" -I${HDF5_ROOT_DIR}/include -L${HDF5_ROOT_DIR}/lib/ -lhdf5" +HDF5_CFLAGS+=" -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" + +LIBS= +LIBS+=" -L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" +LIBS+=" -L${NETCDF_ROOT_DIR}/lib -lnetcdf" + +HDF5_LIBS="-L${HDF5_ROOT_DIR}/lib/ -lhdf5 -L${HDF5_ROOT_DIR}/lib/libhdf5_hl.so -lhdf5_hl" +HDF5_INCLUDE="-I${HDF5_ROOT_DIR}/include" + +CONFIGURE_FLAGS= +#CONFIGURE_FLAGS+=" LDFLAGS=\"$LDFLAGS\"" +#CONFIGURE_FLAGS+=" HDF5_CFLAGS=\"$HDF5_CFLAGS\"" +#CONFIGURE_FLAGS+=" LIBS=\"$LIBS\"" +#CONFIGURE_FLAGS+=" HDF5_LIBS=\"$HDF5_LIBS\"" +#CONFIGURE_FLAGS+=" HDF5_INCLUDE=\"$HDF5_INCLUDE\"" +CONFIGURE_FLAGS+=" --with-pcraster=internal" +CONFIGURE_FLAGS+=" --with-png=internal" +CONFIGURE_FLAGS+=" --with-libtiff=internal" +CONFIGURE_FLAGS+=" --with-geotiff=internal" +CONFIGURE_FLAGS+=" --with-jpeg=internal" +CONFIGURE_FLAGS+=" --with-gif=internal" +CONFIGURE_FLAGS+=" --with-python=yes" +CONFIGURE_FLAGS+=" --with-geos=yes" +CONFIGURE_FLAGS+=" --with-sqlite3=yes" +CONFIGURE_FLAGS+=" --with-hdf5=${HDF5_ROOT_DIR}" +CONFIGURE_FLAGS+=" --with-netcdf=${NETCDF_ROOT_DIR}" + echo -echo "*** configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS" +echo "*** configure $CONFIGURE_FLAGS" rm -rf $BUILD_DIR mkdir -p $BUILD_DIR -cd $SOURCE_DIR -$SOURCE_DIR/gdal/configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS +cd $SOURCE_DIR/gdal +./configure --prefix=$PRODUCT_INSTALL $CONFIGURE_FLAGS if [ $? -ne 0 ] then echo "ERROR on configure" @@ -25,7 +59,7 @@ then fi echo echo "*** make" $MAKE_OPTIONS -make -F GNUMakefile $MAKE_OPTIONS +make $MAKE_OPTIONS if [ $? -ne 0 ] then echo "ERROR on make" diff --git a/products/compil_scripts/zeromq-4.3.1.sh b/products/compil_scripts/zeromq-4.3.1.sh new file mode 100755 index 0000000..e01996a --- /dev/null +++ b/products/compil_scripts/zeromq-4.3.1.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +echo "##########################################################################" +echo "zeromq" $VERSION +echo "##########################################################################" + +if [ -n "$MPI_ROOT_DIR" ] +then + echo "WARNING: setting CC and CXX environment variables and target MPI wrapper" + export CC=${MPI_ROOT_DIR}/bin/mpicc + export CXX=${MPI_ROOT_DIR}/bin/mpicxx +fi + +CMAKE_OPTIONS="" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" + +if [ -n "$TBB_ROOT_DIR" ] && [ "${TBB_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DTBB_ROOT_DIR=${TBB_ROOT_DIR}" +fi + +### libxml2 settings +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" + CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" + CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" +fi + +# HDF5 +if [ -n "$HDF5_ROOT_DIR" ] && [ "${HDF5_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DHDF5_DIR:PATH=${HDF5_ROOT_DIR}/share/cmake/hdf5" + CMAKE_OPTIONS+=" -DHDF5_USE_STATIC_LIBRARIES:BOOL=OFF" + CMAKE_OPTIONS+=" -DHDF5_ROOT:PATH=${HDF5_ROOT_DIR}" + CMAKE_OPTIONS+=" -DHDF5_hdf5_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib" + CMAKE_OPTIONS+=" -DHDF5_hdf5_hl_LIBRARY_RELEASE=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" + CMAKE_OPTIONS+=" -DHDF5_HL_LIBRARY=${HDF5_ROOT_DIR}/lib/libhdf5_hl.so" + CMAKE_OPTIONS+=" -DHDF5_C_INCLUDE_DIR=${HDF5_ROOT_DIR}/include" +fi + +### libxml2 settings +if [ -n "$LIBXML2_ROOT_DIR" ] && [ "${LIBXML2_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DLIBXML2_INCLUDE_DIR:STRING=${LIBXML2_ROOT_DIR}/include/libxml2" + CMAKE_OPTIONS+=" -DLIBXML2_LIBRARIES:STRING=${LIBXML2_ROOT_DIR}/lib/libxml2.so" + CMAKE_OPTIONS+=" -DLIBXML2_XMLLINT_EXECUTABLE=${LIBXML2_ROOT_DIR}/bin/xmllint" +fi + +## nlopt +if [ -n "$NLOPT_ROOT_DIR" ] && [ "${NLOPT_ROOT_DIR}" != "/usr" ]; then + CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIRS:STRING=${NLOPT_ROOT_DIR}/include" + CMAKE_OPTIONS+=" -DNLOPT_LIBRARIES:STRING=${NLOPT_ROOT_DIR}/lib" + CMAKE_OPTIONS+=" -DNLOPT_DIR:STRING=${NLOPT_ROOT_DIR}" +fi + +echo +echo "*** cmake" $CMAKE_OPTIONS +cd $BUILD_DIR +cmake $CMAKE_OPTIONS $SOURCE_DIR/ +if [ $? -ne 0 ] +then + echo "ERROR on cmake" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "########## END" diff --git a/products/env_scripts/gdal.py b/products/env_scripts/gdal.py index 10e1c13..4a3e380 100644 --- a/products/env_scripts/gdal.py +++ b/products/env_scripts/gdal.py @@ -3,9 +3,14 @@ import os.path def set_env(env, prereq_dir, version): env.set('GDAL_ROOT_DIR', prereq_dir) + env.set('GDALHOME', prereq_dir) env.set('GDAL_VERSION',version) env.prepend('PATH', os.path.join(prereq_dir,'bin')) env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) + pyver = 'python' + env.get('PYTHON_VERSION') + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages')) + env.set('GDAL_DATA', os.path.join(prereq_dir,'share','gdal')) + env.set('GDAL_ROOT', os.path.join(prereq_dir,'root')) def set_nativ_env(env): pass diff --git a/products/env_scripts/netcdf.py b/products/env_scripts/netcdf.py index f201e2f..62a4a44 100644 --- a/products/env_scripts/netcdf.py +++ b/products/env_scripts/netcdf.py @@ -2,8 +2,8 @@ import os.path def set_env(env, prereq_dir, version): - env.set('NETCFD_ROOT_DIR', prereq_dir) - env.set('NETCFD_VERSION',version) + env.set('NETCDF_ROOT_DIR', prereq_dir) + env.set('NETCDF_VERSION',version) env.prepend('PATH', os.path.join(prereq_dir,'bin')) env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) diff --git a/products/env_scripts/nose.py b/products/env_scripts/nose.py new file mode 100644 index 0000000..0811867 --- /dev/null +++ b/products/env_scripts/nose.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python +#-*- coding:utf-8 -*- + +import os +import platform + +def set_env(env, prereq_dir, version): + env.set("NOSE_ROOT_DIR",prereq_dir) + pyver = 'python' + env.get('PYTHON_VERSION') + if not platform.system() == "Windows" : + env.prepend('PYTHONPATH', os.path.join(prereq_dir, 'lib', pyver, 'site-packages')) + +def set_nativ_env(env): + pass diff --git a/products/env_scripts/zeromq.py b/products/env_scripts/zeromq.py new file mode 100644 index 0000000..2c125c0 --- /dev/null +++ b/products/env_scripts/zeromq.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python +import os.path + +def set_env(env, prereq_dir, version): + env.set('ZEROMQ_ROOT_DIR', prereq_dir) + env.set('ZEROMQHOME', prereq_dir) + env.set('ZEROMQ_VERSION',version) + env.prepend('PATH', os.path.join(prereq_dir,'bin')) + env.prepend('LD_LIBRARY_PATH',os.path.join(prereq_dir, 'lib')) + +def set_nativ_env(env): + pass diff --git a/products/netcdf.pyconf b/products/netcdf.pyconf index 202f145..e8b6b73 100644 --- a/products/netcdf.pyconf +++ b/products/netcdf.pyconf @@ -39,4 +39,5 @@ default_win : version_4_6_2: { compil_script : 'netcdf-4.6.2' + $VARS.scriptExtension + patches : ['netcdf-4.6.2-0001.patch'] } diff --git a/products/nose.pyconf b/products/nose.pyconf new file mode 100644 index 0000000..a2d0bae --- /dev/null +++ b/products/nose.pyconf @@ -0,0 +1,31 @@ +default : +{ + name : "nose" + build_source : "script" + compil_script : 'pip_install' + $VARS.scriptExtension + get_source : "archive" + system_info : + { + rpm : ["python3-nose"] + rpm_dev : [] + apt : ["python3-nose"] + apt_dev : [] + } + archive_info: + { + archive_name : $name + "-" + $APPLICATION.products.nose + ".tar.gz" + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'six', 'setuptools'] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties: + { + incremental : "yes" + pip : "yes" + } +} diff --git a/products/patches/netcdf-4.6.2-0001.patch b/products/patches/netcdf-4.6.2-0001.patch new file mode 100644 index 0000000..b03ba6b --- /dev/null +++ b/products/patches/netcdf-4.6.2-0001.patch @@ -0,0 +1,11 @@ +--- netcdf_ref/CMakeLists.txt 2022-01-23 21:24:33.029077174 +0100 ++++ netcdf_dev/CMakeLists.txt 2022-01-23 21:31:47.176203170 +0100 +@@ -750,7 +750,7 @@ + SET(H5_USE_16_API 0) + ENDIF() + +- FIND_PATH(HAVE_HDF5_H hdf5.h) ++ FIND_PATH(HAVE_HDF5_H hdf5.h PATHS ${HDF5_INCLUDE_DIR}) + IF(NOT HAVE_HDF5_H) + MESSAGE(FATAL_ERROR "Compiling a test with hdf5 failed. Either hdf5.h cannot be found, or the log messages should be checked for another reason.") + ELSE(NOT HAVE_HDF5_H) diff --git a/products/salome_system.pyconf b/products/salome_system.pyconf index 3e16ef4..e61d175 100644 --- a/products/salome_system.pyconf +++ b/products/salome_system.pyconf @@ -65,9 +65,9 @@ default : } "DB09" : { - apt : ["libopenexr22", "libwebp6", "libgfortran3", "libilmbase12", "libevent-2.0-5", "libpng16-16", "libgcc-6-dev", + apt : ["libopenexr22", "libwebp6", "libgfortran3", "libilmbase12", "libevent-2.0-5", "libpng16-16", "libgcc-6-dev", "libtiff5-dev", "libgeotiff-dev", "libffi6", "libtinfo5", "libgphoto2-port12", "libglx0", "libopengl0", "libjsoncpp1"] - apt_dev : ["libtbb-dev"] + apt_dev : ["libtbb-dev", "libpng-dev", "libgif-dev", "libgeos-dev", "libsqlite3-dev"] } "DB10" : { diff --git a/products/zeromq.pyconf b/products/zeromq.pyconf new file mode 100644 index 0000000..6356798 --- /dev/null +++ b/products/zeromq.pyconf @@ -0,0 +1,42 @@ +default : +{ + name : "zeromq" + build_source : "script" + compil_script : $name + $VARS.scriptExtension + get_source : "archive" + archive_info : + { + archive_name : "zeromq-" + $APPLICATION.products.zeromq + ".tar.gz" + } + environ : + { + env_script : $name + ".py" + } + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'netcdf', 'gdal'] + build_depend : ["cmake", "swig"] + opt_depend : ['openmpi'] + patches : [] + source_dir : $APPLICATION.workdir + $VARS.sep + 'SOURCES' + $VARS.sep + $name + build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name + install_dir : 'base' + properties : + { + single_install_dir : "no" + incremental : "yes" + } +} + +default_win : +{ + properties : + { + single_install_dir : "yes" + } + depend : ['Python', 'lapack', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'pthreads', 'netcdf', 'gdal'] + opt_depend : [] +} + +version_4_3_1: +{ + compil_script : 'zeromq-4.3.1' + $VARS.scriptExtension +}