source: issm/oecreview/Archive/27032-27229/ISSM-27193-27194.diff

Last change on this file was 27230, checked in by Mathieu Morlighem, 3 years ago

CHG: oecreview

File size: 6.3 KB
RevLine 
[27230]1Index: ../trunk-jpl/externalpackages/dakota/install-6.2-linux-static.sh
2===================================================================
3--- ../trunk-jpl/externalpackages/dakota/install-6.2-linux-static.sh (revision 27193)
4+++ ../trunk-jpl/externalpackages/dakota/install-6.2-linux-static.sh (revision 27194)
5@@ -8,14 +8,22 @@
6
7 PREFIX="${ISSM_DIR}/externalpackages/dakota/install" # Set to location where external package should be installed
8
9+# Find libgfortran and libgcc so we do not have to hardcode them
10+#
11+# TODO:
12+# - Move this to etc/environment.sh
13+#
14+LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
15+LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
16+LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1
17+
18 ## Environment
19 #
20-export BLAS_LIBS="-L${BLAS_ROOT}/lib -lfblas -L/usr/lib/x86_64-linux-gnu -lgfortran" # Need to export BLAS_LIBS *and* pass it as an option to CMake to ensure that external packages also find it
21-export CXXFLAGS='-std=c++98' # Setting CXXFLAGS to deal with C++11 incompatibility with MATLAB's Boost (absolutely necessary for this version)
22+export BLAS_LIBS="-L${BLAS_ROOT}/lib -lfblas ${LIBGFORTRAN_ROOT}/libgfortran.a ${LIBGFORTRAN_ROOT}/libquadmath.a ${LIBGCC}" # Need to export BLAS_LIBS *and* pass it as an option to CMake to ensure that external packages also find it
23 export DAK_BUILD=${ISSM_DIR}/externalpackages/dakota/build # DO NOT CHANGE THIS
24 export DAK_INSTALL=${PREFIX} # DO NOT CHANGE THIS
25 export DAK_SRC=${ISSM_DIR}/externalpackages/dakota/src # DO NOT CHANGE THIS
26-export LAPACK_LIBS="-L${LAPACK_ROOT}/lib -lflapack -L/usr/lib/x86_64-linux-gnu -lgfortran" # Need to export LAPACK_LIBS *and* pass it as an option to CMake to ensure that external packages also find it
27+export LAPACK_LIBS="-L${LAPACK_ROOT}/lib -lflapack -L/usr/lib/x86_64-linux-gnu ${LIBGFORTRAN_ROOT}/libgfortran.a ${LIBGFORTRAN_ROOT}/libquadmath.a ${LIBGCC}" # Need to export LAPACK_LIBS *and* pass it as an option to CMake to ensure that external packages also find it
28
29 # Cleanup
30 rm -rf ${DAK_BUILD} ${DAK_INSTALL} ${DAK_SRC}
31@@ -53,6 +61,7 @@
32 -DCMAKE_C_FLAGS="-fPIC -Wno-error=implicit-function-declaration" \
33 -DCMAKE_CXX_COMPILER=${MPI_HOME}/bin/mpicxx \
34 -DCMAKE_CXX_FLAGS="-fPIC" \
35+ -DCMAKE_CXX_STANDARD="11" \
36 -DCMAKE_Fortran_COMPILER=${MPI_HOME}/bin/mpif77 \
37 -DBoost_NO_BOOST_CMAKE=TRUE \
38 -DHAVE_ACRO=OFF \
39Index: ../trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh
40===================================================================
41--- ../trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh (revision 27193)
42+++ ../trunk-jpl/externalpackages/dakota/install-6.2-mac-static.sh (revision 27194)
43@@ -79,6 +79,7 @@
44 -DCMAKE_C_FLAGS="-fPIC -Wno-error=implicit-function-declaration" \
45 -DCMAKE_CXX_COMPILER=${MPI_HOME}/bin/mpicxx \
46 -DCMAKE_CXX_FLAGS="-fPIC -fdelayed-template-parsing" \
47+ -DCMAKE_CXX_STANDARD="11" \
48 -DCMAKE_Fortran_COMPILER=${MPI_HOME}/bin/mpif77 \
49 -DCMAKE_Fortran_FLAGS="-fPIC -fallow-argument-mismatch" \
50 -DBoost_NO_BOOST_CMAKE=TRUE \
51Index: ../trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh
52===================================================================
53--- ../trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh (revision 27193)
54+++ ../trunk-jpl/externalpackages/gmsh/install-4-linux-static.sh (revision 27194)
55@@ -16,16 +16,12 @@
56
57 # Find libgfortran and libgcc so we do not have to hardcode them
58 #
59-# NOTE: For now, paths are hardcoded.
60-#
61 # TODO:
62 # - Move this to etc/environment.sh
63-# - Figure out how to find and grep for single result like we do with mdfind
64-# under macOS.
65 #
66-LIBGFORTRAN="/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.a"
67+LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
68 LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
69-LIBGCC="/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a"
70+LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
71
72 PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
73
74Index: ../trunk-jpl/externalpackages/gmsh/install-4-linux.sh
75===================================================================
76--- ../trunk-jpl/externalpackages/gmsh/install-4-linux.sh (revision 27193)
77+++ ../trunk-jpl/externalpackages/gmsh/install-4-linux.sh (revision 27194)
78@@ -16,6 +16,14 @@
79
80 PREFIX="${ISSM_DIR}/externalpackages/gmsh/install" # Set to location where external package should be installed
81
82+# Find libgfortran so that we do not have to hardcode it.
83+#
84+# TODO:
85+# - Move this to etc/environment.sh
86+#
87+LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
88+LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
89+
90 # Cleanup
91 rm -rf ${PREFIX} src
92 mkdir -p ${PREFIX} src
93@@ -52,7 +60,7 @@
94 -DENABLE_MPI=1 \
95 -DENABLE_OCC=0 \
96 -DENABLE_TOUCHBAR=0 \
97- -DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas" \
98+ -DBLAS_LAPACK_LIBRARIES="-L${LAPACK_ROOT}/lib -lflapack -L${BLAS_ROOT}/lib -lfblas -L${LIBGFORTRAN_ROOT} -lgfortran" \
99 -DMETIS_ROOT="${METIS_ROOT}"
100
101 # Compile and install
102Index: ../trunk-jpl/externalpackages/gmt/install-6-linux-static.sh
103===================================================================
104--- ../trunk-jpl/externalpackages/gmt/install-6-linux-static.sh (revision 27193)
105+++ ../trunk-jpl/externalpackages/gmt/install-6-linux-static.sh (revision 27194)
106@@ -8,16 +8,12 @@
107
108 # Find libgfortran and libgcc so we do not have to hardcode them
109 #
110-# NOTE: For now, paths are hardcoded.
111-#
112 # TODO:
113 # - Move this to etc/environment.sh
114-# - Figure out how to find and grep for single result like we do with mdfind
115-# under macOS.
116 #
117-LIBGFORTRAN="/usr/lib/gcc/x86_64-linux-gnu/8/libgfortran.a"
118+LIBGFORTRAN=$(find /usr -name libgfortran* | egrep -n libgfortran.a | sed "s/[0-9]*://g" | head -1)
119 LIBGFORTRAN_ROOT=${LIBGFORTRAN%/*}
120-LIBGCC="/usr/lib/gcc/x86_64-linux-gnu/8/libgcc.a"
121+LIBGCC=$(find ${LIBGFORTRAN_ROOT} -name libgcc* | egrep -n libgcc.a | sed "s/[0-9]*://g" | head -1)
122
123 GDAL_EXTRA_LIBS="-lstdc++" # Determined by running `$GDAL_ROOT/bin/gdal-config --dep-libs` then removing duplicate libs
124 NETCDF_EXTRA_LIBS="-lm -ldl -lz" # `$NETCDF_ROOT/bin/nc-config --libs` does not report certain dependencies of certain static libraries (see also customized configuration file ./configs/6.0/static/cmake/modules/FindNETCDF.cmake)
Note: See TracBrowser for help on using the repository browser.