aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2021-02-12 23:49:16 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2021-02-12 23:49:16 +0000
commit152421339a3a52485d9f6c4be28aad5c58cd089c (patch)
treea3c76f6fbe5278612b07f4e777678300bb07f13f
parentecbaadcc88ae38adb34e08755459318372ec13b8 (diff)
Installation: minor correction in links to system libraries
Until now when making a link to the system's 'dl' and 'pthread' libraries we were simply linking the installed location on the system (in '/usr/lib'). However, in some systems, these may themselves be links to other locations and this could cause linking problems. With this commit, we now use 'realpath' to extract the absolute address of the final file that the libraries may link to, and directly link to them. A minor cosmetic correction was also made in the build rule for CFITSIO: the long line was broken into two!
-rw-r--r--reproduce/software/make/basic.mk5
-rw-r--r--reproduce/software/make/high-level.mk3
2 files changed, 6 insertions, 2 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index 9217ee9..efb7377 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -210,7 +210,10 @@ $(ibidir)/low-level-links: $(ibidir)/grep-$(grep-version) \
# POSIX Threads library for multi-threaded programs.
for l in dl pthread; do
if [ -f /usr/lib/lib$$l.a ]; then
- ln -sf /usr/lib/lib$$l.* $(ildir)/
+ for f in /usr/lib/lib$$l.*; do
+ ln -sf $$(realpath $$f) \
+ $$(echo $$f | sed -e's|/usr/lib|$(ildir)|')
+ done
fi
done
diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk
index d69722e..26a58f7 100644
--- a/reproduce/software/make/high-level.mk
+++ b/reproduce/software/make/high-level.mk
@@ -428,7 +428,8 @@ $(ibidir)/cfitsio-$(cfitsio-version):
export gbuild_tar=$(ddir)/$$customtar
$(call gbuild, cfitsio-$(cfitsio-version), , \
--enable-sse2 --enable-reentrant \
- --with-bzip2=$(idir), , make shared fpack funpack)
+ --with-bzip2=$(idir), , \
+ make shared fpack funpack)
rm $$customtar
echo "CFITSIO $(cfitsio-version)" > $@