diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index f5572c077f31..129ca72251fc 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -373,6 +373,9 @@ stdenv.mkDerivation ({ stdenv.lib.platforms.freebsd ++ stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; + + # See #40038 + broken = stdenv.isDarwin; }; } diff --git a/pkgs/development/compilers/iasl/default.nix b/pkgs/development/compilers/iasl/default.nix index b1b31aecae13..ab9fd23f5088 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 { pname = "iasl"; @@ -9,12 +9,20 @@ stdenv.mkDerivation rec { sha256 = "1vgqlv9pvxc52faxixpgz7hi1awqmj88bw5vqn3bldf6fmkh147w"; }; - NIX_CFLAGS_COMPILE = "-O3"; + NIX_CFLAGS_COMPILE = [ + "-O3" + ]; 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 diff --git a/pkgs/development/compilers/nasm/default.nix b/pkgs/development/compilers/nasm/default.nix index 8d92bc4eba2f..f5645ae02192 100644 --- a/pkgs/development/compilers/nasm/default.nix +++ b/pkgs/development/compilers/nasm/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation rec { make golden && make test ''; + NIX_CFLAGS_COMPILE="-Wno-error=attributes"; + meta = with stdenv.lib; { homepage = https://www.nasm.us/; description = "An 80x86 and x86-64 assembler designed for portability and modularity"; diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix index 2b64d5b7220a..b976c9c36b83 100644 --- a/pkgs/development/libraries/libglvnd/default.nix +++ b/pkgs/development/libraries/libglvnd/default.nix @@ -25,6 +25,8 @@ 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=\"${addOpenGLRunpath.driverLink}/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\"" + + "-Wno-error=array-bounds" ] ++ lib.optional stdenv.cc.isClang "-Wno-error"; # Indirectly: https://bugs.freedesktop.org/show_bug.cgi?id=35268 diff --git a/pkgs/development/libraries/libomxil-bellagio/default.nix b/pkgs/development/libraries/libomxil-bellagio/default.nix index 7c14d8102fbe..4d45c6872e4c 100644 --- a/pkgs/development/libraries/libomxil-bellagio/default.nix +++ b/pkgs/development/libraries/libomxil-bellagio/default.nix @@ -16,6 +16,10 @@ stdenv.mkDerivation rec { doCheck = false; # fails + # 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"; diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix index 7a3579f0635d..99e751043beb 100644 --- a/pkgs/development/tools/misc/elfutils/default.nix +++ b/pkgs/development/tools/misc/elfutils/default.nix @@ -10,12 +10,21 @@ stdenv.mkDerivation rec { sha256 = "08qhrl4g6qqr4ga46jhh78y56a47p3msa5b2x1qhzbxhf71lfmzb"; }; - patches = [ ./debug-info-from-env.patch ]; - postPatch = '' patchShebangs tests ''; + 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" ]; # We need bzip2 in NativeInputs because otherwise we can't unpack the src, diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 4117df8cf13c..48f915214188 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -15,9 +15,13 @@ , withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms, kexectools }: -stdenv.mkDerivation { - version = "242"; +let + pythonLxmlEnv = buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]); + +in stdenv.mkDerivation rec { pname = "systemd"; + # To whoever updates this to 239: check the todo on line 173. + version = "242"; # When updating, use https://github.com/systemd/systemd-stable tree, not the development one! # Also fresh patches should be cherry-picked from that tree to our current one. diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix index 24e23e6e0d33..bcf0743b7b9e 100644 --- a/pkgs/tools/networking/dhcp/default.nix +++ b/pkgs/tools/networking/dhcp/default.nix @@ -39,7 +39,10 @@ stdenv.mkDerivation rec { (lib.optional stdenv.isLinux "--with-randomdev=/dev/random") ] ++ 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}" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4ac7927bf8a5..7d25977bd14c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3772,6 +3772,7 @@ in }; hdf5 = callPackage ../tools/misc/hdf5 { + stdenv = gcc7Stdenv; gfortran = null; szip = null; mpi = null; @@ -7519,7 +7520,8 @@ in gerbil-unstable = callPackage ../development/compilers/gerbil/unstable.nix { stdenv = gccStdenv; }; gccFun = callPackage ../development/compilers/gcc/7; - gcc = gcc7; + # Temporary solution until #40038 is fixed + gcc = if stdenv.isDarwin then gcc7 else gcc8; gcc-unwrapped = gcc.cc; gccStdenv = if stdenv.cc.isGNU then stdenv else stdenv.override { @@ -8171,7 +8173,9 @@ in buildLlvmTools = buildPackages.llvmPackages_6.tools; targetLlvmLibraries = targetPackages.llvmPackages_6.libraries; } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { - stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' + # with gcc-7 on i686: undefined reference to `__divmoddi4' + # Failing tests with gcc8. + stdenv = overrideCC stdenv (if stdenv.hostPlatform.isi686 then gcc6 else gcc7); }); llvmPackages_7 = callPackage ../development/compilers/llvm/7 ({