From 3c9bf3aff30f02c7d31bd86f36c4db2520f8ffa4 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Fri, 3 May 2024 13:07:41 +0200 Subject: Configuration: no dependency on /bin/sh and useful run-time options SUMMARY: no change necessary in your project, this commit only involves changes in how already-existing software are built. Some handy options have also been added to the top-level project script and the copyright years have been updated. Until now, if the host's '/bin/sh' had conflicts with the Maneage environment, the configuration of Maneage would crash as soon as we entered the building of high-level software. The full scenario is described in the comments of the newly added 'reproduce/software/shell/prep-source.sh'. This is most relevant when building older Maneage'd project in newer environments. With this commit, the following changes were made to avoid the problem above: - Maneage edits the source code of all installed software to replace '/bin/sh' with Maneage's own shell before the programs are built. Through this, we were able to solve the problem described above. - The portable '#!/usr/bin/env sh' shebangs are now used at the start of the scripts that run during configure time so it uses the first available shell that it finds in its PATH (the system's before Dash is built), then Dash, and after Dash is built, Bash. - For TeXLive, since we don't install it from source, it was necessary to add the libraries necessary for the local '/bin/sh' in LD_LIBRARY_PATH. Some high-level options have been added to the './project' script to simplify certain operations: --keep-going: do not stop upon the first crash, but keep going on to build targets until all build-able targets have been built. This is very useful for debugging large pipelines and allows you to isolate the problematic part of your project. --highlight-all: equivalent to calling both '--highlight-new' & '--highlight-notes'. --- reproduce/software/make/basic.mk | 93 ++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 32 deletions(-) (limited to 'reproduce/software/make/basic.mk') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 99e81d2..68c40b3 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -21,9 +21,9 @@ # # ------------------------------------------------------------------------ # -# Copyright (C) 2018-2023 Mohammad Akhlaghi -# Copyright (C) 2019-2023 Raul Infante-Sainz -# Copyright (C) 2022-2023 Pedram Ashofteh Ardakani +# Copyright (C) 2018-2025 Mohammad Akhlaghi +# Copyright (C) 2019-2025 Raul Infante-Sainz +# Copyright (C) 2022-2025 Pedram Ashofteh Ardakani # # 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 @@ -49,14 +49,15 @@ include reproduce/software/config/checksums.conf include reproduce/software/config/urls.conf # Basic directories -lockdir = $(BDIR)/software/locks -tdir = $(BDIR)/software/tarballs -ddir = $(BDIR)/software/build-tmp -idir = $(BDIR)/software/installed -ibdir = $(BDIR)/software/installed/bin -ildir = $(BDIR)/software/installed/lib -iidir = $(BDIR)/software/installed/include -ibidir = $(BDIR)/software/installed/version-info/proglib +lockdir = $(BDIR)/software/locks +tdir = $(BDIR)/software/tarballs +ddir = $(BDIR)/software/build-tmp +idir = $(BDIR)/software/installed +ibdir = $(BDIR)/software/installed/bin +ildir = $(BDIR)/software/installed/lib +iidir = $(BDIR)/software/installed/include +shsrcdir = "$(shell pwd)"/reproduce/software/shell +ibidir = $(BDIR)/software/installed/version-info/proglib # Ultimate Makefile target. GNU Nano (a simple and very light-weight text # editor) is installed by default, it is recommended to have it in the @@ -107,6 +108,15 @@ export CPPFLAGS := -I$(idir)/include $(CPPFLAGS) $(noccwarnings) # 'LD_LIBRARY_PATH', then we'll add our own newly installed libraries. We # will also make sure that there is no "current directory" in it (by # removing a starting or trailing ':' and any occurance of '::'. +# +# But first: in case LD_LIBRARY_PATH is empty, give it the default value of +# $(sys_library_sh_path) (which was the location of the libraries needed by +# the host's shell). This is because after we add the Maneage's library +# path, on some systems, no other libraries will be checked except those +# that are in 'LD_LIBRARY_PATH'. +ifeq ($(strip $(LD_LIBRARY_PATH)),) +export LD_LIBRARY_PATH=$(sys_library_sh_path) +endif export LD_LIBRARY_PATH := $(shell echo $(LD_LIBRARY_PATH):$(ildir) \ | sed -e's/::/:/g' -e's/^://' -e's/:$$//') @@ -127,7 +137,7 @@ export DYLD_LIBRARY_PATH := # Afer putting everything together, we use the first server as the # reference for all software if their '-url' variable isn't defined (in # 'reproduce/software/config/urls.conf'). -downloadwrapper = ./reproduce/analysis/bash/download-multi-try +downloadwrapper = ./reproduce/analysis/bash/download-multi-try.sh maneage_backup_urls := $(shell awk '!/^#/{printf "%s ", $$1}' \ reproduce/software/config/servers-backup.conf) backupservers_all = $(user_backup_urls) $(maneage_backup_urls) @@ -336,6 +346,7 @@ $(ibidir)/bzip2-$(bzip2-version): $(ibidir)/gzip-$(gzip-version) rm -rf $$tdir tar -xf $(tdir)/$$tarball cd $$tdir + $(shsrcdir)/prep-source.sh $(ibdir) sed -e 's@\(ln -s -f \)$$(PREFIX)/bin/@\1@' Makefile \ > Makefile.sed mv Makefile.sed Makefile @@ -634,6 +645,7 @@ $(ibidir)/perl-$(perl-version): $(ibidir)/patchelf-$(patchelf-version) rm -rf perl-$(perl-version) tar -xf $(tdir)/$$tarball cd perl-$(perl-version) + $(shsrcdir)/prep-source.sh $(ibdir) ./Configure -des \ -Dusethreads \ -Duseshrplib \ @@ -691,21 +703,16 @@ $(ibidir)/coreutils-$(coreutils-version): \ $(ibidir)/perl-$(perl-version) \ $(ibidir)/openssl-$(openssl-version) -# Import, unpack and enter the source directory. +# Import the source tarball. tarball=coreutils-$(coreutils-version).tar.lz $(call import-source, $(coreutils-url), $(coreutils-checksum)) + +# Unpack and enter the source. cd $(ddir) rm -rf coreutils-$(coreutils-version) tar -xf $(tdir)/$$tarball cd coreutils-$(coreutils-version) - -# Set the configure script to use our shell, note that we can't -# assume GNU SED here yet (it installs after Coreutils). - sed -e's|\#\! /bin/sh|\#\! $(ibdir)/bash|' \ - -e's|\#\!/bin/sh|\#\! $(ibdir)/bash|' \ - configure > configure-tmp - mv configure-tmp configure - chmod +x configure + $(shsrcdir)/prep-source.sh $(ibdir) # Configure, build and install Coreutils. ./configure --prefix=$(idir) SHELL=$(ibdir)/bash \ @@ -744,6 +751,7 @@ $(ibidir)/podlators-$(podlators-version): $(ibidir)/perl-$(perl-version) rm -rf podlators-$(podlators-version) tar -xf $(tdir)/$$tarball cd podlators-$(podlators-version) + $(shsrcdir)/prep-source.sh $(ibdir) perl Makefile.PL make make install @@ -1030,7 +1038,7 @@ $(ibidir)/gmp-$(gmp-version): \ $(call import-source, $(gmp-url), $(gmp-checksum)) $(call gbuild, gmp-$(gmp-version), static, \ --enable-cxx --enable-fat, \ - -j$(numthreads) ,make check) + -j$(numthreads)) echo "GNU Multiple Precision Arithmetic Library $(gmp-version)" > $@ # Less is useful with Git (to view the diffs within a minimal container) @@ -1070,16 +1078,27 @@ $(ibidir)/libtool-$(libtool-version): $(ibidir)/m4-$(m4-version) $(ibidir)/grep-$(grep-version): $(ibidir)/coreutils-$(coreutils-version) tarball=grep-$(grep-version).tar.lz $(call import-source, $(grep-url), $(grep-checksum)) - $(call gbuild, grep-$(grep-version), static,,V=1) + $(call gbuild, grep-$(grep-version), static,, \ + -j$(numthreads) V=1) echo "GNU Grep $(grep-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. +# +# The '--with-syscmd-shell' is used as the default shell and if not given, +# 'm4' will use '/bin/sh' (which is not under Maneage control and can cause +# problems in 'high-level.mk' because it closes off the system's +# LD_LIBRARY_PATH and if the system's '/bin/sh' needs a special system +# library, the high-level programs will not be built). We are setting this +# default shell to Dash because M4 is built before our own Bash. Recall +# that Dash is built before we enter this Makefile. $(ibidir)/m4-$(m4-version): $(ibidir)/patchelf-$(patchelf-version) tarball=m4-$(m4-version).tar.lz $(call import-source, $(m4-url), $(m4-checksum)) - $(call gbuild, m4-$(m4-version), static,,V=1) + $(call gbuild, m4-$(m4-version), static, \ + --with-syscmd-shell=$(ibdir)/dash, \ + -j$(numthreads) V=1) echo "GNU M4 $(m4-version)" > $@ $(ibidir)/mpfr-$(mpfr-version): $(ibidir)/gmp-$(gmp-version) @@ -1169,7 +1188,7 @@ $(ibidir)/mpc-$(mpc-version): $(ibidir)/mpfr-$(mpfr-version) echo "" > $@ else $(call gbuild, mpc-$(mpc-version), static, , \ - -j$(numthreads), make check) + -j$(numthreads)) echo "GNU Multiple Precision Complex library" > $@ fi @@ -1399,6 +1418,7 @@ $(ibidir)/gcc-$(gcc-version): $(ibidir)/binutils-$(binutils-version) ln -s $$odir/gcc-$(gcc-version) $(ddir)/gcc-$(gcc-version) fi cd gcc-$(gcc-version) + $(shsrcdir)/prep-source.sh $(ibdir) # Unfortunately binutils installs headers like 'ansidecl.h' that # have been seen to conflict with GCC's internal versions of those @@ -1506,7 +1526,18 @@ $(ibidir)/gcc-$(gcc-version): $(ibidir)/binutils-$(binutils-version) -# Software that need re-compilation (to use our own libraries) +# Level 6: need re-compilation +# ---------------------------- +# +# The initial build of these was done with the host's settings, which will +# cause problems later when we completely close-off the host environment. +$(ibidir)/make-$(make-version): $(ibidir)/gcc-$(gcc-version) + tarball=make-$(make-version).tar.lz + $(call import-source, $(make-url), $(make-checksum)) + $(call gbuild, make-$(make-version), static, \ + --disable-dependency-tracking --without-guile) + echo "GNU Make $(make-version)" > $@ + $(ibidir)/lzip-$(lzip-version): $(ibidir)/gcc-$(gcc-version) tarball=lzip-$(lzip-version).tar unpackdir=lzip-$(lzip-version) @@ -1514,6 +1545,7 @@ $(ibidir)/lzip-$(lzip-version): $(ibidir)/gcc-$(gcc-version) rm -rf $$unpackdir tar -xf $(tdir)/$$tarball cd $$unpackdir + $(shsrcdir)/prep-source.sh $(ibdir) ./configure --build --check --installdir="$(ibdir)" if [ -f $(ibdir)/patchelf ]; then $(ibdir)/patchelf --set-rpath $(ildir) $(ibdir)/lzip; @@ -1526,11 +1558,7 @@ $(ibidir)/lzip-$(lzip-version): $(ibidir)/gcc-$(gcc-version) - - - - -# Level 6: Basic text editor +# Level 7: Basic text editor # -------------------------- # # If the project is built in a minimal environment, there is no text @@ -1547,7 +1575,8 @@ $(ibidir)/lzip-$(lzip-version): $(ibidir)/gcc-$(gcc-version) # nano (and use their own optional high-level text editor). To do this, you # can just have to manually remove 'nano' from 'targets-proglib' above and # add their optional text editor in 'TARGETS.conf'. -$(ibidir)/nano-$(nano-version): $(ibidir)/lzip-$(lzip-version) +$(ibidir)/nano-$(nano-version): $(ibidir)/lzip-$(lzip-version) \ + $(ibidir)/make-$(make-version) tarball=nano-$(nano-version).tar.lz $(call import-source, $(nano-url), $(nano-checksum)) $(call gbuild, nano-$(nano-version), static) -- cgit v1.2.1 From 890858795fd6e0c8c1f3050adec7f4bc78e9e47c Mon Sep 17 00:00:00 2001 From: Giacomo Lorenzetti Date: Tue, 21 Jan 2025 18:57:10 +0100 Subject: IMPORTANT: 73 software upgrades and added offline mode Summary: This is a software update to make Maneage more portable and up to date. It does not involve any Maneage infrastructure changes. You should just re-build your project to make sure the updated software haven't removed/changed any of their features that you were using. Until now, the software in Maneage had not been updated for almost 2.5 years (since August 2022) and were starting to get dated! Also, when no internet is available (for example in a HPC), the Zenodo check would always cause a crash and needed to be commented manually. With this commit, all the basic software that had been updated as well as the dependencies of Gnuastro (which we commit to maintaining) have been updated after a check of their webpage (see the full list below). To fix the offline issue, a new '--offline' option has been added to the project script. The other following changes were made: - tarball-prepare: has become more resilient (for dealing with file name with spaces or Lzip, which should not be compressed). - Readme: improve documentation when used in Docker. Below you can see the list of basic software that have been updated. The only basic software that have not been updated upstream since the previous Maneage software update are 'bison', 'flock', 'm4', 'pkgconfig', 'unzip' and 'zip'. bash 5.2-rc2 5.2.37 binutils 2.39 2.43.1 coreutils 9.1 9.6 curl 7.84.0 8.11.1 dash 0.5.11-057cd65 0.5.12 diffutils 3.8 3.10 file 5.42 5.46 findutils 4.9.0 4.10.0 gawk 5.1.1 5.3.1 gcc 12.1.0 14.2.0 gettext 0.21 0.23.1 git 2.37.1 2.48.1 gmp 6.2.1 6.3.0 grep 3.7 3.11 gzip 1.12 1.13 help2man 1.49.2 1.49.3 isl 0.24 0.27 less 590 668 libiconv 1.17 1.18 libtool 2.4.7 2.5.4 libunistring 1.0 1.3 libxml2 2.9.12 2.13.5 lzip 1.23 1.25 make 4.3 4.4.1 mpc 1.2.1 1.3.1 mpfr 4.1.0 4.2.1 nano 6.4 8.3 ncurses 6.3 6.5 openssl 3.0.5 3.4.0 perl 5.36.0 5.40.1 podlators 4.14 6.0.2 readline 8.2-rc2 8.2.13 sed 4.8 4.9 tar 1.34 1.35 texinfo 6.8 7.2 wget 1.21.2 1.25.0 which 2.21 2.23 xz 5.2.5 5.6.3 zlib 1.2.11 1.3.1 The high-level software that have been updated. autoconf 2.71 2.72 automake 1.16.5 1.17 cfitsio 4.1.0 4.5.0 cmake 3.24.0 3.31.5 expat 2.4.1 2.6.4 fontconfig 2.14.0 2.16.0 freetype 2.11.0 2.13.3 ghostscript 9.56.1 10.04.0 gnuastro 0.18 0.23 gsl 2.7 2.8 libffi 3.4.2 3.4.7 libgit2 1.3.0 1.9.0 libice 1.0.10 1.1.2 libidn 1.38 1.42 libjpeg 9e 9f libpaper 1.1.28 1.1.29 libpng 1.6.37 1.6.46 libpthread-stubs 0.4 0.5 libsm 1.2.3 1.2.5 libtiff 4.4.0 4.7.0 libxau 1.0.9 1.0.12 libxcb 1.15 1.17 libxdmcp 1.1.3 1.1.5 libxext 1.3.4 1.3.6 libxt 1.2.1 1.3.1 python 3.10.6 3.13.12 util-macros 1.19.3 1.20.2 wcslib 7.11 8.4 xcb-proto 1.15 1.17 xorgproto 2022.1 2024.1 xtrans 1.4.0 1.5.2 --- reproduce/software/make/basic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'reproduce/software/make/basic.mk') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 68c40b3..628a0e2 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -774,7 +774,7 @@ $(ibidir)/openssl-$(openssl-version): $(ibidir)/podlators-$(podlators-version) \ # First download the certificates and copy them into the # installation directory. tarball=cert.pem-$(certpem-version) - $(call import-source, $(cert-url), $(cert-checksum)) + $(call import-source, $(certpem-url), $(certpem-checksum)) cp $(tdir)/cert.pem-$(certpem-version) $(idir)/etc/ssl/cert.pem # Now download the OpenSSL tarball. -- cgit v1.2.1 From a55a407c1f2a1b280be78f24abd1fe6d4a8032e2 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Thu, 13 Feb 2025 19:27:57 +0100 Subject: Configuration: new server for tarballs and portability fixed SUMMARY: no change is necessary for your pipeline after upgrading to this commit. Until this commit, the following noteworthy portability problems existed that have been fixed as described in each item. - In commit 8908587 (titled "IMPORTANT: 73 software upgrades and added offline mode"; committed on 2025-02-11); the versions of all (except those that were not updated upstream) basic software as well as the high-level software necessary for Gnuastro were updated. This included Python. However, the update of Python could cause crashes in the Python-related software that are also in Maneage but not tested for that commit. -- With this commit, Python has been revered back to 3.10.6 (from 3.13.2) and it has been taken to a dedicated part of 'versions.conf' (reminding the reader that the version of Python should only be updated by the Python maintainer: to ensure it doesn't conflict with Python-based builds). - Following the update of XZ Utils in 8908587, the custom build recipe that was necessary is no longer necessary. This was reported by Boud Roukema (see https://savannah.nongnu.org/bugs/index.php?62700). -- With this commit, XZ Utils uses our basic high-level build scripts. - CMake could use out-of-Maneage libraries for those that we already had in Maneage on some systems. This was reported by Boud Roukema (see https://savannah.nongnu.org/bugs/?63043) -- With this commit, CMake is built with '--no-system-libs'; so it builds and statically links to all its necessary libraries internally (not confusing between Maneage and the host). - Building Binutils 2.39 was likely to fail on older GCC versions due to special features (such as the 'gprofng' feature when building with GCC 6.2.0). This was reported by Boud Roukema in https://savannah.nongnu.org/bugs/index.php?63242. -- With this commit, the 'gprofng' feature of Binutils has been disabled by default to allow reproducibility on older systems. If you need it, remove the '--enable-gprofng=no' option in the build recipe of Binutils. - The Maneage tarball repository is now also kept in 'gitlab.cefca.es'. -- With this commit, a new server URL has been added for this. - The list of TeXLive packages included some packages that get installed in the basic scheme that we do for the initial setup of TeXLive. -- With this commit, the extra packages have been removed. --- reproduce/software/make/basic.mk | 77 +++++++++++++++------------------------- 1 file changed, 28 insertions(+), 49 deletions(-) (limited to 'reproduce/software/make/basic.mk') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 628a0e2..cf155f0 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -273,46 +273,10 @@ $(ibidir)/gzip-$(gzip-version): | $(ibdir) $(ildir) $(lockdir) $(call gbuild, gzip-$(gzip-version), static, , V=1) echo "GNU Gzip $(gzip-version)" > $@ -# 2022-07-14 B Roukema -# -# xz-5.2.5 fails on (at least) CentOS 7 (Redhat) systems while trying -# to compile 'cmake' in Maneage - this is Maneage bug 62700 [1]. -# -# The fix appears to be just a few lines, although it's not clear -# how robust or long-term it is. Since we don't yet have 'patch' in -# 'basic.mk', this file has to be copied into place rather than patched. - -# xz-5.2.5_src_liblzma_liblzma.map is a patched -# version of xz-5.2.5/src/liblzma/liblzma.map based on discussion at -# [1] + [2] + the patch file [3]. -# -# [1] https://savannah.nongnu.org/bugs/index.php?62700 -# [2] https://github.com/easybuilders/easybuild-easyconfigs/issues/14991 -# [3] https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/bcebb3320ffb63f9804ca8d4d64d1822ec7c9792/easybuild/easyconfigs/x/XZ/XZ-5.2.5_compat-libs.patch $(ibidir)/xz-$(xz-version): $(ibidir)/gzip-$(gzip-version) - -# Prepare the tarball. tarball=xz-$(xz-version).tar.lz $(call import-source, $(xz-url), $(xz-checksum)) - -# Until the bug mentioned above is fixed, we'll can't use the generic -# rule. -# $(call gbuild, xz-$(xz-version), static) - -# Configure and build with patched file. - srcdir=$$(pwd) - unpackdir=xz-$(xz-version) - patchedfile=xz-5.2.5_src_liblzma_liblzma.map - cd $(ddir) - rm -rf $$unpackdir - tar -x -f $(tdir)/$$tarball - cd $$unpackdir - cp -pv $$srcdir/reproduce/software/patches/$$patchedfile \ - src/liblzma/liblzma.map # copy the fixed file into place - ./configure --prefix=$(idir) - make install - cd .. - rm -rf $$unpackdir + $(call gbuild, xz-$(xz-version), static) echo "XZ Utils $(xz-version)" > $@ $(ibidir)/bzip2-$(bzip2-version): $(ibidir)/gzip-$(gzip-version) @@ -1247,7 +1211,8 @@ $(ibidir)/binutils-$(binutils-version): \ # Build binutils with the standard 'gbuild' function. $(call gbuild, binutils-$(binutils-version), static, \ - --with-lib-path=$(sys_library_path), \ + --with-lib-path=$(sys_library_path) \ + --enable-gprofng=no, \ -j$(numthreads) V=1) # The 'ld' linker of Binutils needs several '*crt*.o' files from @@ -1375,21 +1340,35 @@ $(ibidir)/gcc-$(gcc-version): $(ibidir)/binutils-$(binutils-version) # to avoid building so many small/temporary files and possibly # harming the hard-drive or SSD. But if the RAM doesn't have enough # space, we should use the hard-drive or SSD. During its build, -# GCC's build directory will become about 7GiB (in units of 1024^3 -# bytes, for GCC 12.1.0, which corresponds to 7.5GB, in units of -# 1000^3 bytes). So at this step, we make sure that we have more -# than 12GiB before GCC starts to build. See the figure in the link -# below for GCC's RAM consumption as a function of time: +# GCC's build directory will become several gigabytes and the build +# also needs RAM. You can track the RAM usage of the system with a +# 1-second resolution (if no other RAM consuming program is running +# while building GCC) with the command below (example outputs can +# be seen in https://savannah.nongnu.org/task/index.php?16623). # -# https://savannah.nongnu.org/task/?16244#comment12 +# c=1; while true; do POSIXLY_CORRECT=1 df -P /dev/shm/maneage-* | awk 'NR==2{print '$c', $3}'; c=$((c+1)); sleep 1; done > mem-usage.txt +# asttable mem-usage.txt -c1,'arith $2 512 x 1024 / 1024 / 1024 /' -o mem.fits # # For POSIX portability and longevity (default sizes might change), # we use the '-P' option, and we use the environment variable -# POSIXLY_CORRECT=1, so the 'block size' is 512 bytes. We'll also -# allow for about ~0.5 GB at the start. +# POSIXLY_CORRECT=1, so the 'block size' is 512 bytes. In this way, +# to get the actual GiB amount, multiply the value returned above +# by 512 (B/block), then divide by 1024^3 (B/GiB). +# +# To get the final value to use here, get the maximum used value +# after GCC is fully built and you have stopped the 'while true' +# command above. You can do this with the command below (assumes +# you have Gnuastro). +# +# aststatistics mem-usage.txt -c2 --maximum | asttable -c'arith $1 7000000 +' -Afixed -B0 +# +# The extra space is because we will assume an extra 3 GiB = 3GiB * +# 1024^3 (B/GiB) / 512 (B/block) = 6291456 blocks are necessary for +# the building (let's round it to 7000000!). # -# So we need 8 GiB * 1024^3 (B/GiB) / 512 blocks/B = 16777216 -# blocks, in blocks of 512 bytes. +# Therefore, we need to make sure that the running system more than +# the necessary amount of space in the RAM. To do this, we use 'df' +# below. # # The 4th column of 'df' is the "available" space at the time of # running, not the full space. So the 'RAM disk' that the OS @@ -1399,7 +1378,7 @@ $(ibidir)/gcc-$(gcc-version): $(ibidir)/binutils-$(binutils-version) # alone - no other Maneage software is built at the same time as # GCC - so this amount of RAM should be enough. in_ram=$$(POSIXLY_CORRECT=1 df -P $(ddir) \ - | awk 'NR==2{print ($$4>16777216) ? "yes" : "no"}'); \ + | awk 'NR==2{print ($$4>26613216) ? "yes" : "no"}'); \ if [ $$in_ram = "yes" ]; then odir=$(ddir) else odir=$(BDIR)/software/build-tmp-gcc-due-to-lack-of-space -- cgit v1.2.1