From 1ee1d66e9b2bbcd8d957b7e6854bd930fa53db46 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 1 Dec 2020 17:32:44 +0000 Subject: Installation: m4 no longer depends on Texinfo In a recent build on a macOS, we recognized that Texinfo needs the 'libintl.h' headers of Gettext. However, Gettext depends on M4, and until now we had set M4 to depend on Texinfo. Therefore adding Gettext as a dependency of Texinfo would cause a circular dependency. On the macOS, we temporarily disabled M4's Texinfo dependency, and the build went through. I also checked on my GNU/Linux system: temporarily renamed all Texinfo built files from my system and done a clean build of M4 and it succeeded. To be further safe, I built Maneage from this commit (where M4 doesn't depend on Texinfo) in a Docker container, and it went through with no problems. So the current M4 version indeed doesn't need Texinfo. I think adding Texinfo as a dependency of M4 was a historic issue from the early days. In the process, I also cleaned 'basic.mk' a little: - A "# Level N" comment was added on top of each group of software that can be built in parallel (generally). - GNU Nano was moved to the end of the file (to be "Level 6"). - Some comments were edited in some places. --- reproduce/software/make/basic.mk | 96 ++++++++++++++++++++++++++++------------ 1 file changed, 67 insertions(+), 29 deletions(-) (limited to 'reproduce/software/make') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 934580a..d5484b2 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -572,8 +572,16 @@ $(ibidir)/bash-$(bash-version): \ -# The `-shared' flag will cause problems while building Perl on macOS, so -# we'll only use this configuration option when we are GNU/Linux + + + + + +# Level 4: Most other programs +# ---------------------------- + +# In Perl, The `-shared' flag will cause problems while building on macOS, +# so we'll only use this configuration option when we are GNU/Linux # systems. However, since the whole option must be used (which includes `=' # and empty space), its easier to define the variable as a Make variable # outside the recipe, not as a shell variable inside it. @@ -993,7 +1001,11 @@ $(ibidir)/libbsd-$(libbsd-version): $(ibidir)/coreutils-$(coreutils-version) # # [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-$(m4-version): $(ibidir)/texinfo-$(texinfo-version) +# +# M4 doesn't depend on PatchELF, but just to be consistent with the +# levels/phases introduced here (where the compressors are level 1, +# PatchELF is level 2, and ...), we'll set it as a dependency. +$(ibidir)/m4-$(m4-version): $(ibidir)/patchelf-$(patchelf-version) tarball=m4-$(m4-version).tar.gz $(call import-source, $(m4-url), $(m4-checksum)) cd $(ddir) @@ -1140,7 +1152,8 @@ $(ibidir)/sed-$(sed-version): $(ibidir)/coreutils-$(coreutils-version) echo "GNU Sed $(sed-version)" > $@ $(ibidir)/texinfo-$(texinfo-version): \ - $(ibidir)/perl-$(perl-version) + $(ibidir)/perl-$(perl-version) \ + $(ibidir)/gettext-$(gettext-version) tarball=texinfo-$(texinfo-version).tar.xz $(call import-source, $(texinfo-url), $(texinfo-checksum)) $(call gbuild, texinfo-$(texinfo-version), static) @@ -1156,28 +1169,7 @@ $(ibidir)/which-$(which-version): $(ibidir)/coreutils-$(coreutils-version) $(call gbuild, which-$(which-version), static) echo "GNU Which $(which-version)" > $@ -# GNU Nano is a very light-weight and small, command-line text editor (in -# total around 3.5 Mb after installation!). It is top-level target in the -# basic tools (nothing depends on it, it just depends on GCC). This is -# because some projects may choose to not have it by manually removing it -# from 'targets-proglib' above (it has no effect on processing after all!). -$(ibidir)/nano-$(nano-version): $(ibidir)/gcc-$(gcc-version) - tarball=nano-$(nano-version).tar.xz - $(call import-source, $(nano-url), $(nano-checksum)) - $(call gbuild, nano-$(nano-version), static) - echo "GNU Nano $(nano-version)" > $@ - - - - - - - - - - -# GCC and its prerequisites -# ------------------------- +# GNU ISL is necessary to build GCC. $(ibidir)/isl-$(isl-version): $(ibidir)/gmp-$(gmp-version) tarball=isl-$(isl-version).tar.bz2 $(call import-source, $(isl-url), $(isl-checksum)) @@ -1189,6 +1181,7 @@ $(ibidir)/isl-$(isl-version): $(ibidir)/gmp-$(gmp-version) echo "GNU Integer Set Library $(isl-version)" > $@ fi +# GNU MPC is necessary to build GCC. $(ibidir)/mpc-$(mpc-version): $(ibidir)/mpfr-$(mpfr-version) tarball=mpc-$(mpc-version).tar.gz $(call import-source, $(mpc-url), $(mpc-checksum)) @@ -1200,10 +1193,23 @@ $(ibidir)/mpc-$(mpc-version): $(ibidir)/mpfr-$(mpfr-version) echo "GNU Multiple Precision Complex library" > $@ fi + + + + + + + + + +# Level 5: Binutils & GCC +# ----------------------- +# # The installation of Binutils can cause problems during the build of other -# programs (http://savannah.nongnu.org/bugs/?56294). Therefore, we'll set -# all other basic programs as Binutils prerequisite and GCC (the final -# basic target) ultimately just depends on Binutils. +# programs (http://savannah.nongnu.org/bugs/?56294), but its necessary for +# GCC. Therefore, we'll set all other basic programs as Binutils +# prerequisite and GCC (the final basic target) ultimately just depends on +# Binutils. $(ibidir)/binutils-$(binutils-version): \ $(ibidir)/sed-$(sed-version) \ $(ibidir)/isl-$(isl-version) \ @@ -1213,6 +1219,7 @@ $(ibidir)/binutils-$(binutils-version): \ $(ibidir)/file-$(file-version) \ $(ibidir)/gawk-$(gawk-version) \ $(ibidir)/which-$(which-version) \ + $(ibidir)/texinfo-$(texinfo-version) \ $(ibidir)/libtool-$(libtool-version) \ $(ibidir)/metastore-$(metastore-version) \ $(ibidir)/findutils-$(findutils-version) \ @@ -1463,3 +1470,34 @@ $(ibidir)/gcc-$(gcc-version): $(ibidir)/binutils-$(binutils-version) # Write the final target. echo "GNU Compiler Collection (GCC) $(gcc-version)" > $@ fi + + + + + + + + + + +# Level 6: Basic text editor +# -------------------------- +# +# If the project is built in a minimal environment, there is no text +# editor, making it hard to work on the project. By default a minimal +# (relatively user-friendly: GNU Nano) text editor will thus also be built +# at the end of the "basic" tools. More advanced editors are available as +# optional high-level programs. GNU Nano is a very light-weight and small +# command-line text editor (around 3.5 Mb after installation!). +# +# The editor is a top-level target in the basic tools (given to +# 'targets-proglib' above). Hence nothing depends on it, and it just +# depends on GCC. This is done because some projects may choose to not have +# nano (and use their own optional high-level text editor). To do this, +# they just have to manually remove 'nano' from 'targets-proglib' above and +# add their optional text editor in 'TARGETS.conf'. +$(ibidir)/nano-$(nano-version): $(ibidir)/gcc-$(gcc-version) + tarball=nano-$(nano-version).tar.xz + $(call import-source, $(nano-url), $(nano-checksum)) + $(call gbuild, nano-$(nano-version), static) + echo "GNU Nano $(nano-version)" > $@ -- cgit v1.2.1 From 021ff34c256e1a1eb9de3f80e0d27a5b3477a2e4 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Wed, 2 Dec 2020 01:01:45 +0000 Subject: Less is now built as a basic software Less is rarely used in non-interactive mode and is primarily intended for interactively viewing large files. So its need within Maneage (for batch processing) wasn't often felt until now. However, when running './project shell' (which completely closes-off the outside environment), or building a Maneage'd project within a minimal container that doesn't have less, it becomes hard to use Git (and in particular its 'diff' output which depends on 'less'). With this commit, Less has been added as a dependency of Git in 'basic.mk'. In total its built product is roughly 800KB and builds within a second or two. So it isn't a burden on any project. But it can be very useful when the projects are being developed within the Maneage environment itself. --- reproduce/software/make/basic.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'reproduce/software/make') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index d5484b2..1349122 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -947,6 +947,7 @@ $(ibidir)/gettext-$(gettext-version): \ echo "GNU gettext $(gettext-version)" > $@ $(ibidir)/git-$(git-version): \ + $(ibidir)/less-$(less-version) \ $(ibidir)/curl-$(curl-version) \ $(ibidir)/gettext-$(gettext-version) \ $(ibidir)/libiconv-$(libiconv-version) @@ -970,6 +971,15 @@ $(ibidir)/gmp-$(gmp-version): \ -j$(numthreads) ,make check) echo "GNU Multiple Precision Arithmetic Library $(gmp-version)" > $@ +# Less is useful with Git (to view the diffs within a minimal container) +# and generally to view large files easily when the project is built in a +# container with a minimal OS. +$(ibidir)/less-$(less-version): $(ibidir)/patchelf-$(patchelf-version) + tarball=less-$(less-version).tar.gz + $(call import-source, $(less-url), $(less-checksum)) + $(call gbuild, less-$(less-version), static,,-j$(numthreads)) + echo "Less $(less-version)" > $@ + # On Mac OS, libtool does different things, so to avoid confusion, we'll # prefix GNU's libtool executables with `glibtool'. $(ibidir)/libtool-$(libtool-version): $(ibidir)/m4-$(m4-version) -- cgit v1.2.1 From cce4016a516fcac50a71b78a0d0e66caed75ce5f Mon Sep 17 00:00:00 2001 From: Raul Infante-Sainz Date: Wed, 9 Dec 2020 20:09:43 +0000 Subject: Configuration: not settting C_INCLUDE_PATH on macOS Until now, when building the high-level (optional) software, we would give both 'CPPFLAGS' and 'C_INCLUDE_PATH' the same value/directory in 'high-level.mk'. But we recently found that on macOS's C compiler ('clang'), if a directory is included in both 'CPPFLAGS' and 'C_INCLUDE_PATH', then that directory is ignored in 'CPPFLAGS' (which has higher priority). This caused linking problems when the version of a software on the host was different from the Maneage version. With this commit, 'C_INCLUDE_PATH' is not set on macOS any more and this fixed the problem on the reported systems. This bug was fixed with the help of Mohammad Akhlaghi and Mahdieh Navabi. --- reproduce/software/make/high-level.mk | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'reproduce/software/make') diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk index c3bda3e..bd9a61f 100644 --- a/reproduce/software/make/high-level.mk +++ b/reproduce/software/make/high-level.mk @@ -135,11 +135,18 @@ export PKG_CONFIG_PATH := $(ildir)/pkgconfig:$(idir)/share/pkgconfig export CC := $(ibdir)/gcc export CXX := $(ibdir)/g++ export F77 := $(ibdir)/gfortran -export C_INCLUDE_PATH := $(iidir) -export CPLUS_INCLUDE_PATH := $(iidir) export LD_RUN_PATH := $(ildir):$(il64dir) export LD_LIBRARY_PATH := $(ildir):$(il64dir) +# In macOS, if a directory exists in both 'C_INCLUDE_PATH' and 'CPPFLAGS' +# it will be ignored in 'CPPFLAGS' (which has higher precedence). So, we +# should not define 'C_INCLUDE_PATH' on macOS. This happened with clang +# (Apple LLVM version 10.0.0, clang-1000.11.45.5) +ifneq ($(on_mac_os),yes) +export C_INCLUDE_PATH := $(iidir) +export CPLUS_INCLUDE_PATH := $(iidir) +endif + # Recipe startup script, see `reproduce/software/shell/bashrc.sh'. export PROJECT_STATUS := configure_highlevel export BASH_ENV := $(shell pwd)/reproduce/software/shell/bashrc.sh -- cgit v1.2.1 From ff43476c4d293fda8765cfddbb1378f1b910218c Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sat, 2 Jan 2021 15:52:31 +0000 Subject: Copyright year updated in all source files Having entered 2021, it was necessary to update the copyright years at the top of the source files. We recommend that you do this for all your project-specific source files also. --- reproduce/software/make/README.md | 4 ++-- reproduce/software/make/atlas-multiple.mk | 2 +- reproduce/software/make/atlas-single.mk | 2 +- reproduce/software/make/basic.mk | 4 ++-- reproduce/software/make/build-rules.mk | 2 +- reproduce/software/make/high-level.mk | 4 ++-- reproduce/software/make/python.mk | 4 ++-- reproduce/software/make/xorg.mk | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) (limited to 'reproduce/software/make') diff --git a/reproduce/software/make/README.md b/reproduce/software/make/README.md index 7376cdd..8d12d7a 100644 --- a/reproduce/software/make/README.md +++ b/reproduce/software/make/README.md @@ -1,7 +1,7 @@ Software building instructions ------------------------------ -Copyright (C) 2019-2020 Mohammad Akhlaghi \ +Copyright (C) 2019-2021 Mohammad Akhlaghi \ See the end of the file for license conditions. This directory contains Makefiles that are called by the high-level @@ -52,4 +52,4 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along -with this file. If not, see . \ No newline at end of file +with this file. If not, see . diff --git a/reproduce/software/make/atlas-multiple.mk b/reproduce/software/make/atlas-multiple.mk index 9bd26b1..e782578 100644 --- a/reproduce/software/make/atlas-multiple.mk +++ b/reproduce/software/make/atlas-multiple.mk @@ -8,7 +8,7 @@ # # ------------------------------------------------------------------------ # -# Copyright (C) 2019-2020 Mohammad Akhlaghi +# Copyright (C) 2019-2021 Mohammad Akhlaghi # # This Makefile is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/reproduce/software/make/atlas-single.mk b/reproduce/software/make/atlas-single.mk index 29373e0..0934b66 100644 --- a/reproduce/software/make/atlas-single.mk +++ b/reproduce/software/make/atlas-single.mk @@ -8,7 +8,7 @@ # # ------------------------------------------------------------------------ # -# Copyright (C) 2019-2020 Mohammad Akhlaghi +# Copyright (C) 2019-2021 Mohammad Akhlaghi # # This Makefile is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 1349122..c4f0a16 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -21,8 +21,8 @@ # # ------------------------------------------------------------------------ # -# Copyright (C) 2018-2020 Mohammad Akhlaghi -# Copyright (C) 2019-2020 Raul Infante-Sainz +# Copyright (C) 2018-2021 Mohammad Akhlaghi +# Copyright (C) 2019-2021 Raul Infante-Sainz # # This Makefile is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/reproduce/software/make/build-rules.mk b/reproduce/software/make/build-rules.mk index d50c301..66c77bc 100644 --- a/reproduce/software/make/build-rules.mk +++ b/reproduce/software/make/build-rules.mk @@ -3,7 +3,7 @@ # imported into 'basic.mk' and 'high-level.mk'. They should be activated # with Make's 'Call' function. # -# Copyright (C) 2018-2020 Mohammad Akhlaghi +# Copyright (C) 2018-2021 Mohammad Akhlaghi # # This Makefile is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk index bd9a61f..948b23a 100644 --- a/reproduce/software/make/high-level.mk +++ b/reproduce/software/make/high-level.mk @@ -12,8 +12,8 @@ # # ------------------------------------------------------------------------ # -# Copyright (C) 2018-2020 Mohammad Akhlaghi -# Copyright (C) 2019-2020 Raul Infante-Sainz +# Copyright (C) 2018-2021 Mohammad Akhlaghi +# Copyright (C) 2019-2021 Raul Infante-Sainz # # This Makefile is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/reproduce/software/make/python.mk b/reproduce/software/make/python.mk index d39208f..18c68de 100644 --- a/reproduce/software/make/python.mk +++ b/reproduce/software/make/python.mk @@ -12,8 +12,8 @@ # # ------------------------------------------------------------------------ # -# Copyright (C) 2019-2020 Raul Infante-Sainz -# Copyright (C) 2019-2020 Mohammad Akhlaghi +# Copyright (C) 2019-2021 Raul Infante-Sainz +# Copyright (C) 2019-2021 Mohammad Akhlaghi # # This Makefile is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/reproduce/software/make/xorg.mk b/reproduce/software/make/xorg.mk index f59fb04..3178cb4 100644 --- a/reproduce/software/make/xorg.mk +++ b/reproduce/software/make/xorg.mk @@ -14,8 +14,8 @@ # # ------------------------------------------------------------------------ # -# Copyright (C) 2020 Mohammad Akhlaghi -# Copyright (C) 2020 Raul Infante-Sainz +# Copyright (C) 2021 Mohammad Akhlaghi +# Copyright (C) 2021 Raul Infante-Sainz # # This Makefile is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -- cgit v1.2.1