diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e57f8a3..8aef9a3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Create Dockerfile - run: ./cmbenv -c docker-py3.8-debian -p /usr/local + run: ./cmbenv -c docker-py3.9-debian -p /usr/local - name: Set tag name run: tag=$(echo "${GITHUB_REF}" | sed -e 's/.*\/\(v.*\)/\1/') && echo "TAGNAME=${tag}" >> $GITHUB_ENV - name: Build Docker Image diff --git a/cmbenv b/cmbenv index 3377b17..c87e681 100755 --- a/cmbenv +++ b/cmbenv @@ -78,7 +78,7 @@ if [ "x${prefix}" = "x" ]; then show_help exit 1 else - prefix="none" + prefix="NONE" fi fi diff --git a/configs/cori-gcc b/configs/cori-gcc index d79289a..2dc9168 100644 --- a/configs/cori-gcc +++ b/configs/cori-gcc @@ -6,7 +6,7 @@ OSTYPE = linux TEMPLATE = linux # Python version to use -PYVERSION = 3.7 +PYVERSION = 3.9 # Packages to install with pip PIP_PKGS = @@ -41,7 +41,7 @@ MPI_EXTRA_LINK = -shared CFLAGS = -O3 -g -fPIC -pthread CXXFLAGS = -O3 -g -fPIC -pthread -std=c++11 -FCFLAGS = -O3 -g -fPIC -pthread +FCFLAGS = -O3 -g -fPIC -pthread -fallow-argument-mismatch OPENMP_CFLAGS = -fopenmp OPENMP_CXXFLAGS = -fopenmp diff --git a/configs/cori-gcc.pkgs b/configs/cori-gcc.pkgs index f27884b..a92300d 100644 --- a/configs/cori-gcc.pkgs +++ b/configs/cori-gcc.pkgs @@ -27,7 +27,7 @@ openblas:static=1 # a virtualenv or a conda environment. This will also install a set of # common base packages. #python:virtualenv -python:conda nomkl +python:conda #python:default # # Install MPICH. This step is optional and only needed in 2 cases: @@ -53,7 +53,7 @@ bzip2 # Install Boost. boost # -# Install HDF5 (serial version). +# Install HDF5. hdf5 # # Install h5py (using our HDF5). diff --git a/configs/cori-intel b/configs/cori-intel index 97696ad..1eeedc0 100644 --- a/configs/cori-intel +++ b/configs/cori-intel @@ -6,7 +6,7 @@ OSTYPE = linux TEMPLATE = linux # Python version to use -PYVERSION = 3.7 +PYVERSION = 3.9 # Packages to install with pip PIP_PKGS = diff --git a/configs/cori-intel.pkgs b/configs/cori-intel.pkgs index 9f18f84..5a2fdc4 100644 --- a/configs/cori-intel.pkgs +++ b/configs/cori-intel.pkgs @@ -27,7 +27,7 @@ zlib # a virtualenv or a conda environment. This will also install a set of # common base packages. #python:virtualenv -python:conda nomkl +python:conda #python:default # # Install MPICH. This step is optional and only needed in 2 cases: @@ -53,7 +53,7 @@ bzip2 # Install Boost. boost # -# Install HDF5 (serial version). +# Install HDF5. hdf5 # # Install h5py (using our HDF5). diff --git a/configs/docker-py3.7-debian b/configs/docker-py3.7-debian index fffc16e..5497d66 100644 --- a/configs/docker-py3.7-debian +++ b/configs/docker-py3.7-debian @@ -9,7 +9,7 @@ TEMPLATE = docker-debian PYVERSION = 3.7 # Specify the docker base image -DOCKER_BASE = python:3.7-slim-buster +DOCKER_BASE = python:3.7-slim-bullseye # Specify additional packages to install for docker builds DOCKER_SYS_PKGS = m4 libtool autoconf automake llvm libsuitesparse-dev libfftw3-dev libcfitsio-dev libflac-dev zlib1g-dev libbz2-dev libopenblas-dev liblapack-dev libhdf5-dev @@ -47,7 +47,7 @@ MPI_EXTRA_LINK = CFLAGS = -O2 -g -fPIC -pthread CXXFLAGS = -O2 -g -fPIC -pthread -std=c++11 -FCFLAGS = -O2 -g -fPIC -pthread +FCFLAGS = -O2 -g -fPIC -pthread -fallow-argument-mismatch OPENMP_CFLAGS = -fopenmp OPENMP_CXXFLAGS = -fopenmp diff --git a/configs/docker-py3.7-debian.pkgs b/configs/docker-py3.7-debian.pkgs index 67796f1..c305efe 100644 --- a/configs/docker-py3.7-debian.pkgs +++ b/configs/docker-py3.7-debian.pkgs @@ -53,11 +53,11 @@ mpi4py # Install Boost. #boost # -# Install HDF5 (serial version). -#hdf5 +# Install HDF5. +hdf5 # # Install h5py (using our HDF5). -h5py:pkg-config +h5py # # Install healpy healpy diff --git a/configs/docker-py3.8-debian b/configs/docker-py3.8-debian index c61422d..2a41b88 100644 --- a/configs/docker-py3.8-debian +++ b/configs/docker-py3.8-debian @@ -9,7 +9,7 @@ TEMPLATE = docker-debian PYVERSION = 3.8 # Specify the docker base image -DOCKER_BASE = python:3.8-slim-buster +DOCKER_BASE = python:3.8-slim-bullseye # Specify additional packages to install for docker builds DOCKER_SYS_PKGS = m4 libtool autoconf automake llvm libsuitesparse-dev libfftw3-dev libcfitsio-dev libflac-dev zlib1g-dev libbz2-dev libopenblas-dev liblapack-dev libhdf5-dev @@ -47,7 +47,7 @@ MPI_EXTRA_LINK = CFLAGS = -O2 -g -fPIC -pthread CXXFLAGS = -O2 -g -fPIC -pthread -std=c++11 -FCFLAGS = -O2 -g -fPIC -pthread +FCFLAGS = -O2 -g -fPIC -pthread -fallow-argument-mismatch OPENMP_CFLAGS = -fopenmp OPENMP_CXXFLAGS = -fopenmp diff --git a/configs/docker-py3.9-debian b/configs/docker-py3.9-debian index 5543d56..9091bd4 100644 --- a/configs/docker-py3.9-debian +++ b/configs/docker-py3.9-debian @@ -9,7 +9,7 @@ TEMPLATE = docker-debian PYVERSION = 3.9 # Specify the docker base image -DOCKER_BASE = python:3.9-slim-buster +DOCKER_BASE = python:3.9-slim-bullseye # Specify additional packages to install for docker builds DOCKER_SYS_PKGS = m4 libtool autoconf automake llvm libsuitesparse-dev libfftw3-dev libcfitsio-dev libflac-dev zlib1g-dev libbz2-dev libopenblas-dev liblapack-dev libhdf5-dev @@ -47,7 +47,7 @@ MPI_EXTRA_LINK = CFLAGS = -O2 -g -fPIC -pthread CXXFLAGS = -O2 -g -fPIC -pthread -std=c++11 -FCFLAGS = -O2 -g -fPIC -pthread +FCFLAGS = -O2 -g -fPIC -pthread -fallow-argument-mismatch OPENMP_CFLAGS = -fopenmp OPENMP_CXXFLAGS = -fopenmp diff --git a/configs/docker-toastdeps-py37.pkgs b/configs/docker-toastdeps-py37.pkgs index c4c511a..da13dc6 100644 --- a/configs/docker-toastdeps-py37.pkgs +++ b/configs/docker-toastdeps-py37.pkgs @@ -53,11 +53,11 @@ mpi4py # Install Boost. #boost # -# Install HDF5 (serial version). -#hdf5 +# Install HDF5. +hdf5 # # Install h5py (using our HDF5). -h5py:pkg-config +h5py # # Install healpy healpy diff --git a/configs/linux-conda b/configs/linux-conda index d9fb107..1e18b6f 100644 --- a/configs/linux-conda +++ b/configs/linux-conda @@ -6,7 +6,7 @@ OSTYPE = linux TEMPLATE = linux # Python version to use -PYVERSION = 3.7 +PYVERSION = 3.9 # Packages to install with pip PIP_PKGS = @@ -41,7 +41,7 @@ MPI_EXTRA_LINK = CFLAGS = -O3 -fPIC -pthread CXXFLAGS = -O3 -fPIC -pthread -std=c++11 -FCFLAGS = -O3 -fPIC -pthread +FCFLAGS = -O3 -fPIC -pthread -fallow-argument-mismatch OPENMP_CFLAGS = -fopenmp OPENMP_CXXFLAGS = -fopenmp diff --git a/configs/linux-conda-mkl b/configs/linux-conda-mkl new file mode 120000 index 0000000..ec1101c --- /dev/null +++ b/configs/linux-conda-mkl @@ -0,0 +1 @@ +linux-conda \ No newline at end of file diff --git a/configs/linux-conda-nomkl.pkgs b/configs/linux-conda-mkl.pkgs similarity index 97% rename from configs/linux-conda-nomkl.pkgs rename to configs/linux-conda-mkl.pkgs index a4888c7..9e450cb 100644 --- a/configs/linux-conda-nomkl.pkgs +++ b/configs/linux-conda-mkl.pkgs @@ -27,7 +27,7 @@ openblas # a virtualenv or a conda environment. This will also install a set of # common base packages. #python:virtualenv -python:conda nomkl +python:conda mkl #python:default # # Install MPICH. This step is optional and only needed in 2 cases: @@ -53,7 +53,7 @@ bzip2 # Install Boost. boost # -# Install HDF5 (serial version). +# Install HDF5. hdf5 # # Install h5py (using our HDF5). diff --git a/configs/linux-conda-nomkl b/configs/linux-conda-nomkl deleted file mode 100644 index d9fb107..0000000 --- a/configs/linux-conda-nomkl +++ /dev/null @@ -1,72 +0,0 @@ - -# OS type (linux OR osx) -OSTYPE = linux - -# Specify the template to use -TEMPLATE = linux - -# Python version to use -PYVERSION = 3.7 - -# Packages to install with pip -PIP_PKGS = - -# Packages to install with conda -CONDA_PKGS = future nose cython numpy scipy matplotlib pyyaml astropy six psutil ephem virtualenv pandas memory_profiler ipython cycler kiwisolver python-dateutil toml numba tbb nbstripout black wurlitzer ipympl ipykernel jupyterlab pyfftw pillow pshmem tomlkit traitlets - -# Serial compilers - -CC = gcc -CXX = g++ -FC = gfortran - -# Compiler to use for packages needed on the build machine - -BUILD_CC = gcc -BUILD_CXX = g++ - -# MPI compilers - -MPICC = mpicc -MPICXX = mpicxx -MPIFC = mpifort -MPI_CPPFLAGS = @AUX_PREFIX@/include -MPI_LDFLAGS = @AUX_PREFIX@/lib -MPI_CXXLIB = mpichcxx -MPI_LIB = mpich -MPI_EXTRA_COMP = -MPI_EXTRA_LINK = - -# Compile flags - -CFLAGS = -O3 -fPIC -pthread -CXXFLAGS = -O3 -fPIC -pthread -std=c++11 -FCFLAGS = -O3 -fPIC -pthread - -OPENMP_CFLAGS = -fopenmp -OPENMP_CXXFLAGS = -fopenmp -LDFLAGS = -lpthread -fopenmp - -# Are we doing a cross-compile? - -CROSS = - -# Parallel builds -MAKEJ = 4 - -# Define MKL location -MKL = - -# For BLAS/LAPACK, we use openblas - -BLAS = @AUX_PREFIX@/lib/libopenblas.a -fopenmp -lm -LAPACK = - -# Boost toolchain name - -BOOSTCHAIN = gcc - -# Group and permissions to set - -CHGRP = -CHMOD = diff --git a/configs/linux-conda.pkgs b/configs/linux-conda.pkgs index c784661..1181e17 100644 --- a/configs/linux-conda.pkgs +++ b/configs/linux-conda.pkgs @@ -53,7 +53,7 @@ bzip2 # Install Boost. boost # -# Install HDF5 (serial version). +# Install HDF5. hdf5 # # Install h5py (using our HDF5). diff --git a/configs/linux-venv b/configs/linux-venv index 07b0d16..3ab0845 100644 --- a/configs/linux-venv +++ b/configs/linux-venv @@ -41,7 +41,7 @@ MPI_EXTRA_LINK = CFLAGS = -O3 -fPIC -pthread CXXFLAGS = -O3 -fPIC -pthread -std=c++11 -FCFLAGS = -O3 -fPIC -pthread +FCFLAGS = -O3 -fPIC -pthread -std=legacy -fallow-argument-mismatch OPENMP_CFLAGS = -fopenmp OPENMP_CXXFLAGS = -fopenmp diff --git a/configs/linux-venv.pkgs b/configs/linux-venv.pkgs index a93d323..52fe30c 100644 --- a/configs/linux-venv.pkgs +++ b/configs/linux-venv.pkgs @@ -53,7 +53,7 @@ bzip2 # Install Boost. boost # -# Install HDF5 (serial version). +# Install HDF5. hdf5 # # Install h5py (using our HDF5). diff --git a/configs/cori-gcc-gpu b/configs/old/cori-gcc-gpu similarity index 100% rename from configs/cori-gcc-gpu rename to configs/old/cori-gcc-gpu diff --git a/configs/cori-gcc-gpu.mod b/configs/old/cori-gcc-gpu.mod similarity index 100% rename from configs/cori-gcc-gpu.mod rename to configs/old/cori-gcc-gpu.mod diff --git a/configs/cori-gcc-gpu.pkgs b/configs/old/cori-gcc-gpu.pkgs similarity index 100% rename from configs/cori-gcc-gpu.pkgs rename to configs/old/cori-gcc-gpu.pkgs diff --git a/configs/cori-gcc-gpu.sh b/configs/old/cori-gcc-gpu.sh similarity index 100% rename from configs/cori-gcc-gpu.sh rename to configs/old/cori-gcc-gpu.sh diff --git a/configs/docker-intel b/configs/old/docker-intel similarity index 100% rename from configs/docker-intel rename to configs/old/docker-intel diff --git a/configs/osx-homebrew-clang.notes b/configs/osx-homebrew-clang.notes new file mode 100644 index 0000000..4f8a7c8 --- /dev/null +++ b/configs/osx-homebrew-clang.notes @@ -0,0 +1,12 @@ + +# Before running the install, run these commands once +# to get dependencies from OS packages. + +brew install \ +mpich \ +cmake \ +suite-sparse \ +boost \ +fftw \ +cfitsio \ +hdf5 diff --git a/configs/osx-homebrew-clang.pkgs b/configs/osx-homebrew-clang.pkgs index 0b754ad..583cdc9 100644 --- a/configs/osx-homebrew-clang.pkgs +++ b/configs/osx-homebrew-clang.pkgs @@ -53,8 +53,8 @@ mpi4py # Install Boost. #boost # -# Install HDF5 (serial version). -hdf5 +# Install HDF5. +#hdf5 # # Install h5py (using our HDF5). h5py @@ -75,8 +75,8 @@ fitsio aatm # # GMP and MPFR are needed by SuiteSparse -gmp -mpfr +#gmp +#mpfr # # Install suitesparse #suitesparse diff --git a/configs/osx-macports-gcc b/configs/osx-macports-gcc index f9e3c94..ce4a1d5 100644 --- a/configs/osx-macports-gcc +++ b/configs/osx-macports-gcc @@ -4,9 +4,9 @@ OSTYPE = osx # Serial compilers -CC = gcc-mp-9 -CXX = g++-mp-9 -FC = gfortran-mp-9 +CC = gcc-mp-10 +CXX = g++-mp-10 +FC = gfortran-mp-10 # Compiler to use for packages needed on the build machine @@ -29,7 +29,7 @@ MPI_EXTRA_LINK = CFLAGS = -O3 -fPIC CXXFLAGS = -O3 -fPIC -std=c++11 -FCFLAGS = -O3 -fPIC +FCFLAGS = -O3 -fPIC -fallow-argument-mismatch OPENMP_CFLAGS = -fopenmp OPENMP_CXXFLAGS = -fopenmp diff --git a/configs/osx-macports-gcc.notes b/configs/osx-macports-gcc.notes new file mode 100644 index 0000000..f8557bb --- /dev/null +++ b/configs/osx-macports-gcc.notes @@ -0,0 +1,15 @@ + +# Before running the install, run these commands once +# to get dependencies from OS packages. + +sudo port install \ +gcc10 \ +mpich-gcc10 \ +cmake \ +OpenBLAS +gcc10 \ +OpenBLAS-devel +gcc10 \ +SuiteSparse +gcc10 \ +boost176 \ +fftw-3 +gcc10 \ +cfitsio +gcc10 \ +hdf5 +gcc10 diff --git a/configs/osx-macports-gcc.pkgs b/configs/osx-macports-gcc.pkgs index d7ee236..f465d03 100644 --- a/configs/osx-macports-gcc.pkgs +++ b/configs/osx-macports-gcc.pkgs @@ -53,11 +53,11 @@ mpi4py # Install Boost. #boost # -# Install HDF5 (serial version). +# Install HDF5. #hdf5 # # Install h5py (using our HDF5). -#h5py +h5py # # Install healpy healpy @@ -75,8 +75,8 @@ fitsio aatm # # GMP and MPFR are needed by SuiteSparse -gmp -mpfr +#gmp +#mpfr # # Install suitesparse #suitesparse diff --git a/configs/perlmutter-gcc b/configs/perlmutter-gcc index f9ec361..59c5cee 100644 --- a/configs/perlmutter-gcc +++ b/configs/perlmutter-gcc @@ -6,7 +6,7 @@ OSTYPE = linux TEMPLATE = linux # Python version to use -PYVERSION = 3.8 +PYVERSION = 3.9 # Packages to install with pip PIP_PKGS = @@ -41,7 +41,7 @@ MPI_EXTRA_LINK = -shared CFLAGS = -O3 -march=znver2 -g -fPIC -pthread CXXFLAGS = -O3 -march=znver2 -g -fPIC -pthread -std=c++11 -FCFLAGS = -O3 -march=znver2 -g -fPIC -pthread +FCFLAGS = -O3 -march=znver2 -g -fPIC -pthread -fallow-argument-mismatch OPENMP_CFLAGS = -fopenmp OPENMP_CXXFLAGS = -fopenmp @@ -53,9 +53,9 @@ CUDA = ${CUDA_DIR} # Parallel builds MAKEJ = 4 -# For BLAS/LAPACK, we use openblas + nvblas +# For BLAS/LAPACK, we use openblas -BLAS = -lopenblas -fopenmp -lm +BLAS = @AUX_PREFIX@/lib/libopenblas.a -fopenmp -lm LAPACK = # Boost toolchain name diff --git a/configs/perlmutter-gcc.pkgs b/configs/perlmutter-gcc.pkgs index ecd9643..5e27799 100644 --- a/configs/perlmutter-gcc.pkgs +++ b/configs/perlmutter-gcc.pkgs @@ -27,7 +27,7 @@ openblas # a virtualenv or a conda environment. This will also install a set of # common base packages. #python:virtualenv -python:conda nomkl +python:conda #python:default # # Install MPICH. This step is optional and only needed in 2 cases: @@ -53,7 +53,7 @@ bzip2 # Install Boost. boost # -# Install HDF5 (serial version). +# Install HDF5. hdf5 # # Install h5py (using our HDF5). @@ -110,4 +110,4 @@ pysm pympit # # Install TOAST. -toast +toast:blas=${CMBENV_AUX_ROOT}/lib/libopenblas.a diff --git a/configs/ubuntu-21.04-venv-cuda.pkgs b/configs/ubuntu-21.04-venv-cuda.pkgs index d1cb85e..fb0dcad 100644 --- a/configs/ubuntu-21.04-venv-cuda.pkgs +++ b/configs/ubuntu-21.04-venv-cuda.pkgs @@ -110,4 +110,4 @@ pysm pympit # # Install TOAST. -toast:blas=\${CMBENV_AUX_ROOT}/lib/libopenblas.so /usr/lib/x86_64-linux-gnu/libnvblas.so +toast:blas=${CMBENV_AUX_ROOT}/lib/libopenblas.so /usr/lib/x86_64-linux-gnu/libnvblas.so diff --git a/pkgs/aatm.sh b/pkgs/aatm.sh index 8f92bea..a98d251 100644 --- a/pkgs/aatm.sh +++ b/pkgs/aatm.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/autoconf.sh b/pkgs/autoconf.sh index 31e311d..fc14069 100644 --- a/pkgs/autoconf.sh +++ b/pkgs/autoconf.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/automake.sh b/pkgs/automake.sh index d361797..205fd90 100644 --- a/pkgs/automake.sh +++ b/pkgs/automake.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/boost.sh b/pkgs/boost.sh index 7a1cb1a..f580f7d 100644 --- a/pkgs/boost.sh +++ b/pkgs/boost.sh @@ -16,11 +16,15 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 -# NOTE: Due to perpetual flakiness of boost compilation with vendor compilers +# NOTE: Due to perpetual flakiness of boost compilation with vendor compilers # (e.g. Intel), we build boost with separate OS compilers (usually gcc or clang), # as specified by the config BOOSTCHAIN variable. diff --git a/pkgs/bzip2.sh b/pkgs/bzip2.sh index e5e4a44..70a537c 100644 --- a/pkgs/bzip2.sh +++ b/pkgs/bzip2.sh @@ -16,7 +16,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/cfitsio.sh b/pkgs/cfitsio.sh index 81f47e0..392a514 100644 --- a/pkgs/cfitsio.sh +++ b/pkgs/cfitsio.sh @@ -13,7 +13,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/cmake.sh b/pkgs/cmake.sh index b1e988e..f4ca353 100644 --- a/pkgs/cmake.sh +++ b/pkgs/cmake.sh @@ -4,7 +4,7 @@ pkg="cmake" pkgopts=$@ cleanup="" -version=3.20.1 +version=3.21.3 pfile=cmake-${version}.tar.gz src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://github.com/Kitware/CMake/releases/download/v${version}/${pfile} ${pfile}) @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 @@ -22,7 +26,9 @@ rm -rf cmake-${version} tar xzf ${src} \ && cd cmake-${version} \ && cleanup="${cleanup} $(pwd)" \ - && CC="@BUILD_CC@" CXX="@BUILD_CXX@" ./configure --prefix="@AUX_PREFIX@" > ${log} 2>&1 \ + && CC="@BUILD_CC@" CXX="@BUILD_CXX@" \ + ./configure --prefix="@AUX_PREFIX@" -- \ + -DCMAKE_USE_OPENSSL=OFF > ${log} 2>&1 \ && make -j @MAKEJ@ >> ${log} 2>&1 \ && make install >> ${log} 2>&1 diff --git a/pkgs/conviqt.sh b/pkgs/conviqt.sh index e4c9391..33e72fe 100644 --- a/pkgs/conviqt.sh +++ b/pkgs/conviqt.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/fftw.sh b/pkgs/fftw.sh index 346cd8a..d18d160 100644 --- a/pkgs/fftw.sh +++ b/pkgs/fftw.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/fitsio.sh b/pkgs/fitsio.sh index 0a62c1f..70d0ddf 100644 --- a/pkgs/fitsio.sh +++ b/pkgs/fitsio.sh @@ -4,9 +4,9 @@ pkg="fitsio" pkgopts=$@ cleanup="" -version=1.0.1 +version=1.1.5 pfile=fitsio-${version}.tar.gz -src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://github.com/esheldon/fitsio/archive/v${version}.tar.gz ${pfile}) +src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://files.pythonhosted.org/packages/17/b2/8bbf4ac91866449474ce847e2fbcfe6a95a6b917a38b94c0ce9c3860edc0/${pfile} ${pfile}) if [ "x${src}" = "x" ]; then echo "Failed to fetch ${pkg}" >&2 @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/gmp.sh b/pkgs/gmp.sh index f4f82e9..63fbf9d 100644 --- a/pkgs/gmp.sh +++ b/pkgs/gmp.sh @@ -15,7 +15,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/h5py.sh b/pkgs/h5py.sh index ec6e181..e4ff0fb 100644 --- a/pkgs/h5py.sh +++ b/pkgs/h5py.sh @@ -4,7 +4,7 @@ pkg="h5py" pkgopts=$@ cleanup="" -hdf5pref='--hdf5="@AUX_PREFIX@"' +hdf5pref='HDF5_DIR="@AUX_PREFIX@"' if [ "x$pkgopts" != "x" ]; then if [ "x$pkgopts" = "xpkg-config" ]; then hdf5pref="" @@ -15,10 +15,10 @@ fi # Note- the download URL includes a checksum and will need to # be updated when you change this version string. -version=3.2.1 +version=3.5.0 pfile=h5py-${version}.tar.gz -src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://files.pythonhosted.org/packages/ea/00/d0606cc0d6107a98f75b98367dc42917a67e3a7ec881636835f8e6987e6b/h5py-3.2.1.tar.gz ${pfile}) +src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://github.com/h5py/h5py/archive/refs/tags/${version}.tar.gz ${pfile}) if [ "x${src}" = "x" ]; then echo "Failed to fetch ${pkg}" >&2 @@ -26,7 +26,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 @@ -34,7 +38,7 @@ rm -rf h5py-${version} tar xzf ${src} \ && cd h5py-${version} \ && cleanup="${cleanup} $(pwd)" \ - && CC="@CC@" HDF5_DIR="${hdf5pref}" pip install -v --prefix "@AUX_PREFIX@" . >> ${log} 2>&1 + && eval CC="@MPICC@" HDF5_MPI="ON" ${hdf5pref} pip install -v --prefix "@AUX_PREFIX@" . >> ${log} 2>&1 if [ $? -ne 0 ]; then echo "Failed to build ${pkg}" >&2 diff --git a/pkgs/hdf5.sh b/pkgs/hdf5.sh index d3fd127..a48b816 100644 --- a/pkgs/hdf5.sh +++ b/pkgs/hdf5.sh @@ -4,10 +4,10 @@ pkg="hdf5" pkgopts=$@ cleanup="" -version=1.10.6 +version=1.12.1 pfile=hdf5-${version}.tar.bz2 -src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-${version}/src/${pfile} ${pfile}) +src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-${version}/src/${pfile} ${pfile}) if [ "x${src}" = "x" ]; then echo "Failed to fetch ${pkg}" >&2 @@ -15,7 +15,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 @@ -23,31 +27,26 @@ rm -rf hdf5-${version} tar xjf ${src} \ && cd hdf5-${version} \ && cleanup="${cleanup} $(pwd)" \ - && CC="@CC@" CFLAGS=$(if [ "x@CROSS@" = x ]; then echo "@CFLAGS@"; \ + && CC="@MPICC@" CFLAGS=$(if [ "x@CROSS@" = x ]; then echo "@CFLAGS@"; \ else echo "-O3"; fi) \ - CXX="@CXX@" CXXFLAGS=$(if [ "x@CROSS@" = x ]; then echo "@CXXFLAGS@"; \ + CXX="@MPICXX@" CXXFLAGS=$(if [ "x@CROSS@" = x ]; then echo "@CXXFLAGS@"; \ else echo "-O3"; fi) \ - FC="@FC@" FCFLAGS=$(if [ "x@CROSS@" = x ]; then echo "@FCFLAGS@"; \ + FC="@MPIFC@" FCFLAGS=$(if [ "x@CROSS@" = x ]; then echo "@FCFLAGS@"; \ else echo "-O3"; fi) \ ./configure \ --enable-build-mode=production \ --disable-silent-rules \ - --disable-parallel \ - --enable-cxx \ - --disable-fortran \ + --enable-parallel \ + --enable-fortran \ + --enable-shared \ + --disable-static \ + --with-pic \ --prefix="@AUX_PREFIX@" > ${log} 2>&1 \ && make -j @MAKEJ@ >> ${log} 2>&1 \ && make install >> ${log} 2>&1 -# These are the configure commands used for 1.12.x. Restore them once h5py supports -# the latest version: -# ./configure \ -# --enable-build-mode=production \ +# Should not be needed with latest h5py... # --with-default-api-version=v110 \ -# --disable-silent-rules \ -# --disable-parallel \ -# --enable-cxx \ -# --disable-fortran \ if [ $? -ne 0 ]; then echo "Failed to build ${pkg}" >&2 diff --git a/pkgs/healpy.sh b/pkgs/healpy.sh index b1c3323..9533069 100644 --- a/pkgs/healpy.sh +++ b/pkgs/healpy.sh @@ -4,9 +4,9 @@ pkg="healpy" pkgopts=$@ cleanup="" -version=1.14.0 +version=1.15.0 pfile=healpy-${version}.tar.gz -src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://files.pythonhosted.org/packages/52/bb/21e57f6b3a4c2a3bb59fb2a284fccf6ea15241a180e86ace1f9b891e251b/${pfile} ${pfile}) +src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://files.pythonhosted.org/packages/72/43/b0b2d086de23157f0a478b22252cf68e184aeb7632a2ddef861b5b83e3b1/${pfile} ${pfile}) if [ "x${src}" = "x" ]; then echo "Failed to fetch ${pkg}" >&2 @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/libflac.sh b/pkgs/libflac.sh index 7a4323e..33bdbd2 100644 --- a/pkgs/libflac.sh +++ b/pkgs/libflac.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/libsharp.sh b/pkgs/libsharp.sh index c2e8f11..f684a45 100644 --- a/pkgs/libsharp.sh +++ b/pkgs/libsharp.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/libtool.sh b/pkgs/libtool.sh index b598f82..dddc7a4 100644 --- a/pkgs/libtool.sh +++ b/pkgs/libtool.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/m4.sh b/pkgs/m4.sh index ab28654..ec24eb1 100644 --- a/pkgs/m4.sh +++ b/pkgs/m4.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/madam.sh b/pkgs/madam.sh index 846c4fc..e60fe18 100644 --- a/pkgs/madam.sh +++ b/pkgs/madam.sh @@ -24,7 +24,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/mpfr.sh b/pkgs/mpfr.sh index a025699..f367d89 100644 --- a/pkgs/mpfr.sh +++ b/pkgs/mpfr.sh @@ -15,7 +15,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/mpi4py.sh b/pkgs/mpi4py.sh index 6fdc302..f6e2e73 100644 --- a/pkgs/mpi4py.sh +++ b/pkgs/mpi4py.sh @@ -5,10 +5,10 @@ pkgopts=$@ cleanup="" # Note: update the URL when you change the version. -version=3.0.3 +version=3.1.1 pfile=mpi4py-${version}.tar.gz -src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://files.pythonhosted.org/packages/ec/8f/bbd8de5ba566dd77e408d8136e2bab7fdf2b97ce06cab830ba8b50a2f588/${pfile} ${pfile}) +src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://files.pythonhosted.org/packages/bd/d3/b1e686fcf2fe1677fa010f0a29a1b8a8cd3fd56161aacd59c5be252fe382/${pfile} ${pfile}) if [ "x${src}" = "x" ]; then echo "Failed to fetch ${pkg}" >&2 @@ -16,7 +16,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/mpich.sh b/pkgs/mpich.sh index 68064cf..ed798c5 100644 --- a/pkgs/mpich.sh +++ b/pkgs/mpich.sh @@ -14,22 +14,29 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 rm -rf mpich-${version} -fcopt="" +fcopt="--enable-fortran" if [ "x@FC@" = "x" ]; then fcopt="--disable-fortran" fi tar xzf ${src} \ && cd mpich-${version} \ && cleanup="${cleanup} $(pwd)" \ - && CC="@CC@" CXX="@CXX@" FC="@FC@" \ - CFLAGS="@CFLAGS@" CXXFLAGS="@CXXFLAGS@" FCFLAGS="@FCFLAGS@" \ - ./configure @CROSS@ ${fcopt} --prefix="@AUX_PREFIX@" > ${log} 2>&1 \ + && CC="@CC@" CXX="@CXX@" FC="@FC@" F77="@FC@" \ + CFLAGS="@CFLAGS@" CXXFLAGS="@CXXFLAGS@" \ + FFLAGS="@FCFLAGS@ -fallow-argument-mismatch" FCFLAGS="@FCFLAGS@" \ + ./configure @CROSS@ ${fcopt} \ + --with-device=ch3 \ + --prefix="@AUX_PREFIX@" > ${log} 2>&1 \ && make -j @MAKEJ@ >> ${log} 2>&1 \ && make install >> ${log} 2>&1 diff --git a/pkgs/openblas.sh b/pkgs/openblas.sh index 470ee75..2c4007d 100644 --- a/pkgs/openblas.sh +++ b/pkgs/openblas.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi static="no" for opt in $pkgopts; do @@ -34,7 +38,7 @@ tar xzf ${src} \ make NO_SHARED=1 USE_OPENMP=1 \ FC="@FC@" \ MAKE_NB_JOBS="@MAKEJ@" \ - CC="@CC@" DYNAMIC_ARCH=1 \ + CC="@CC@" DYNAMIC_ARCH=1 TARGET=GENERIC \ CROSS=$(if [ "x@CROSS@" = x ]; then echo "0"; else echo "1"; fi) \ COMMON_OPT="@CFLAGS@" \ FCOMMON_OPT="@FCFLAGS@" \ @@ -43,7 +47,7 @@ tar xzf ${src} \ else make USE_OPENMP=1 \ FC="@FC@" \ MAKE_NB_JOBS="@MAKEJ@" \ - CC="@CC@" DYNAMIC_ARCH=1 \ + CC="@CC@" DYNAMIC_ARCH=1 TARGET=GENERIC \ CROSS=$(if [ "x@CROSS@" = x ]; then echo "0"; else echo "1"; fi) \ COMMON_OPT="@CFLAGS@" \ FCOMMON_OPT="@FCFLAGS@" \ diff --git a/pkgs/pixell.sh b/pkgs/pixell.sh index 8d0de1b..e4556eb 100644 --- a/pkgs/pixell.sh +++ b/pkgs/pixell.sh @@ -12,7 +12,11 @@ if [ "x${fetched}" = "x" ]; then exit 1 fi -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/pympit.sh b/pkgs/pympit.sh index b61dea2..cdc229f 100644 --- a/pkgs/pympit.sh +++ b/pkgs/pympit.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/pysm.sh b/pkgs/pysm.sh index a86057c..f3c847f 100644 --- a/pkgs/pysm.sh +++ b/pkgs/pysm.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/python.sh b/pkgs/python.sh index 07cf82e..da2aa4f 100644 --- a/pkgs/python.sh +++ b/pkgs/python.sh @@ -14,27 +14,24 @@ mkdir -p "@PYTHON_PREFIX@/bin" if [ "${pytype}" = "conda" ]; then echo "Python using conda" >&2 if [ "@OSTYPE@" = "linux" ]; then - inst=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh miniconda.sh) + inst=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh miniforge.sh) else if [ "@OSTYPE@" = "osx" ]; then - inst=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh) + inst=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-$(uname -m).sh miniforge.sh) else echo "Unsupported value for config option OSTYPE" >&2 exit 1 fi fi if [ "x${inst}" = "x" ]; then - echo "Failed to fetch miniconda" >&2 + echo "Failed to fetch miniforge" >&2 exit 1 fi cleanup="${inst}" bash "${inst}" -b -f -p "@PYTHON_PREFIX@" \ && echo "# condarc to force channel order" > "@PYTHON_PREFIX@/.condarc" \ && echo "channels:" >> "@PYTHON_PREFIX@/.condarc" \ - && if [ "x${pextra}" = "xnomkl" ]; then - echo " - conda-forge" >> "@PYTHON_PREFIX@/.condarc" - fi \ - && echo " - defaults" >> "@PYTHON_PREFIX@/.condarc" \ + && echo " - conda-forge" >> "@PYTHON_PREFIX@/.condarc" \ && echo "changeps1: false" >> "@PYTHON_PREFIX@/.condarc" \ && eval "@TOP_DIR@/tools/gen_activate.sh" "@VERSION@" "@PREFIX@" "@PYTHON_PREFIX@" "@AUX_PREFIX@" "@PYVERSION@" "${pytype}" "${pextra}" \ && source "@PYTHON_PREFIX@/bin/cmbenv" \ @@ -46,13 +43,13 @@ if [ "${pytype}" = "conda" ]; then echo "conda python install failed" >&2 exit 1 fi - if [ "x${pextra}" = "xnomkl" ]; then - conda install --copy --yes "blas=*=openblas" + if [ "x${pextra}" = "xmkl" ]; then + conda install --copy --yes "libblas=*=*mkl" numpy else - conda install --copy --yes blas + conda install --copy --yes "libopenblas=*=*openmp*" "libblas=*=*openblas" numpy fi if [ $? -ne 0 ]; then - echo "conda blas install failed" >&2 + echo "conda libblas / numpy install failed" >&2 exit 1 fi if [ "x@CONDA_PKGS@" != "x" ]; then diff --git a/pkgs/qarray.sh b/pkgs/qarray.sh index d0cf000..5ab6e44 100644 --- a/pkgs/qarray.sh +++ b/pkgs/qarray.sh @@ -16,7 +16,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/spt3g.sh b/pkgs/spt3g.sh index fe34621..04afba6 100644 --- a/pkgs/spt3g.sh +++ b/pkgs/spt3g.sh @@ -17,7 +17,12 @@ cleanup="${src}" echo "Building ${pkg}..." >&2 export spt3g_start=$(pwd) -log="${spt3g_start}/log_${pkg}" + +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="${spt3g_start}/log_${pkg}" +fi boost="@AUX_PREFIX@" flaclib="@AUX_PREFIX@/lib/libFLAC.so" diff --git a/pkgs/suitesparse.sh b/pkgs/suitesparse.sh index e2bcbba..16b8a40 100644 --- a/pkgs/suitesparse.sh +++ b/pkgs/suitesparse.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi static="no" for opt in $pkgopts; do @@ -24,7 +28,7 @@ for opt in $pkgopts; do fi done -gpuconf="CUDA=no" +gpuconf="CUDA_ROOT=no" if [ "x@CUDA@" != "x" ]; then gpuconf="CUDA_ROOT=@CUDA@ CUDA_ROOT_INC=@CUDA_INC@ CUDA_ROOT_LIB=@CUDA_LIB@ CUDA_MATH=@CUDA_MATH@ CUDA_MATH_INC=@CUDA_MATH_INC@ CUDA_MATH_LIB=@CUDA_MATH_LIB@" fi diff --git a/pkgs/tidas.sh b/pkgs/tidas.sh index 0604aad..cb5f4f6 100644 --- a/pkgs/tidas.sh +++ b/pkgs/tidas.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/toast.sh b/pkgs/toast.sh index 3f82949..2cfc4b7 100644 --- a/pkgs/toast.sh +++ b/pkgs/toast.sh @@ -4,7 +4,7 @@ pkg="toast" pkgopts=$@ cleanup="" -version=2.3.12 +version=2.3.14 pfile=toast-${version}.tar.gz src=$(eval "@TOP_DIR@/tools/fetch_check.sh" https://github.com/hpc4cmb/toast/archive/${version}.tar.gz ${pfile}) @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/uncrustify.sh b/pkgs/uncrustify.sh index 5615321..bb13bce 100644 --- a/pkgs/uncrustify.sh +++ b/pkgs/uncrustify.sh @@ -17,7 +17,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/pkgs/zlib.sh b/pkgs/zlib.sh index c8cc6a5..fcd94af 100644 --- a/pkgs/zlib.sh +++ b/pkgs/zlib.sh @@ -14,7 +14,11 @@ if [ "x${src}" = "x" ]; then fi cleanup="${src}" -log="../log_${pkg}" +if [ "@DOCKER@" = "yes" ]; then + log=/dev/stdout +else + log="../log_${pkg}" +fi echo "Building ${pkg}..." >&2 diff --git a/templates/docker-alpine.in b/templates/docker-alpine.in index f84dd49..08e99ce 100644 --- a/templates/docker-alpine.in +++ b/templates/docker-alpine.in @@ -76,6 +76,11 @@ FROM @DOCKER_BASE@ # Copy our installed software binaries and libraries COPY --from=builder /usr /usr/ +COPY --from=builder /lib /lib/ +COPY --from=builder /bin /bin/ +COPY --from=builder /sbin /sbin/ +COPY --from=builder /etc /etc/ +COPY --from=builder /usr/local /usr/local # Home directory diff --git a/templates/docker-debian.in b/templates/docker-debian.in index 4cb8547..b9d1901 100644 --- a/templates/docker-debian.in +++ b/templates/docker-debian.in @@ -67,13 +67,14 @@ RUN python3 -m compileall -q "@AUX_PREFIX@/lib/python@PYVERSION@/site-packages" FROM @DOCKER_BASE@ -# Copy our installed software binaries and libraries +# Copy our installed software binaries and libraries. COPY --from=builder /usr /usr/ COPY --from=builder /lib /lib/ COPY --from=builder /bin /bin/ COPY --from=builder /sbin /sbin/ COPY --from=builder /etc /etc/ +COPY --from=builder /usr/local /usr/local # Home directory diff --git a/templates/docker-ubuntu.in b/templates/docker-ubuntu.in index c0a7a93..bb03346 100644 --- a/templates/docker-ubuntu.in +++ b/templates/docker-ubuntu.in @@ -85,6 +85,7 @@ COPY --from=builder /lib /lib/ COPY --from=builder /bin /bin/ COPY --from=builder /sbin /sbin/ COPY --from=builder /etc /etc/ +COPY --from=builder /usr/local /usr/local # Home directory diff --git a/templates/install-linux.in b/templates/install-linux.in index 70041d4..f15e8dd 100644 --- a/templates/install-linux.in +++ b/templates/install-linux.in @@ -33,7 +33,7 @@ prepend_env () { fi } -prepend_env "CMBENV_AUX_ROOT" "@AUX_PREFIX@" +export CMBENV_AUX_ROOT="@AUX_PREFIX@" prepend_env "CMAKE_PREFIX_PATH" "@AUX_PREFIX@" prepend_env "PATH" "@PYTHON_PREFIX@/bin" prepend_env "PATH" "@AUX_PREFIX@/bin" diff --git a/tools/gen_script.sh b/tools/gen_script.sh index a919037..58449ec 100755 --- a/tools/gen_script.sh +++ b/tools/gen_script.sh @@ -182,18 +182,14 @@ fi compiled_prefix="${prefix}/cmbenv_aux" python_prefix="${prefix}/cmbenv_python" -module_dir="${moddir}/cmbenv" - if [ "x${docker}" = "xyes" ]; then - if [ "x${prefix}" = "x" ]; then - compiled_prefix="/usr" - python_prefix="/usr" - else - compiled_prefix="${prefix}" - python_prefix="${prefix}" - fi + prefix="/usr/local" + compiled_prefix="/usr/local" + python_prefix="/usr/local" fi +module_dir="${moddir}/cmbenv" + confsub="${confsub} -e 's#@SRCDIR@#${topdir}#g'" confsub="${confsub} -e 's#@PREFIX@#${prefix}#g'" confsub="${confsub} -e 's#@AUX_PREFIX@#${compiled_prefix}#g'" @@ -208,6 +204,7 @@ if [ "x${docker}" = "xyes" ]; then else confsub="${confsub} -e 's#@TOP_DIR@#${topdir}#g'" fi +confsub="${confsub} -e 's#@DOCKER@#${docker}#g'" # echo "${confsub}" @@ -246,7 +243,7 @@ while IFS='' read -r line || [[ -n "${line}" ]]; do fi if [ "x${docker}" = "xyes" ]; then - pcom="RUN cln=\$(./${outpkg}/${pkgname}.sh ${pkgopts}) && if [ \"x\${cln}\" != \"x\" ]; then for cl in \${cln}; do if [ -e \"\${cl}\" ]; then rm -rf \"\${cl}\"; fi; done; fi" + pcom="RUN cln=\$(./${outpkg}/${pkgname}.sh ${pkgopts}); if [ \$? -ne 0 ]; then echo \"FAILED\"; exit 1; fi" pkgcom+="${pcom}"$'\n'$'\n' else pcom="cln=\$(${topdir}/${outpkg}/${pkgname}.sh ${pkgopts}); if [ \$? -ne 0 ]; then echo \"FAILED\"; exit 1; fi"