From 2da936e61fd3c943f10f5749c6f88b1eb70941fc Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Fri, 4 May 2018 18:46:36 +0200 Subject: [PATCH 01/18] gcc: default to gcc8 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a37de17c6969..3aaeb5bad116 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6072,7 +6072,7 @@ with pkgs; gerbil-unstable = callPackage ../development/compilers/gerbil/unstable.nix { }; gccFun = callPackage ../development/compilers/gcc/7; - gcc = gcc7; + gcc = gcc8; gcc-unwrapped = gcc.cc; gccStdenv = if stdenv.cc.isGNU then stdenv else stdenv.override { From c10842fe0b27acb8809181a5eaa2da97ee5d3ce3 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Wed, 9 May 2018 17:00:06 +0200 Subject: [PATCH 02/18] libomxil-bellagio: fix build on gcc8 Added the `-Wno-error=array-bounds` flag. Fixes #40213. --- pkgs/development/libraries/libomxil-bellagio/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/libomxil-bellagio/default.nix b/pkgs/development/libraries/libomxil-bellagio/default.nix index 28c8a915c635..c640d8a8cd2f 100644 --- a/pkgs/development/libraries/libomxil-bellagio/default.nix +++ b/pkgs/development/libraries/libomxil-bellagio/default.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation rec { patches = [ ./fedora-fixes.patch ]; + # Fix for #40213, probably permanent, because upstream doesn't seem to be + # developed anymore. Alternatively, gcc7Stdenv could be used. + NIX_CFLAGS_COMPILE = "-Wno-error=array-bounds"; + meta = with stdenv.lib; { homepage = https://sourceforge.net/projects/omxil/; description = "An opensource implementation of the Khronos OpenMAX Integration Layer API to access multimedia components"; From 3a395ccb57f3d918a361c646f0d7765be63f90a6 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Wed, 9 May 2018 22:34:04 +0200 Subject: [PATCH 03/18] systemd: suppress certain warnings to compile under gcc8 --- pkgs/os-specific/linux/systemd/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 58a1c7ca7147..593dbfe181e1 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -17,6 +17,7 @@ let pythonLxmlEnv = buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]); in stdenv.mkDerivation rec { + # To whoever updates this to 239: check the todo on line 173. version = "238"; name = "systemd-${version}"; @@ -166,6 +167,12 @@ in stdenv.mkDerivation rec { "-USYSTEMD_CGROUP_AGENT_PATH" "-DSYSTEMD_CGROUP_AGENT_PATH=\"/run/current-system/systemd/lib/systemd/systemd-cgroups-agent\"" "-USYSTEMD_BINARY_PATH" "-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\"" + + + # Temporary flags to get this to compile under GCC8. + # TODO when updating (to systemd 239): remove this. + "-Wno-maybe-uninitialized" + "-Wno-error=format-truncation" ]; postInstall = '' From d93b3157c5b55943a7185690c09ed3dd28e238fe Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Sun, 13 May 2018 14:14:09 +0200 Subject: [PATCH 04/18] nasm: set -Wno-error=attributes for gcc8 (#40431) --- pkgs/development/compilers/nasm/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/compilers/nasm/default.nix b/pkgs/development/compilers/nasm/default.nix index 89dd7dc3fdc5..26a2892fbbd2 100644 --- a/pkgs/development/compilers/nasm/default.nix +++ b/pkgs/development/compilers/nasm/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { make golden && make test ''; + NIX_CFLAGS_COMPILE="-Wno-error=attributes"; + meta = with stdenv.lib; { homepage = http://www.nasm.us/; description = "An 80x86 and x86-64 assembler designed for portability and modularity"; From 116cce8b5f868c18b91e67fb3b5ba0eed093e62e Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Sun, 13 May 2018 17:26:27 +0200 Subject: [PATCH 05/18] libglvnd: set -Wno-error=array-bounds (#40432) --- pkgs/development/libraries/libglvnd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix index 7e1a2b549681..0661c56f0160 100644 --- a/pkgs/development/libraries/libglvnd/default.nix +++ b/pkgs/development/libraries/libglvnd/default.nix @@ -20,6 +20,8 @@ in stdenv.mkDerivation rec { "-UDEFAULT_EGL_VENDOR_CONFIG_DIRS" # FHS paths are added so that non-NixOS applications can find vendor files. "-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${driverLink}/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\"" + + "-Wno-error=array-bounds" ]; # Indirectly: https://bugs.freedesktop.org/show_bug.cgi?id=35268 From 836404df95a653494abd843e56dd639d6e1bfd77 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Mon, 14 May 2018 21:27:56 +0200 Subject: [PATCH 06/18] gcc: reset default to gcc7 on darwin --- 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 3aaeb5bad116..0993d59df560 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6072,7 +6072,8 @@ with pkgs; gerbil-unstable = callPackage ../development/compilers/gerbil/unstable.nix { }; gccFun = callPackage ../development/compilers/gcc/7; - gcc = gcc8; + # Temporary solution until #40038 is fixed + gcc = if hostPlatform.isDarwin then gcc7 else gcc8; gcc-unwrapped = gcc.cc; gccStdenv = if stdenv.cc.isGNU then stdenv else stdenv.override { From 87fd200b9a66a0dd0d7e01247ed30643d98f31fa Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Mon, 14 May 2018 21:28:17 +0200 Subject: [PATCH 07/18] gcc8: mark as broken on darwin --- pkgs/development/compilers/gcc/8/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 2465e6149c0a..494f37c25e4f 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -439,6 +439,9 @@ stdenv.mkDerivation ({ stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ stdenv.lib.platforms.darwin; + + # See #40038 + broken = stdenv.isDarwin; }; } From 7feb762344beca06540d073301ccc5217284ee68 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Tue, 15 May 2018 15:39:16 +0200 Subject: [PATCH 08/18] gcc8: s/hostPlatform/stdenv/ --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0993d59df560..5ef4a36181d9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6073,7 +6073,7 @@ with pkgs; gccFun = callPackage ../development/compilers/gcc/7; # Temporary solution until #40038 is fixed - gcc = if hostPlatform.isDarwin then gcc7 else gcc8; + gcc = if stdenv.isDarwin then gcc7 else gcc8; gcc-unwrapped = gcc.cc; gccStdenv = if stdenv.cc.isGNU then stdenv else stdenv.override { From 3ec39daf0ecf3c1855c31fff8655868b764afb23 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Tue, 15 May 2018 15:39:31 +0200 Subject: [PATCH 09/18] gcc8: disable test on darwin --- pkgs/top-level/release.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 5233051cad83..cffb56ab00bc 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -110,7 +110,7 @@ let jobs.tests.cc-wrapper-gcc7.x86_64-linux jobs.tests.cc-wrapper-gcc7.x86_64-darwin jobs.tests.cc-wrapper-gcc8.x86_64-linux - jobs.tests.cc-wrapper-gcc8.x86_64-darwin + # jobs.tests.cc-wrapper-gcc8.x86_64-darwin jobs.tests.cc-wrapper-clang.x86_64-linux jobs.tests.cc-wrapper-clang.x86_64-darwin jobs.tests.cc-wrapper-libcxx.x86_64-linux From 68cedc0b48c04366b326e8f2eb57b32c65c507a8 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 10 May 2018 20:10:06 -0500 Subject: [PATCH 10/18] release: disable tests.cc-wrapper-gcc8.x86_64-darwin This test is broken because gcc8.x86_64-darwin is broken. Please add the test back in once we have fixed it! Job: https://hydra.nixos.org/job/nixpkgs/trunk/gcc8.x86_64-darwin Issue: #40038 --- pkgs/top-level/release.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index cffb56ab00bc..efced59ad91b 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -110,7 +110,10 @@ let jobs.tests.cc-wrapper-gcc7.x86_64-linux jobs.tests.cc-wrapper-gcc7.x86_64-darwin jobs.tests.cc-wrapper-gcc8.x86_64-linux + + # broken see issue #40038 # jobs.tests.cc-wrapper-gcc8.x86_64-darwin + jobs.tests.cc-wrapper-clang.x86_64-linux jobs.tests.cc-wrapper-clang.x86_64-darwin jobs.tests.cc-wrapper-libcxx.x86_64-linux From 479f6960d8d7a48c34bf413019068bcc8822f836 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Wed, 16 May 2018 11:25:34 +0200 Subject: [PATCH 11/18] llvm6: default to gcc7 instead of gcc8 --- pkgs/top-level/all-packages.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5ef4a36181d9..f609993a0146 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6706,8 +6706,10 @@ with pkgs; llvmPackages_6 = callPackage ../development/compilers/llvm/6 ({ inherit (stdenvAdapters) overrideCC; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' + } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU) { + stdenv = overrideCC stdenv (if stdenv.hostPlatform.isi686 then gcc6 else gcc7); + # with gcc-7 on i686: undefined reference to `__divmoddi4' + # Failing tests with gcc8. }); manticore = callPackage ../development/compilers/manticore { }; From d2f213216001232aa979f48b15a71999850635e0 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Wed, 16 May 2018 21:04:45 +0200 Subject: [PATCH 12/18] iasl: 20180313 -> 20180508 --- pkgs/development/compilers/iasl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/iasl/default.nix b/pkgs/development/compilers/iasl/default.nix index 22f80ae559f7..6cf4c85fb200 100644 --- a/pkgs/development/compilers/iasl/default.nix +++ b/pkgs/development/compilers/iasl/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "iasl-${version}"; - version = "20180313"; + version = "20180508"; src = fetchurl { url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz"; - sha256 = "05ab2xfv9wqwbzjaa9xqgrvvan87rxv29hw48h1gcckpc5smp2wm"; + sha256 = "1n7lqmv77kg28drahvxzybwl9v4hzwi8i7xkpgliclfcp5ff909b"; }; NIX_CFLAGS_COMPILE = "-O3"; From 482a41f025a275d2f60f3d0067ca30912f146ee6 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Wed, 16 May 2018 21:10:59 +0200 Subject: [PATCH 13/18] iasl: Temporary fix for acpica/acpica/#387 --- pkgs/development/compilers/iasl/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/iasl/default.nix b/pkgs/development/compilers/iasl/default.nix index 6cf4c85fb200..a514672016f6 100644 --- a/pkgs/development/compilers/iasl/default.nix +++ b/pkgs/development/compilers/iasl/default.nix @@ -9,7 +9,11 @@ stdenv.mkDerivation rec { sha256 = "1n7lqmv77kg28drahvxzybwl9v4hzwi8i7xkpgliclfcp5ff909b"; }; - NIX_CFLAGS_COMPILE = "-O3"; + NIX_CFLAGS_COMPILE = [ + "-O3" + # See: https://github.com/acpica/acpica/issues/387: + "-Wno-error=format-overflow" + ]; buildFlags = "iasl"; From 5c225ca10cd4c2a77ca86d6f549a5903e999f0f4 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Wed, 16 May 2018 23:36:32 +0200 Subject: [PATCH 14/18] dhcp: fix compilation on gcc8 (#40605) --- pkgs/tools/networking/dhcp/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix index 8b1ac864a434..41a83770fed4 100644 --- a/pkgs/tools/networking/dhcp/default.nix +++ b/pkgs/tools/networking/dhcp/default.nix @@ -33,7 +33,10 @@ stdenv.mkDerivation rec { "--localstatedir=/var" ] ++ stdenv.lib.optionals (openldap != null) [ "--with-ldap" "--with-ldapcrypto" ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=pointer-compare" ]; + NIX_CFLAGS_COMPILE = [ + "-Wno-error=pointer-compare" + "-Wno-error=format-truncation" + ]; installFlags = [ "DESTDIR=\${out}" ]; From 456369f7e6ea0206b659377363f9c3c1d71b191a Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Thu, 17 May 2018 23:02:09 +0200 Subject: [PATCH 15/18] hdf5: use gcc7 instead of gcc8 (#40704) --- pkgs/top-level/all-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f6ffe4423e9..f4c25def8751 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2884,6 +2884,7 @@ with pkgs; }; hdf5 = callPackage ../tools/misc/hdf5 { + stdenv = gcc7Stdenv; gfortran = null; szip = null; mpi = null; From b12448c001fd6f34099685662cb919752c84ab1f Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Fri, 18 May 2018 17:05:04 +0200 Subject: [PATCH 16/18] elfutils: add patch that fixes compilation under gcc8 (#40705) * elfutils: add patch that fixes compilation under gcc8 * elfutils: follow advice from @jtojnar --- pkgs/development/tools/misc/elfutils/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix index e89aba67999e..d8738bf62f9d 100644 --- a/pkgs/development/tools/misc/elfutils/default.nix +++ b/pkgs/development/tools/misc/elfutils/default.nix @@ -10,7 +10,16 @@ stdenv.mkDerivation rec { sha256 = "0rp0r54z44is49c594qy7hr211nhb00aa5y7z74vsybbaxslg10z"; }; - patches = ./debug-info-from-env.patch; + patches = [ + ./debug-info-from-env.patch + + /* For gcc8. Fixes -Werror=packed-not-aligned errors. + incorporated in upstream, so can probably be removed at next update */ + (fetchurl { + url = http://git.openembedded.org/openembedded-core/plain/meta/recipes-devtools/elfutils/files/0001-Ensure-that-packed-structs-follow-the-gcc-memory-lay.patch?id=49aae1d75ff1c6a9643c30a8cc5776a2ffa83dd3; + sha256 = "11sg2dn3vjvgq2fb9n8pgw1ajvs3gliks7djg1794wxlfg0rvifb"; + }) + ]; hardeningDisable = [ "format" ]; From a581c10acab775776b66285dee70ab8e9eddc9af Mon Sep 17 00:00:00 2001 From: Uli Baum Date: Sat, 19 May 2018 23:07:08 +0200 Subject: [PATCH 17/18] Revert "iasl: 20180313 -> 20180508" Broke xen and virtualbox. This reverts commit d2f213216001232aa979f48b15a71999850635e0. --- pkgs/development/compilers/iasl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/iasl/default.nix b/pkgs/development/compilers/iasl/default.nix index a514672016f6..535b1a33d13e 100644 --- a/pkgs/development/compilers/iasl/default.nix +++ b/pkgs/development/compilers/iasl/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "iasl-${version}"; - version = "20180508"; + version = "20180313"; src = fetchurl { url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz"; - sha256 = "1n7lqmv77kg28drahvxzybwl9v4hzwi8i7xkpgliclfcp5ff909b"; + sha256 = "05ab2xfv9wqwbzjaa9xqgrvvan87rxv29hw48h1gcckpc5smp2wm"; }; NIX_CFLAGS_COMPILE = [ From 8a999d15ebfb929a5f5fc5b08be6a23848f29710 Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Tue, 5 Jun 2018 20:06:09 +0200 Subject: [PATCH 18/18] iasl: integrate upstream patch for acpica/acpica#387 (#41481) --- pkgs/development/compilers/iasl/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/iasl/default.nix b/pkgs/development/compilers/iasl/default.nix index 535b1a33d13e..b923f7f65192 100644 --- a/pkgs/development/compilers/iasl/default.nix +++ b/pkgs/development/compilers/iasl/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, bison, flex}: +{stdenv, fetchurl, fetchpatch, bison, flex}: stdenv.mkDerivation rec { name = "iasl-${version}"; @@ -11,14 +11,18 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = [ "-O3" - # See: https://github.com/acpica/acpica/issues/387: - "-Wno-error=format-overflow" ]; buildFlags = "iasl"; buildInputs = [ bison flex ]; + patches = fetchpatch { + /* https://github.com/acpica/acpica/pull/389 */ + url = "https://github.com/acpica/acpica/commit/935ca65f7806a3ef9bd02a947e50f3a1f586ac67.patch"; + sha256 = "0jz4bakifphm425shbd1j99hldgy71m7scl8mwibm441d56l3ydf"; + }; + installPhase = '' install -d $out/bin