diff options
author | Timo Kaufmann <timokau@zoho.com> | 2018-02-05 00:00:11 +0100 |
---|---|---|
committer | Timo Kaufmann <timokau@zoho.com> | 2018-02-05 15:03:24 +0100 |
commit | 272e9308278849438fbb0e5a9439f1fda89bf223 (patch) | |
tree | dcf15d65061a58648309be86d725b3525cd68589 /pkgs/applications/science/math | |
parent | 2bff46d193b92abbdcf903643389e7d715502d0d (diff) | |
download | nixlib-272e9308278849438fbb0e5a9439f1fda89bf223.tar nixlib-272e9308278849438fbb0e5a9439f1fda89bf223.tar.gz nixlib-272e9308278849438fbb0e5a9439f1fda89bf223.tar.bz2 nixlib-272e9308278849438fbb0e5a9439f1fda89bf223.tar.lz nixlib-272e9308278849438fbb0e5a9439f1fda89bf223.tar.xz nixlib-272e9308278849438fbb0e5a9439f1fda89bf223.tar.zst nixlib-272e9308278849438fbb0e5a9439f1fda89bf223.zip |
sage: fix non-deterministic build failures
The build was failing on some machines because of a `find` command that touched files in different orders on different machines. That confused `make`s timestamp mechanism.
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r-- | pkgs/applications/science/math/sage/spkg-giac.patch | 17 | ||||
-rw-r--r-- | pkgs/applications/science/math/sage/spkg-git.patch | 11 | ||||
-rw-r--r-- | pkgs/applications/science/math/sage/spkg-singular.patch | 16 |
3 files changed, 32 insertions, 12 deletions
diff --git a/pkgs/applications/science/math/sage/spkg-giac.patch b/pkgs/applications/science/math/sage/spkg-giac.patch index 15b91433d254..c79d4422133d 100644 --- a/pkgs/applications/science/math/sage/spkg-giac.patch +++ b/pkgs/applications/science/math/sage/spkg-giac.patch @@ -1,10 +1,19 @@ ---- old/build/pkgs/giac/spkg-install 2017-07-21 14:10:00.000000000 -0500 -+++ new/build/pkgs/giac/spkg-install 2017-10-15 15:55:55.321237645 -0500 -@@ -4,6 +4,8 @@ +diff --git a/build/pkgs/giac/spkg-install b/build/pkgs/giac/spkg-install +index bdd8df6cb8..3fd7a3ef8a 100644 +--- a/build/pkgs/giac/spkg-install ++++ b/build/pkgs/giac/spkg-install +@@ -2,6 +2,15 @@ ## Giac ########################################### -+find . -type f -exec sed -e 's@/bin/cp@cp@g' -i '{}' ';' && echo "Patching input parser" && find . -iname 'input_parser.cc' ++# Fix hardcoded paths, while making sure to only update timestamps of actually ++# changed files (otherwise confuses make) ++grep -rlF '/bin/cp' . | while read file ++do ++ sed -e 's@/bin/cp@cp@g' -i "$file" ++done ++ ++# Fix input parser syntax +sed -e 's@yylex (&yylval)@yylex (\&yyval, scanner)@gp' -i 'src/src/input_parser.cc' if [ "$SAGE_LOCAL" = "" ]; then diff --git a/pkgs/applications/science/math/sage/spkg-git.patch b/pkgs/applications/science/math/sage/spkg-git.patch index ff9a7b2e491a..74f552dd3c36 100644 --- a/pkgs/applications/science/math/sage/spkg-git.patch +++ b/pkgs/applications/science/math/sage/spkg-git.patch @@ -1,12 +1,17 @@ diff --git a/build/pkgs/git/spkg-install b/build/pkgs/git/spkg-install -index 8469cb58c2..d0dc9a1db9 100755 +index 87874de3d8..b0906245fa 100644 --- a/build/pkgs/git/spkg-install +++ b/build/pkgs/git/spkg-install -@@ -35,6 +35,8 @@ fi +@@ -33,6 +33,13 @@ fi cd src -+find . -type f -exec sed -e 's@/usr/bin/perl@perl@g' -i '{}' ';' ++# Fix hardcoded paths, while making sure to only update timestamps of actually ++# changed files (otherwise confuses make) ++grep -rlF '/usr/bin/perl' . | while read file ++do ++ sed -e 's@/usr/bin/perl@perl@g' -i "$file" ++done + # We don't want to think about Fink or Macports export NO_FINK=1 diff --git a/pkgs/applications/science/math/sage/spkg-singular.patch b/pkgs/applications/science/math/sage/spkg-singular.patch index d561768600b4..606ffcd3ad4e 100644 --- a/pkgs/applications/science/math/sage/spkg-singular.patch +++ b/pkgs/applications/science/math/sage/spkg-singular.patch @@ -1,11 +1,17 @@ ---- old/build/pkgs/singular/spkg-install 2017-10-15 10:35:41.826540964 -0500 -+++ new/build/pkgs/singular/spkg-install 2017-10-15 10:36:40.613743443 -0500 -@@ -4,6 +4,9 @@ +diff --git a/build/pkgs/singular/spkg-install b/build/pkgs/singular/spkg-install +index 8caafb1699..3c34e6608a 100644 +--- a/build/pkgs/singular/spkg-install ++++ b/build/pkgs/singular/spkg-install +@@ -2,6 +2,13 @@ ## Singular ########################################### -+find . -type f -exec sed -e 's@/bin/rm@rm@g' -i '{}' ';' -+#echo '#!/usr/bin/env bash\nIgnoring missing $1' > src/build-aux/missing ++# Fix hardcoded paths, while making sure to only update timestamps of actually ++# changed files (otherwise confuses make) ++grep -rlF '/bin/rm' . | while read file ++do ++ sed -e 's@/bin/rm@rm@g' -i "$file" ++done + if [ -z "$SAGE_LOCAL" ]; then echo >&2 "Error: SAGE_LOCAL undefined -- exiting..." |