JuliaLang/julia

Better build-time error messages

Open

#35.852 aperta il 12 mag 2020

Vedi su GitHub
 (5 commenti) (1 reazione) (0 assegnatari)Julia (5773 fork)batch import
buildinghelp wanted

Metriche repository

Star
 (48.709 star)
Metriche merge PR
 (Merge medio 20g 6h) (157 PR mergiate in 30 g)

Descrizione

Currently, when building from source if you are missing certain things (like compilers...) the build fails with very verbose errors containing many things that are not relevant:

[imcinerney@pi3 1.5]$ make
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    679      0 --:--:-- --:--:-- --:--:--   678
100  388k  100  388k    0     0   228k      0  0:00:01  0:00:01 --:--:--  642k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0    719      0 --:--:-- --:--:-- --:--:--   719
100 18235  100 18235    0     0  14506      0  0:00:01  0:00:01 --:--:-- 86833
/bin/sh: gfortran: command not found
/bin/sh: g++: command not found
Traceback (most recent call last):
  File "/home/imcinerney/dev/julia/main/1.5/contrib/normalize_triplet.py", line 120, in <module>
    }[list(filter(lambda x: re.match("\d+\.\d+(\.\d+)?", x), sys.argv[2].split()))[-1].split('.')[0]]
IndexError: list index out of range
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   453  100   453    0     0   1038      0 --:--:-- --:--:-- --:--:--  1036
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
make[1]: *** [/home/imcinerney/dev/julia/main/1.5/deps/suitesparse.mk:144: /home/imcinerney/dev/julia/main/1.5/deps/srccache/SuiteSparse.v5.4.0-6..tar.gz] Error 22
make: *** [Makefile:60: julia-deps] Error 2

This error should be highlighting the fact that there is a problem with finding the programs gfortran and g++, but currently those errors are hidden by the Python traceback and the curl errors (so when I first saw this my immediate thought was a regression with detecting GCC10 again, since that traceback is in the same place).

Guida contributor