treewide: add -Wno-error= due to compilation error with gcc_14

This commit is contained in:
Fabián Heredia Montiel
2024-09-11 01:44:17 -06:00
parent e9cdb22741
commit a4145a81d1
35 changed files with 173 additions and 10 deletions
+4 -1
View File
@@ -26,6 +26,10 @@ let
# required for cross compilation
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
installPhase = ''
runHook preInstall
install -D Bin/mbrola $out/bin/mbrola
@@ -49,4 +53,3 @@ in
ln -s '${mbrola-voices}/data' "$out/share/mbrola/voices"
ln -s '${bin}/bin' "$out/"
''
+5 -1
View File
@@ -158,7 +158,11 @@ in stdenv.mkDerivation (finalAttrs: {
doCheck = true;
env = {
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DGDK_OSX_BIG_SUR=16";
NIX_CFLAGS_COMPILE = toString (
[ ]
++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=incompatible-pointer-types" ]
++ lib.optionals stdenv.isDarwin [ "-DGDK_OSX_BIG_SUR=16" ]
);
# Check if librsvg was built with --disable-pixbuf-loader.
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${librsvg}/${gdk-pixbuf.moduleDir}";
@@ -46,6 +46,10 @@ stdenv.mkDerivation rec {
nuke-refs cfg_defs.h
'';
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
meta = with lib; {
description = "Text-mode web browser";
homepage = "https://lynx.invisible-island.net/";
@@ -162,6 +162,7 @@ stdenv.mkDerivation (finalAttrs: {
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-error=sign-compare" # https://github.com/obsproject/obs-studio/issues/10200
"-Wno-error=stringop-overflow="
];
dontWrapGApps = true;
@@ -58,6 +58,10 @@ stdenv.mkDerivation rec {
# Do not run meson-postinstall.sh
preConfigure = "sed -i '2,$ d' meson-postinstall.sh";
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
passthru = {
updateScript = gnome.updateScript {
packageName = "gnome-font-viewer";
+4
View File
@@ -59,6 +59,10 @@ stdenv.mkDerivation (finalAttrs: {
libwebp
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
outputs = [
"out"
"dev"
+8
View File
@@ -81,6 +81,14 @@ stdenv.mkDerivation rec {
patchShebangs build-aux/gpg_check_version.py
'';
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-function-declaration"
"-Wno-error=int-conversion"
"-Wno-error=return-mismatch"
];
};
preCheck = ''
# Add org.gnome.crypto.pgp GSettings schema to path
# to make it available for gpgme-backend test.
+2
View File
@@ -212,6 +212,8 @@ stdenv.mkDerivation (finalAttrs: {
# set the path to the compiler
BUILDCC = "${pkgsBuildBuild.stdenv.cc}/bin/gcc";
PKG_CONFIG_WAYLAND_SCANNER_WAYLAND_SCANNER = "wayland-scanner";
} // lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
} // lib.optionalAttrs (!stdenv.hostPlatform.isAarch) {
LIVE555_PREFIX = live555;
};
@@ -13,6 +13,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper asciidoc autoreconfHook ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion";
};
doCheck = true;
postInstall = ''
@@ -14,6 +14,10 @@ stdenv.mkDerivation (finalAttrs: {
hash= "sha256-T4feegblOeG+NU+c+PAobf8HT8KDSfcINkRAa1hNpkY=";
};
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
patches = [
./readlink.patch
];
@@ -29,6 +29,10 @@ stdenv.mkDerivation rec {
configureFlags = [ "--without-x" "--with-ncurses=${ncurses.dev}" ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
postInstall = ''
mkdir -p $dev/bin
mv $bin/bin/aalib-config $dev/bin/aalib-config
@@ -74,6 +74,14 @@ stdenv.mkDerivation rec {
libxcrypt
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=deprecated-declarations"
"-Wno-error=implicit-function-declaration"
"-Wno-error=return-mismatch"
];
};
mesonFlags = [
"-Dadmin_group=wheel"
"-Dlocalstatedir=/var"
@@ -13,6 +13,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
meta = with lib; {
homepage = "http://www.jedrea.com/chmlib";
license = licenses.lgpl2;
@@ -47,6 +47,10 @@ stdenv.mkDerivation rec {
"CFLAGS=-DTIME_WITH_SYS_TIME"
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
installFlags = lib.optionals stdenv.isDarwin [ "framedir=$(out)/Library/Frameworks/SASL2.framework" ];
passthru.tests = {
@@ -823,6 +823,13 @@ stdenv.mkDerivation (finalAttrs: {
buildFlags = [ "all" ]
++ optional buildQtFaststart "tools/qt-faststart"; # Build qt-faststart executable
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=incompatible-pointer-types"
"-Wno-error=int-conversion"
];
};
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
# Fails with SIGABRT otherwise FIXME: Why?
+7
View File
@@ -116,6 +116,13 @@ stdenv.mkDerivation (finalAttrs: {
"ac_cv_path_GDK_PIXBUF_CSOURCE=${buildPackages.gdk-pixbuf.dev}/bin/gdk-pixbuf-csource"
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-int"
"-Wno-error=incompatible-pointer-types"
];
};
enableParallelBuilding = true;
installFlags = [
@@ -35,6 +35,10 @@ stdenv.mkDerivation (finalAttrs: {
patches = [ ./3.x-nix_share_path.patch ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
enableParallelBuilding = true;
doCheck = stdenv.isLinux;
@@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
patches = [ ./cve-2013-4276.patch ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
outputs = [ "bin" "dev" "out" "man" ];
doCheck = false; # fails with "Error in Linear interpolation (2p): Must be i=8000, But is n=8001"
@@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
"ac_cv_func_realloc_0_nonnull=yes"
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
doCheck = false; # fails 3 of 5 tests with locale errors
meta = with lib; {
@@ -35,6 +35,10 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
doCheck = !stdenv.isDarwin;
meta = with lib; {
@@ -36,6 +36,8 @@ stdenv.mkDerivation (finalAttrs: {
env = {
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0";
PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0";
} // lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
passthru = {
@@ -47,6 +47,10 @@ stdenv.mkDerivation rec {
# These are mentioned in the Requires line of libgphoto's pkg-config file.
propagatedBuildInputs = [ libexif ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
hardeningDisable = [ "format" ];
postInstall =
@@ -67,6 +67,13 @@ stdenv.mkDerivation rec {
libimobiledevice
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-int"
"-Wno-error=incompatible-pointer-types"
];
};
meta = with lib; {
homepage = "https://sourceforge.net/projects/gtkpod/";
description = "Library used by gtkpod to access the contents of an ipod";
@@ -20,6 +20,10 @@ stdenv.mkDerivation rec {
sed -e s@/usr@@ -i Makefile
'';
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
meta = with lib; {
description = "Real-mode x86 code emulator";
maintainers = with maintainers; [ raskin ];
@@ -47,6 +47,10 @@ stdenv.mkDerivation rec {
"-DGEN_FILES=off"
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=calloc-transposed-args";
};
doCheck = true;
# Parallel checking causes test failures
+11 -8
View File
@@ -116,6 +116,17 @@ stdenv.mkDerivation rec {
env = {
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
PKG_CONFIG_SYSTEMD_SYSUSERS_DIR = "${placeholder "out"}/lib/sysusers.d";
# HACK: We want to install policy files files to $out/share but polkit
# should read them from /run/current-system/sw/share on a NixOS system.
# Similarly for config files in /etc.
# With autotools, it was possible to override Make variables
# at install time but Meson does not support this
# so we need to convince it to install all files to a temporary
# location using DESTDIR and then move it to proper one in postInstall.
DESTDIR = "dest";
} // lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
mesonFlags = [
@@ -131,14 +142,6 @@ stdenv.mkDerivation rec {
"-Dsession_tracking=${if useSystemd then "libsystemd-login" else "libelogind"}"
];
# HACK: We want to install policy files files to $out/share but polkit
# should read them from /run/current-system/sw/share on a NixOS system.
# Similarly for config files in /etc.
# With autotools, it was possible to override Make variables
# at install time but Meson does not support this
# so we need to convince it to install all files to a temporary
# location using DESTDIR and then move it to proper one in postInstall.
env.DESTDIR = "dest";
inherit doCheck;
@@ -52,6 +52,10 @@
buildFlags = if stdenv.isDarwin then [ "maodbc" ] else null;
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
installTargets = if stdenv.isDarwin then [ "install/fast" ] else null;
# see the top of the file for an explanation
@@ -35,6 +35,13 @@ stdenv.mkDerivation rec {
"pythondir=$(py)/${python3.sitePackages}"
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-function-declaration"
"-Wno-error=int-conversion"
];
};
doCheck = false; # fails 1 out of 1 tests, needs `certutil`
meta = with lib; {
@@ -1,4 +1,5 @@
{
stdenv,
lib,
buildPythonPackage,
fetchFromGitHub,
@@ -31,6 +32,10 @@ buildPythonPackage rec {
certifi
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
pythonImportsCheck = [ "curl_cffi" ];
meta = with lib; {
@@ -1,4 +1,5 @@
{
stdenv,
lib,
fetchPypi,
buildPythonPackage,
@@ -54,6 +55,10 @@ buildPythonPackage rec {
zope-interface
] ++ lib.optionals (!isPyPy) [ greenlet ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
# Bunch of failures.
doCheck = false;
+4
View File
@@ -39,6 +39,10 @@ in stdenv.mkDerivation rec {
gappsWrapperArgs+=(--prefix PATH : "${binpath}")
'';
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
meta = with lib; {
description = "Gnome CD/DVD Burner";
homepage = "https://gitlab.gnome.org/GNOME/brasero";
+5
View File
@@ -38,6 +38,11 @@ tcl.mkTclDerivation rec {
nativeBuildInputs = [ autoreconfHook makeWrapper ];
strictDeps = true;
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
hardeningDisable = [ "format" ];
postInstall = ''
+4
View File
@@ -22,6 +22,10 @@ stdenv.mkDerivation rec {
"--with-db-path=${placeholder "out"}/share/hddtemp/hddtemp.db"
];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
postInstall = ''
install -Dm444 ${db} $out/share/hddtemp/hddtemp.db
'';
+4
View File
@@ -27,6 +27,10 @@ stdenv.mkDerivation {
"SCRIPT_PATH=${vpnc-scripts}/bin/vpnc-script"
] ++ lib.optional opensslSupport "OPENSSL_GPL_VIOLATION=yes";
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
postPatch = ''
patchShebangs src/makeman.pl
'';
+13
View File
@@ -7305,10 +7305,16 @@ with self; {
DBI = buildPerlPackage {
pname = "DBI";
version = "1.644";
src = fetchurl {
url = "mirror://cpan/authors/id/H/HM/HMBRAND/DBI-1.644.tar.gz";
hash = "sha256-Ipe5neCeZwhmQLWQaZ4OmC+0adpjqT/ijcFHgtt6U8g=";
};
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
};
postInstall = lib.optionalString (perl ? crossVersion) ''
mkdir -p $out/${perl.libPrefix}/cross_perl/${perl.version}/DBI
cat > $out/${perl.libPrefix}/cross_perl/${perl.version}/DBI.pm <<EOF
@@ -7347,6 +7353,7 @@ with self; {
1;
EOF
'';
meta = {
description = "Database independent interface for Perl";
homepage = "https://dbi.perl.org";
@@ -27505,6 +27512,12 @@ with self; {
];
makeMakerFlags = [ "X11INC=${pkgs.xorg.libX11.dev}/include" "X11LIB=${pkgs.xorg.libX11.out}/lib" ];
buildInputs = [ pkgs.xorg.libX11 pkgs.libpng ];
env = lib.optionalAttrs stdenv.cc.isGNU {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-int"
"-Wno-error=incompatible-pointer-types"
];
};
doCheck = false; # Expects working X11.
meta = {
description = "Tk - a Graphical User Interface Toolkit";