From 8e82dcc513b2e61e981c39987af426e700c607ad Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 18 Mar 2019 18:50:23 +0000 Subject: No Bzip2 shared libraries on macOS systems Bzip2 has a special/separate Makefile to build shared libraries which didn't work on a macOS. So with this commit, we are allowing Bzip2 shared libraries only on macOS systems. Also, I noticed that macOS's `sed' doesn't have the `-i' option (to do the change in place within the same file). So we are using `-e' to write the changed Makefile in a temporary directory, then rename that. --- .file-metadata | Bin 3956 -> 3956 bytes reproduce/src/make/dependencies-basic.mk | 12 +++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.file-metadata b/.file-metadata index c44891d..b192a5a 100644 Binary files a/.file-metadata and b/.file-metadata differ diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk index 5965f00..c08e6eb 100644 --- a/reproduce/src/make/dependencies-basic.mk +++ b/reproduce/src/make/dependencies-basic.mk @@ -293,7 +293,7 @@ $(ibdir)/bzip2: $(tdir)/bzip2-$(bzip2-version).tar.gz # function here and we need to take some extra steps (inspired # from the "Linux from Scratch" guide for Bzip2): # 1) The `sed' call is for relative installed symbolic links. - # 2) The special Makefile-libbz2_so builds the shared library. + # 2) The special Makefile-libbz2_so builds shared libraries. # # NOTE: the major version number appears in the final symbolic # link. @@ -303,10 +303,16 @@ $(ibdir)/bzip2: $(tdir)/bzip2-$(bzip2-version).tar.gz makeshared="echo no-shared"; \ else \ makecommand="make"; \ - makeshared="make -f Makefile-libbz2_so"; \ + if [ x$(on_mac_os) = xyes ]; then \ + makeshared="echo no-shared"; \ + else \ + makeshared="make -f Makefile-libbz2_so"; \ + fi; \ fi; \ cd $(ddir) && rm -rf $$tdir && tar xf $< && cd $$tdir \ - && sed -i 's@\(ln -s -f \)$$(PREFIX)/bin/@\1@' Makefile \ + && sed -e 's@\(ln -s -f \)$$(PREFIX)/bin/@\1@' Makefile \ + > Makefile.sed \ + && mv Makefile.sed Makefile \ && $$makeshared \ && cp -a libbz2* $(ildir)/ \ && make clean \ -- cgit v1.2.1 From 27e0e23ec87cdfed5a2843fa8af35b1e0ac2e615 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 18 Mar 2019 18:59:31 +0000 Subject: Reseting path in script to make symbolic links to system programs Until recently, there was no problem with the `makelink' script of `dependencies-basic.mk' because it was called on separate recipe lines (and thus separate shells). But recently we added a call to it within a single shell (for GCC on Mac OS systems). So a previous call to it would effect the next call. To fix this, in this commit, we are re-setting PATH to its original value after each call finishes. --- .file-metadata | Bin 3956 -> 3956 bytes reproduce/src/make/dependencies-basic.mk | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.file-metadata b/.file-metadata index b192a5a..696508d 100644 Binary files a/.file-metadata and b/.file-metadata differ diff --git a/reproduce/src/make/dependencies-basic.mk b/reproduce/src/make/dependencies-basic.mk index c08e6eb..2e6caf4 100644 --- a/reproduce/src/make/dependencies-basic.mk +++ b/reproduce/src/make/dependencies-basic.mk @@ -202,11 +202,13 @@ $(tarballs): $(tdir)/%: # is very annoying and can cause many complications. We thus remove any # part of PATH of that has `ccache' in it before making symbolic links to # the programs we are not building ourselves. -makelink = export PATH=$$(echo $(syspath)| tr : '\n' |grep -v ccache \ - | paste -s -d:); \ - a=$$(which $(1) 2> /dev/null); \ - if [ -f $(ibdir)/$(1) ]; then rm $(ibdir)/$(1); fi; \ - if [ x$$a != x ]; then ln -s $$a $(ibdir)/$(1); fi +makelink = origpath="$$PATH"; \ + export PATH=$$(echo $(syspath) | tr : '\n' | grep -v ccache \ + | paste -s -d:); \ + a=$$(which $(1) 2> /dev/null); \ + if [ -f $(ibdir)/$(1) ]; then rm $(ibdir)/$(1); fi; \ + if [ x$$a != x ]; then ln -s $$a $(ibdir)/$(1); fi; \ + export PATH="$$origpath" $(ibdir) $(ildir):; mkdir $@ $(ibdir)/low-level-links: | $(ibdir) $(ildir) @@ -748,12 +750,12 @@ $(ibdir)/gcc: $(gcc-prerequisites) \ $(ibdir)/which # On a macOS, we (currently!) won't build GCC because of some - # errors we are still trying to find. So, we'll just make a - # symbolic link to the host's executables. + # errors we are still trying to fix. So, we'll just make a symbolic + # link to the host's executables. if [ "x$(on_mac_os)" = xyes ]; then \ $(call makelink,gfortran); \ - $(call makelink,gcc); \ $(call makelink,g++); \ + $(call makelink,gcc); \ else \ \ rm -f $(ibdir)/gcc* $(ibdir)/g++ $(ibdir)/gfortran $(ibdir)/gcov*;\ -- cgit v1.2.1 From 356d998b87d93cc86dc44642ae95fed7478bc788 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 19 Mar 2019 19:24:54 +0000 Subject: Minor corrections: typo and adding file to .gitignore The LaTeX macro for libgit2 was not properly used in `paper.tex'. On Mac systems, after browsing the directory, a `.DS_Store' file was created. So to keep things clean on those systems, it is added to the files to be ignored by Git. --- .file-metadata | Bin 3956 -> 3956 bytes .gitignore | 1 + paper.tex | 31 +++++++++++++++---------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.file-metadata b/.file-metadata index 696508d..0fec14c 100644 Binary files a/.file-metadata and b/.file-metadata differ diff --git a/.gitignore b/.gitignore index 5879789..5521ca7 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ build Makefile tex/tikz .gnuastro +.DS_Store .texlive* tex/pipeline LOCAL_tmp.mk diff --git a/paper.tex b/paper.tex index 16f6eb8..a2a7c91 100644 --- a/paper.tex +++ b/paper.tex @@ -212,27 +212,26 @@ Libtool \libtoolversion, GNU Make \makeversion, GNU NCURSES \ncursesversion, GNU Readline \readlineversion, GNU Sed \sedversion, GNU Scientific Library (GSL) \gslversion, GNU Tar \tarversion, GNU Wget \wgetversion, GNU Which \whichversion, Lzip \lzipversion, GPL Ghostscript -\ghostscriptversion, Libbsd \libbsdversion, Libgit2 \libgitwoversion, +\ghostscriptversion, Libbsd \libbsdversion, Libgit2 \libgittwoversion, Libjpeg \libjpegversion, Libtiff \libtiffversion, Metastore (forked) \metastoreversion, OpenSSL \opensslversion, Pkg-config \pkgconfigversion, Unzip \unzipversion, WCSLIB \wcslibversion, XZ Utils \xzversion, Zip \zipversion, and ZLib \zlibversion. We use Python {\pythonversion} with the following packages: Numpy {\numpyversion} and Astropy {\astropyversion} -\citep{astropy2013, astropy2018}. The final paper was produced with -\TeX{} Live \texliveversion, using the following packages: \TeX{} -\textexversion, EC \texecversion, NewTX \texnewtxversion, Fontaxes -\texfontaxesversion, Keyval, \texxkeyvalversion, Etoolbox -\texetoolboxversion, Xcolor \texxcolorversion, Setspace -\texsetspaceversion, Caption \texcaptionversion, Footmisc -\texfootmiscversion, Datetime \texdatetimeversion, Fmtcount -\texfmtcountversion, Titlesec \textitlesecversion, Preprint -\texpreprintversion, Ulem \texulemversion, Bib\LaTeX{} \texbiblatexversion, -Biber \texbiberversion, Logreq \texlogreqversion, PGF/TiKZ \texpgfversion, -PGFPlots \texpgfplotsversion, FP \texfpversion, Courier \texcourierversion, -\TeX-gyre \textexgyreversion, TXFonts \textxfontsversion, Times -\textimesversion. We are very grateful to all their creators for freely -providing this necessary infrastructure. This research would not be -possible without them. +\citep{astropy2013, astropy2018}. The final paper was produced with \TeX{} +Live \texliveversion, using the following packages: \TeX{} \textexversion, +EC \texecversion, NewTX \texnewtxversion, Fontaxes \texfontaxesversion, +Keyval, \texxkeyvalversion, Etoolbox \texetoolboxversion, Xcolor +\texxcolorversion, Setspace \texsetspaceversion, Caption +\texcaptionversion, Footmisc \texfootmiscversion, Datetime +\texdatetimeversion, Fmtcount \texfmtcountversion, Titlesec +\textitlesecversion, Preprint \texpreprintversion, Ulem \texulemversion, +Bib\LaTeX{} \texbiblatexversion, Biber \texbiberversion, Logreq +\texlogreqversion, PGF/TiKZ \texpgfversion, PGFPlots \texpgfplotsversion, +FP \texfpversion, Courier \texcourierversion, \TeX-gyre \textexgyreversion, +TXFonts \textxfontsversion, Times \textimesversion. We are very grateful to +all their creators for freely providing this necessary infrastructure. This +research would not be possible without them. %% Tell BibLaTeX to put the bibliography list here. \printbibliography -- cgit v1.2.1