aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make/high-level.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2022-06-10 01:43:30 +0200
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2022-06-10 02:21:14 +0200
commitab811d0952ac93ce608c81ab2cc44d67c7b02dbe (patch)
tree16d1c175f3e637a55d468bc73f4335a36ebe0d76 /reproduce/software/make/high-level.mk
parent58eb63c18a091570013368ec1ba63d88c7d47b2f (diff)
Housekeeping: some portability issues fixed; four software updates
Until now, there were several portability issues in Maneage: 1. Maneage would crash on older operating systems (checked on Debian 6), where Wget didn't have the '--no-use-server-timestamps'. 2. On a Linux kernel 2.6.32 (of the same Debian 6 above) some features in 'util-linux' (like 'swapon' or 'libmount') wouldn't build and wouldn't let 'util-linux' complete. These features need root permissions to be useful, so the wouldn't be used in Maneage any way! But they wouldn't let Maneage get built 3. The './project shell' command would still read the host's '~/.bashrc', letting the host environment leak-in to Maneage's interactive shell. 4. The building of Flex 2.64 wouldn't complete due to a segmentation fault an Ubuntu, but NetPBM (which depends on Flex) would crash with a wrong usage of 'yyunput'. This had actually caused a non-update to Flex in a previous Maneage software update. 5. The update Astrometry.net would assume SExtractor's executable name is 'source-extractor'; causing a crash in usage. This forced the users to manually create a 'source-extractor' symbolic link in the '.local/bin' directory. 6. The 'reproduce/software/shell/tarball-prepare.sh' script (that is used for making Maneage-standard tarballs) wouldn't accept option values with an '=' between the option name and value! It also didnt' print sufficiently informative messages and errors (for example it would say "skipping ..." (making the user think there is a problem!), but it was actually that the file already existed! 7. The 'reproduce/analysis/make/prepare.mk' and 'reproduce/analysis/make/verify.mk' Makefiles that needed to reject some of the 'makesrc' sub-Makefiles would simply substitute their names with nothing. But this would cause problems when the name is part of the name of another sub-Makefile. 8. On the Debian 6 system mentioned above the raw 'df' command's output wasn't in the expected format; so Maneage would fail to properly detect the free space in the disk. With these commit, all the issues above have been solved: for 1, A check has been added to avoid using that option. For 2, those 'util-linux' features have been disabled. For 3, the '--norc' and '--noprofile' options have beed added to the call to Bash. For 4, see below. For 5, the symbolic link is now automatically made with SExtractor. For 6, the option reading components of that script have been fully re-written and more robust sanity checks are also added, with more informative warnings. For 7, the 'subst' function of Make was replaced with 'filter-out' and this fixed the problem. For 8, 'df' is called with the '-P' option so it has a unified format in all versions. For 4, the versions of 'flex' and 'netpbm' have been updated. Since they were the dependency of 'astrometrynet', that has also been updated. In the process, we discovered that 'lzip' has a new version which claims to be faster, so that is also updated. lzip 1.22 --> 1.23 astrometrynet 0.85 --> 0.89 flex 2.6.4 --> 2.6.4-410-74a89fd netpbm 10.73.39 --> 10.73.39 NetPBM needed some manual manipulation in its source (to remove the extra line), so the necessary steps have been added to its build recipe in 'reproduce/software/make/high-level.mk'.
Diffstat (limited to 'reproduce/software/make/high-level.mk')
-rw-r--r--reproduce/software/make/high-level.mk32
1 files changed, 32 insertions, 0 deletions
diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk
index 34c829b..62004a8 100644
--- a/reproduce/software/make/high-level.mk
+++ b/reproduce/software/make/high-level.mk
@@ -1293,16 +1293,34 @@ $(ibidir)/netpbm-$(netpbm-version): \
$(ibidir)/libxml2-$(libxml2-version)
tarball=netpbm-$(netpbm-version).tar.lz
$(call import-source, $(netpbm-url), $(netpbm-checksum))
+
+# Answers to the configuration questions.
if [ x$(on_mac_os) = xyes ]; then
answers='\n\n$(ildir)\n\n\n\n\n\n$(ildir)/include\n\n$(ildir)/include\n\n$(ildir)/include\nnone\n\n'
else
answers='\n\n\n\n\n\n\n\n\n\n\n\n\nnone\n\n\n'
fi
+
+# Go into the temporary directory and unpack the tarball.
cd $(ddir)
unpackdir=netpbm-$(netpbm-version)
rm -rf $$unpackdir
tar -xf $(tdir)/$$tarball
cd $$unpackdir
+
+# As of NetPBM 10.73.39 and Flex 2.6.4-410-74a89fd (commit 74a89fd in
+# Flex's Git that is 410 commits after version 2.6.4), there is the
+# following line: 'if (0) yyunput(0, NULL);'. It will cause a crash
+# and is just to avoid compiler warnings! So we are setting the
+# 'yyunput(0, NULL);' to the redundant 'yyunput(0, NULL);' to let the
+# compilation finish!
+ awk '$$1=="if" && $$2=="(0)"{inif=1} \
+ {if(inif==1 && $$1=="yyunput(0,") \
+ print "{int a=1;}"; else print $$0}' \
+ converter/pbm/thinkjettopbm.l > thinkjettopbm.tmp
+ mv thinkjettopbm.tmp converter/pbm/thinkjettopbm.l
+
+# Pass the answers to the configure script then build and install it.
printf "$$answers" | ./configure
make
rm -rf $(ddir)/$$unpackdir/install
@@ -1396,6 +1414,7 @@ $(ibidir)/sextractor-$(sextractor-version): \
--with-openblas-libdir=$(ildir) \
--with-openblas-incdir=$(idir)/include)
ln -fs $(ibdir)/sex $(ibdir)/sextractor
+ ln -fs $(ibdir)/sex $(ibdir)/source-extractor
cp $(dtexdir)/sextractor.tex $(ictdir)/
echo "SExtractor $(sextractor-version) \citep{sextractor}" > $@
@@ -1431,6 +1450,14 @@ $(ibidir)/swig-$(swig-version):
# --disable-mount
# --disable-wall
# --disable-su
+# Because they fail on older kernels (tested on Linux 2.6.32)
+# and they need root (to actually use; so are not relevant to
+# Maneage):
+# --disable-swapon
+# --disable-unshare
+# --disable-libmount
+# --disable-mountpoint
+# --enable-libmount-support-mtab
#
# NOTE ON INSTALLATION DIRECTORY: Util-linux libraries are relatively
# low-level and may cause conflicts with system libraries (especilly when
@@ -1459,9 +1486,14 @@ $(ibidir)/util-linux-$(util-linux-version): | $(idircustom)
cd util-linux-$(util-linux-version)
./configure --prefix=$(idircustom)/util-linux \
--disable-dependency-tracking \
+ --enable-libmount-support-mtab \
--disable-silent-rules \
+ --disable-mountpoint \
+ --disable-libmount \
+ --disable-unshare \
--without-systemd \
--enable-libuuid \
+ --disable-swapon \
--disable-mount \
--disable-ipcrm \
--disable-ipcs \