aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make/high-level.mk
diff options
context:
space:
mode:
authorGiacomo Lorenzetti <glorenzetti@cefca.es>2025-11-14 17:37:12 +0100
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2025-12-29 13:00:14 +0100
commit557299b2bafee350e4d60a334990563c931fcf6a (patch)
tree6587118ee66f1c234d7d0a40e807d9afd401f14c /reproduce/software/make/high-level.mk
parentc8a42f676cfebad5f81074bac9b662218b1ce6b8 (diff)
IMPORTANT: version updates and improved portability
Summary: this commit involves a major version update of many basic software and Gnuastro's major dependencies. So it may affect your configuration and analysis. Until now, the most recent software updates weren't properly tested on MacOS, causing the software configuration step to fail. In particular, the 'prep-source.sh' (that corrects any hard-coded '/bin/sh' within the unpacked tarballs of all software) as well as some issues in the 'tar', 'util-linux' and 'ghostscript' programs. These portability issues were found and fixed by Raul Infante-Sainz and Giacomo Lorenzetti. With this commit, those portability issues have been addressed while updating the following software. Also see notes below the list. High-level software: CFITSIO 4.5.0 --> 4.6.3 Ghostscript 10.04.0 --> 10.06.0 Gnuastro 0.23 --> 0.24 Util-linux 2.40.4 --> 2.41.3 WCSLIB 8.4 --> 8.5 Basic software: cURL 8.11.1 --> 8.17.0 GNU Bash 5.2.37 --> 5.3.9 GNU Binutils 2.43.1 --> 2.45.1 GNU Coreutils 9.6 --> 9.9 GNU Diffutils 3.10 --> 3.12 GNU AWK 5.3.1 --> 5.3.2 GNU GCC 14.2.0 --> 15.2.0 GNU Gettext 0.23.1 --> 0.26 GNU Grep 3.11 --> 3.12 GNU Gzip 1.13 --> 1.14 GNU Libunistring 1.3 --> 1.4.1 GNU M4 1.4.19 --> 1.4.20 GNU MPFR 4.2.1 --> 4.2.2 GNU Nano 8.3 --> 8.7 GNU Readline 8.2.13 --> 8.3.3 Git 2.48.1 --> 2.52.0 Less 668 --> 685 Libxml2 2.13.1 --> 2.15.1 OpenSSL 3.4.0 --> 3.6.0 Perl 5.40.1 --> 5.42.0 The latest versions of Bash and M4 were prepared for the new default C standard of GCC 15.*, so the '-std=gnu17' was removed for them. Also, while a new version of Dash was available, it would cause an issue when building in Apptainer, so it has been described in 'versions.conf' to be aware in the future updates. Libgit2 has been removed as a dependency of Gnuastro. The reason is fully described in the comment on top of Gnuastro's build rule in 'high-level.mk'.
Diffstat (limited to 'reproduce/software/make/high-level.mk')
-rw-r--r--reproduce/software/make/high-level.mk38
1 files changed, 30 insertions, 8 deletions
diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk
index 67ca8b6..685715f 100644
--- a/reproduce/software/make/high-level.mk
+++ b/reproduce/software/make/high-level.mk
@@ -731,7 +731,8 @@ $(ibidir)/libtiff-$(libtiff-version): $(ibidir)/libjpeg-$(libjpeg-version)
$(call gbuild, libtiff-$(libtiff-version), static, \
--disable-jbig \
--disable-webp \
- --disable-zstd)
+ --disable-zstd \
+ --disable-libdeflate )
echo "Libtiff $(libtiff-version)" > $@
$(ibidir)/libtirpc-$(libtirpc-version):
@@ -1186,6 +1187,14 @@ $(ibidir)/ghostscript-$(ghostscript-version): \
tarball=ghostscript-$(ghostscript-version).tar.lz
$(call import-source, $(ghostscript-url), $(ghostscript-checksum))
+# On macOS we use the system compiler and linker. The system linker
+# there doesn't support '--copy-dt-needed-entries', while the one on
+# Linux crashes if we remove it. So we only activate it on macOS.
+ ldflags=""
+ if [ x$(on_mac_os) = xno ]; then
+ ldflags="LDFLAGS=-Wl,--copy-dt-needed-entries"
+ fi
+
# Unpack it and configure Ghostscript. The option
# '-DPNG_ARM_NEON_OPT=0' prevents an arm64 'neon' library from being
# required at compile time.
@@ -1193,13 +1202,13 @@ $(ibidir)/ghostscript-$(ghostscript-version): \
tar -xf $(tdir)/$$tarball --no-same-owner --no-same-permissions
cd ghostscript-$(ghostscript-version)
$(shsrcdir)/prep-source.sh $(ibdir)
- ./configure --prefix=$(idir) \
+ ./configure $$ldflags \
--disable-cups \
+ --prefix=$(idir) \
--enable-dynamic \
--disable-compile-inits \
- --disable-hidden-visibility \
- CFLAGS="-DPNG_ARM_NEON_OPT=0" \
- LDFLAGS=-Wl,--copy-dt-needed-entries
+ --disable-hidden-visibility \
+ CFLAGS="-DPNG_ARM_NEON_OPT=0"
# Build and install the program and the shared libraries.
make V=1 -j$(numthreads)
@@ -1224,17 +1233,24 @@ $(ibidir)/ghostscript-$(ghostscript-version): \
rm -rf ghostscript-$(ghostscript-version)
echo "GPL Ghostscript $(ghostscript-version)" > $@
+# Gnuastro can optionally depend on libgit2, but it is not included as a
+# dependency here for the two reasons below. If you would like to have it,
+# add it as a dependency (its build instruction and dependencies are here
+# already) and remove the '--without-libgit2' option in the recipe).
+# - Within Maneage, we have everything under Git already and users are
+# expected to include the version in all their products.
+# - libgit2 can only be built with CMake (which takes extremely long to
+# compile: possibly even longer than GCC!).
$(ibidir)/gnuastro-$(gnuastro-version): \
$(ibidir)/gsl-$(gsl-version) \
$(ibidir)/wcslib-$(wcslib-version) \
$(ibidir)/libjpeg-$(libjpeg-version) \
$(ibidir)/libtiff-$(libtiff-version) \
- $(ibidir)/libgit2-$(libgit2-version) \
$(ibidir)/ghostscript-$(ghostscript-version)
tarball=gnuastro-$(gnuastro-version).tar.lz
$(call import-source, $(gnuastro-url), $(gnuastro-checksum))
- $(call gbuild, gnuastro-$(gnuastro-version), static, , \
- -j$(numthreads))
+ $(call gbuild, gnuastro-$(gnuastro-version), static, \
+ --without-libgit2, -j$(numthreads))
cp $(dtexdir)/gnuastro.tex $(ictdir)/
echo "GNU Astronomy Utilities $(gnuastro-version) \citep{gnuastro}" > $@
@@ -1720,6 +1736,12 @@ $(ibidir)/util-linux-$(util-linux-version): \
sed -e's|UL_BUILD_INIT(\[mkswap\], \[yes\])|UL_BUILD_INIT(\[mkswap\], \[no\])|' \
-i configure.ac
+# 'autogen.sh' checks for dependencies, but 'flex' (that is not built
+# in Maneage) is not needed when compiling from tarball (see:
+# https://github.com/util-linux/util-linux/pull/2531#issuecomment-1798020594)
+ sed -i '/flex/d' autogen.sh
+ ./autogen.sh
+
# Having updated 'configure.ac', we need to re-generate the
# './configure' script with 'autoreconf' (which is part of Autoconf
# and needs Automake; hence why they are dependencies.