From a4e2ec81d57eae3ec88c6f5af2f801f3b94bea24 Mon Sep 17 00:00:00 2001 From: Raul Infante-Sainz Date: Sun, 5 Apr 2020 17:54:39 +0100 Subject: The build of M4 and XLSX I/O on macOS has been fixed Until now, the M4 that was built on macOS had internal problems (as discussed in #1): it would simply print `Abort trap: 6' in the output and abort. After looking at the build of Homebrew, I noticed that they apply a patch (correct one line) to fix this problem. To be able to apply that patch on macOS systems, I had fully open up the build recipe of M4 and atleast on the testing system, it was built successfully. Also, after successfully building M4, and thus Autoconf and thus Minizip, we were able to build XLSX I/O on a macOS and found out that the internal library's full address wasn't being put in the libraries and executables. With this commit, we now use macOS's `install_name_tool' to correct the positions of the two `libxlsxio_*' libraries in all its executables. This commit was originally written by Mohammad Akhlaghi --- reproduce/software/make/basic.mk | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'reproduce/software/make/basic.mk') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 212c738..47a01a3 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -1002,10 +1002,34 @@ $(ibidir)/libbsd: | $(ibidir)/coreutils \ $(call gbuild, libbsd-$(libbsd-version), static,,V=1) \ && echo "Libbsd $(libbsd-version)" > $@ -$(ibidir)/m4: | $(ibidir)/coreutils \ +# We need to apply a patch to the M4 source to be used properly on macOS. +# The patch [1] was inspired by Homebrew's build instructions [1]. +# +# [1] https://raw.githubusercontent.com/macports/macports-ports/edf0ee1e2cf/devel/m4/files/secure_snprintf.patch +# [2] https://github.com/Homebrew/homebrew-core/blob/master/Formula/m4.rb +$(ibidir)/m4: | $(ibidir)/sed \ $(ibidir)/texinfo \ + $(ibidir)/coreutils \ $(tdir)/m4-$(m4-version).tar.gz - $(call gbuild, m4-$(m4-version), static,,V=1) \ + cd $(ddir); \ + unpackdir=m4-$(m4-version); \ + rm -rf $$unpackdir \ + && if ! tar xf $(word 1,$(filter $(tdir)/%,$|)); then \ + echo; echo "Tar error"; exit 1; \ + fi \ + && cd $$unpackdir \ + && if [ x$(on_mac_os) = xyes ]; then \ + sed -i -e's|if !(((__GLIBC__ > 2|if !defined(__APPLE__) \&\& !(((__GLIBC__ > 2|' lib/vasnprintf.c; \ + fi \ + && sed -i -e's|\#\! /bin/sh|\#\! $(ibdir)/bash|' \ + -e's|\#\!/bin/sh|\#\! $(ibdir)/bash|' \ + configure \ + && ./configure --prefix=$(idir) SHELL=$(ibdir)/bash \ + LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + && make SHELL=$(ibdir)/bash V=1 -j$(numthreads) \ + && make SHELL=$(ibdir)/bash V=1 install \ + && cd .. \ + && rm -rf $$unpackdir \ && echo "GNU M4 $(m4-version)" > $@ # Metastore is used (through a Git hook) to restore the source modification -- cgit v1.2.1 From 8eb0892e179b4970a9835d29b5f57dd912ca4464 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Fri, 17 Apr 2020 01:06:20 +0100 Subject: IMPORTANT: software config directly under reproduce/software/config Until now the software configuration parameters were defined under the `reproduce/software/config/installation/' directory. This was because the configuration parameters of analysis software (for example Gnuastro's configurations) were placed under there too. But this was terribly confusing, because the run-time options of programs falls under the "analysis" phase of the project. With this commit, the Gnuastro configuration files have been moved under the new `reproduce/analysis/config/gnuastro' directory and the software configuration files are directly under `reproduce/software/config'. A clean build was done with this change and it didn't crash, but it may cause crashes in derived projects, so after merging with Maneage, please re-configure your project to see if anything has been missed. Please let us know if there is a problem. --- reproduce/software/make/basic.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'reproduce/software/make/basic.mk') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 47a01a3..17bb47a 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -33,10 +33,10 @@ # Top level environment +include reproduce/software/config/LOCAL.conf include reproduce/software/make/build-rules.mk -include reproduce/software/config/installation/LOCAL.conf -include reproduce/software/config/installation/versions.conf -include reproduce/software/config/installation/checksums.conf +include reproduce/software/config/versions.conf +include reproduce/software/config/checksums.conf lockdir = $(BDIR)/locks tdir = $(BDIR)/software/tarballs @@ -1334,12 +1334,14 @@ $(ibidir)/gcc: | $(ibidir)/binutils \ && cd ../.. \ && tempname=$$odir/gcc-$(gcc-version)/build/rpath-temp-copy \ && if [ "x$(on_mac_os)" != xyes ]; then \ - patchelf --add-needed $(ildir)/libiconv.so $(ildir)/libstdc++.so; \ for f in $$(find $(idir)/libexec/gcc) $(ildir)/libstdc++*; do \ isdynamic=$$(file $$f | grep "dynamically linked"); \ if [ x"$$isdynamic" != x ]; then \ cp $$f $$tempname; \ patchelf --set-rpath $(ildir) $$tempname; \ + if [ "$$f" = $(ildir)/libstdc++.so ]; then \ + patchelf --add-needed $(ildir)/libiconv.so $$tempname; \ + fi; \ mv $$tempname $$f; echo "corrected"; \ fi; \ done; \ -- cgit v1.2.1