Build error on MacOS 10.12 with recent master (BinaryBuilder dependency issues?)

With a clean installation of a recent git clone, I’m unable to make it past the following error:

Traceback (most recent call last):
  File "/Users/jgoldfar/Public/julia-dev/contrib/normalize_triplet.py", line 118, in <module>
    }[list(filter(lambda x: re.match("\d+\.\d+\.\d+", x), sys.argv[2].split()))[-1][0]]
KeyError: '9'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   425  100   425    0     0   1387      0 --:--:-- --:--:-- --:--:--  1388
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
<snip>

It appears as though normalize_triplet.py needs a patch to allow GCC9 such as

diff --git a/contrib/normalize_triplet.py b/contrib/normalize_triplet.py
index d3b168e71e..493415d326 100755
--- a/contrib/normalize_triplet.py
+++ b/contrib/normalize_triplet.py
@@ -115,6 +115,7 @@ if gcc_version == "blank_gcc":
             "6": "gcc4",
             "7": "gcc7",
             "8": "gcc8",
+            "9": "gcc9",
         }[list(filter(lambda x: re.match("\d+\.\d+\.\d+", x), sys.argv[2].split()))[-1][0]]
 
 if cxx_abi == "blank_cxx_abi":
-- 

(though setting USECLANG=1 doesn’t remove this issue, so perhaps I’m misunderstanding this point) but then the corresponding file does not exist in the repository.
Has anyone else come across this issue? Is the solution building the necessary dependencies from source?

I think that patch should work. Did you try?
Alternatively, you can manually force compilation of dependencies with

USE_BINARYBUILDER=0

in a Make.user file.

Thanks for your help! That patch will fix normalize_triplet.py, but then the gcc9 version is not available to be downloaded, and the build system doesn’t include any fallback.

In my case, downgrading the homebrew-provided GCC fixed the issue; I know that rebuilding all of the dependencies for each compiler release can be time consuming: is there a way I can contribute?

Okay, I misread your patch. What if you try

diff --git a/contrib/normalize_triplet.py b/contrib/normalize_triplet.py
index d3b168e71e..493415d326 100755
--- a/contrib/normalize_triplet.py
+++ b/contrib/normalize_triplet.py
@@ -115,6 +115,7 @@ if gcc_version == "blank_gcc":
             "6": "gcc4",
             "7": "gcc7",
             "8": "gcc8",
+            "9": "gcc8",
         }[list(filter(lambda x: re.match("\d+\.\d+\.\d+", x), sys.argv[2].split()))[-1][0]]
 
 if cxx_abi == "blank_cxx_abi":

IIRC they should be compatible.

I think it is just a matter of time, but maybe you can open an issue just to keep track of it and link to this thread?

Edit: I opened an issue https://github.com/JuliaLang/julia/issues/31975

Edit2: Fix merged to master: https://github.com/JuliaLang/julia/pull/31976

1 Like