From: Guytri KASTANE Date: Thu, 24 Oct 2024 10:16:37 +0000 (+0200) Subject: bos #43318: update embedded nlopt version from 2.5.0 to 2.7.0 and fix cmake options X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=63ca9d9b7dbf8bd4e183cff352d009030a4832e0;p=tools%2Fsat_salome.git bos #43318: update embedded nlopt version from 2.5.0 to 2.7.0 and fix cmake options --- diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 490a1a3..39d5449 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -234,6 +234,7 @@ __overwrite__ : 'APPLICATION.products.opencv' : '3.2.0' 'APPLICATION.products.cminpack' : 'native' 'APPLICATION.products.netcdf' : '4.6.2' + 'APPLICATION.products.nlopt' : '2.7.0' 'APPLICATION.products.qt' : '5.15.2' 'APPLICATION.products.qwt' : '6.1.6' 'APPLICATION.products.poetry' : {tag: '1.5.1', base: 'no', section: 'version_1_5_1_x86_64' } @@ -299,7 +300,7 @@ __overwrite__ : # - xmlpatterns executable __condition__ : "VARS.dist in ['DB10']" 'APPLICATION.rm_products' : ['nose_py3','assimulo', 'irmb', 'mcut'] - 'APPLICATION.products.nlopt' : '2.4.2' + 'APPLICATION.products.nlopt' : '2.7.0' 'APPLICATION.products.opencv' : '3.2.0' 'APPLICATION.products.cminpack' : 'native' 'APPLICATION.products.hdf5' : 'native' @@ -363,7 +364,7 @@ __overwrite__ : 'APPLICATION.rm_products' : ['nose_py3','assimulo', 'poetry', 'poetry_core', 'BasicIterativeStatistics'] # 'APPLICATION.products.sphinxintl' : {tag: '0.9.10', base: 'no', section: 'version_0_9_10_no_pip' } 'APPLICATION.products.cminpack' : '1.3.6' - 'APPLICATION.products.nlopt' : '2.4.2' + 'APPLICATION.products.nlopt' : '2.7.0' 'APPLICATION.products.openturns' : {tag: '1.22', base: 'no', section: 'version_1_22_CO8' } 'APPLICATION.products.PyFMI' : {tag: '2.6', base: 'no', section: 'version_2_6_no_pip' } 'APPLICATION.products.statsmodels' : {tag: '0.6.1', base: 'no', section: 'version_0_6_1_no_pip' } @@ -380,7 +381,7 @@ __overwrite__ : __condition__ : "VARS.dist in ['CO9']" 'APPLICATION.rm_products' : ['nose_py3','assimulo'] # 'APPLICATION.products.lapack' : '3.8.0' - 'APPLICATION.products.nlopt' : '2.4.2' + 'APPLICATION.products.nlopt' : '2.7.0' 'APPLICATION.products.cminpack' : '1.3.6' 'APPLICATION.products.qwt' : '6.1.6' 'APPLICATION.products.PyQt' : '5.15.3' diff --git a/applications/SALOME-master.pyconf b/applications/SALOME-master.pyconf index c7d5b85..3803fd9 100644 --- a/applications/SALOME-master.pyconf +++ b/applications/SALOME-master.pyconf @@ -101,7 +101,7 @@ APPLICATION : netgen : '5.3.1_with_CAS_7.8' netcdf : '4.6.2' netCDF4 : '1.6.5' - nlopt : '2.5.0' + nlopt : '2.7.0' nose: '1.3.7' numpy : '1.21.1' numpydoc : '1.6.0' diff --git a/products/compil_scripts/nlopt-2.7.0.sh b/products/compil_scripts/nlopt-2.7.0.sh new file mode 100755 index 0000000..856bbd1 --- /dev/null +++ b/products/compil_scripts/nlopt-2.7.0.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +echo "##########################################################################" +echo "nlopt" $VERSION +echo "##########################################################################" + +CMAKE_OPTIONS="" + +### common compiler and install settings +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" +CMAKE_OPTIONS+=" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" +if [ -n "$SAT_DEBUG" ]; then + CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Debug" +else + CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release" +fi + +if [ -n "$SWIG_ROOT_DIR" ] && [ "$SAT_swig_IS_NATIVE" != "1" ]; then + CMAKE_OPTIONS+=" -DSWIG_EXECUTABLE=${SWIG_ROOT_DIR}/bin/swig" +fi +CMAKE_OPTIONS+=" -DBUILD_SHARED_LIBS:BOOL=ON" +CMAKE_OPTIONS+=" -DNLOPT_MATLAB:BOOL=OFF" +CMAKE_OPTIONS+=" -DNLOPT_OCTAVE:BOOL=OFF" +CMAKE_OPTIONS+=" -DNLOPT_GUILE:BOOL=OFF" +CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib" + +echo +echo "*** cmake" $CMAKE_OPTIONS + +rm -rf $BUILD_DIR +mkdir -p $BUILD_DIR +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/openturns-1.23.sh b/products/compil_scripts/openturns-1.23.sh index 3e151b9..2132b95 100755 --- a/products/compil_scripts/openturns-1.23.sh +++ b/products/compil_scripts/openturns-1.23.sh @@ -46,6 +46,10 @@ case $LINUX_DISTRIBUTION in esac # Blas/Lapack +if [[ "$LINUX_DISTRIBUTION" == "CO8" && "$SAT_lapack_IS_NATIVE" == "1" && -f /usr/lib64/libcblas.so && -f /usr/lib64/libblas.so ]]; then + CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=/usr/lib64/libcblas.so" + CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=/usr/lib64/libblas.so" +fi if [ -n "$LAPACK_ROOT_DIR" ] && [ "$SAT_lapack_IS_NATIVE" != "1" ]; then CMAKE_OPTIONS+=" -DLAPACK_DIR=${LAPACK_ROOT_DIR}/lib/cmake/lapack-3.8.0" CMAKE_OPTIONS+=" -DCBLAS_DIR=${LAPACK_ROOT_DIR}/lib/cmake/cblas-3.8.0" @@ -81,16 +85,13 @@ else CMAKE_OPTIONS+=" -DCMINPACK_INCLUDE_DIR=${CMINPACK_ROOT_DIR}/include/cminpack-1" fi -if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && -f /usr/lib64/libcblas.so && -f /usr/lib64/libblas.so ]]; then - CMAKE_OPTIONS+=" -DCBLAS_LIBRARIES=/usr/lib64/libcblas.so" - CMAKE_OPTIONS+=" -DBLAS_LIBRARIES=/usr/lib64/libblas.so" -fi ## nlopt if [ -n "$NLOPT_ROOT_DIR" ] && [ "$SAT_nlopt_IS_NATIVE" != "1" ]; then - CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIR:STRING=${NLOPT_ROOT_DIR}/include" + CMAKE_OPTIONS+=" -DNLOPT_ROOT_DIR:PATH=${NLOPT_ROOT_DIR}" + CMAKE_OPTIONS+=" -DNLOPT_INCLUDE_DIR:PATH=${NLOPT_ROOT_DIR}/include" CMAKE_OPTIONS+=" -DNLOPT_LIBRARY:STRING=${NLOPT_ROOT_DIR}/lib/libnlopt.so" - CMAKE_OPTIONS+=" -DNLOPT_DIR:STRING=${NLOPT_ROOT_DIR}" + CMAKE_OPTIONS+=" -DNLopt_DIR:PATH=${NLOPT_ROOT_DIR}/lib/cmake/nlopt" fi # Boost diff --git a/products/nlopt.pyconf b/products/nlopt.pyconf index 9f22871..eb36891 100644 --- a/products/nlopt.pyconf +++ b/products/nlopt.pyconf @@ -46,3 +46,8 @@ version_2_6_0: { compil_script : "nlopt-2.6.0" + $VARS.scriptExtension } + +version_2_7_0: +{ + compil_script : "nlopt-2.7.0" + $VARS.scriptExtension +}