From 982d8599fbd9e19bb94e099f07a45697dda38e14 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 6 Oct 2019 12:09:44 +0200 Subject: [PATCH] gfortran: use version 8 by default to match our C and C++ compiler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We recently updated to gcc 8.x, but our default Fortran compiler is still at version 7.x. This causes trouble for all packages that mix C++ and Fortran code, like R does. Unfortunately, gfortran8 is marked broken on Darwin, so we cannot switch on that platform yet: | $ nix-instantiate --arg nixpkg '{ outPath = ./.; revCount = 999999; shortRev = "peti"; }' ./pkgs/top-level/release.nix -A unstable --show-trace | [...] | while evaluating the attribute 'handled' at /home/simons/src/nixpkgs/pkgs/stdenv/generic/check-meta.nix:251:7: | while evaluating 'handleEvalIssue' at /home/simons/src/nixpkgs/pkgs/stdenv/generic/check-meta.nix:147:38, called from /home/simons/src/nixpkgs/pkgs/stdenv/generic/check-meta.nix:252:14: | Failed to evaluate gfortran-wrapper-8.3.0: «broken»: is marked as broken --- pkgs/top-level/all-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 67a338e5a793..dd7bd8219d92 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7746,7 +7746,8 @@ in isl = isl_0_17; })); - gfortran = gfortran7; + # Version 8.x is marked broken on Darwin: https://gist.github.com/GrahamcOfBorg/bef0231b7129681950f03c4ac06781c8. + gfortran = if stdenv.isDarwin then gfortran7 else gfortran8; gfortran48 = wrapCC (gcc48.cc.override { name = "gfortran";