Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkgs/applications/audio/aether-lv2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ stdenv.mkDerivation rec {
lv2 libX11 libGL libGLU mesa
];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
"-Wno-error=stringop-overflow"
];

installPhase = ''
mkdir -p $out/lib/lv2
cp -r aether.lv2 $out/lib/lv2
Expand Down
6 changes: 6 additions & 0 deletions pkgs/applications/audio/furnace/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ stdenv.mkDerivation rec {
"-DWARNINGS_ARE_ERRORS=ON"
];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=mismatched-new-delete"
"-Wno-error=use-after-free"
];

postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
# Normal CMake install phase on Darwin only installs the binary, the user is expected to use CPack to build a
# bundle. That adds alot of overhead for not much benefit (CPack is currently abit broken, and needs impure access
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/audio/mimic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ stdenv.mkDerivation rec {
pcre2
] ++ lib.optional pulseaudioSupport libpulseaudio;

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=free-nonheap-object"
];

postInstall = ''
wrapProgram $out/bin/mimic \
--run "export ALSA_PLUGIN_DIR=${alsa-plugins}/lib/alsa-lib"
Expand Down
4 changes: 4 additions & 0 deletions pkgs/applications/emulators/mame/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ stdenv.mkDerivation rec {
--subst-var-by mamePath "$out/opt/mame"
'';

NIX_CFLAGS_COMPILE = [
"-Wno-error=use-after-free"
];

desktopItems = [
(makeDesktopItem {
name = "MAME";
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/graphics/foxotron/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ stdenv.mkDerivation rec {
++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXrandr libXinerama libXcursor libXi libXext alsa-lib fontconfig libGLU ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
];

installPhase = ''
runHook preInstall

Expand Down
6 changes: 6 additions & 0 deletions pkgs/applications/graphics/goxel/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ scons pkg-config wrapGAppsHook ];
buildInputs = [ glfw3 gtk3 libpng12 ];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=format-truncation"
];

NIX_LDFLAGS = "-lpthread";

buildPhase = ''
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub
{ lib, stdenv, fetchFromGitHub, fetchpatch
, pkg-config, cmake, ninja, yasm
, libjpeg, openssl_1_1, libopus, ffmpeg, alsa-lib, libpulseaudio, protobuf
, openh264, usrsctp, libevent, libvpx
Expand Down Expand Up @@ -31,6 +31,14 @@ stdenv.mkDerivation {
mesa libepoxy libglvnd
];

patches = [
# GCC 12 Fix
(fetchpatch {
url = "https://github.com/desktop-app/tg_owt/pull/101/commits/86d2bcd7afb8706663d29e30f65863de5a626142.patch";
hash = "sha256-iWS0mB8R0vqPU/0qf6Ax54UCAKYDVCPac2mi/VHbFm0=";
})
];

cmakeFlags = [
# Building as a shared library isn't officially supported and may break at any time.
"-DBUILD_SHARED_LIBS=OFF"
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/science/biology/octopus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY=";
}) ];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=deprecated-declarations"
];

postInstall = ''
mkdir $out/bin
mv $out/octopus $out/bin
Expand Down
10 changes: 7 additions & 3 deletions pkgs/applications/science/logic/cbmc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ stdenv.mkDerivation rec {
--prefix PATH : "$out/share/cbmc" \
'';

# fix "argument unused during compilation"
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
"-Wno-unused-command-line-argument";
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=maybe-uninitialized"
] ++ lib.optionals stdenv.cc.isClang [
# fix "argument unused during compilation"
"-Wno-unused-command-line-argument"
];

# TODO: add jbmc support
cmakeFlags = [ "-DWITH_JBMC=OFF" "-Dsat_impl=cadical" "-Dcadical_INCLUDE_DIR=${cadical.dev}/include" ];
Expand Down
6 changes: 6 additions & 0 deletions pkgs/applications/science/math/mxnet/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ stdenv.mkDerivation rec {
] else [ "-DUSE_CUDA=OFF" ])
++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=maybe-uninitialized"
"-Wno-error=uninitialized"
];

postPatch = ''
substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \
--replace "/bin/bash" "${bash}/bin/bash"
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/version-management/fnc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ stdenv.mkDerivation rec {

makeFlags = [ "PREFIX=$(out)" ];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=maybe-uninitialized"
];

preInstall = ''
mkdir -p $out/bin
'';
Expand Down
6 changes: 6 additions & 0 deletions pkgs/development/compilers/mit-scheme/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ stdenv.mkDerivation {
runHook postConfigure
'';

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-parameter"
"-Wno-error=use-after-free"
];

buildPhase = ''
runHook preBuild
cd src
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/compilers/urweb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ stdenv.mkDerivation rec {
-L${sqlite.out}/lib";
'';

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=use-after-free"
];

# Be sure to keep the statically linked libraries
dontDisableStatic = true;

Expand Down
4 changes: 4 additions & 0 deletions pkgs/development/interpreters/gnu-apl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ stdenv.mkDerivation rec {
"-Wno-error=maybe-uninitialized"
# Needed with GCC 11
"-Wno-error=misleading-indentation"
# Needed with GCC 12
"-Wno-error=nonnull"
"-Wno-error=stringop-overflow"
"-Wno-error=use-after-free"
]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference");

patchPhase = lib.optionalString stdenv.isDarwin ''
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/assimp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ stdenv.mkDerivation rec {

cmakeFlags = [ "-DASSIMP_BUILD_ASSIMP_TOOLS=ON" ];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
];

meta = with lib; {
description = "A library to import various 3D model formats";
homepage = "https://www.assimp.org/";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/belle-sip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
"-Wno-error=deprecated-declarations"
"-Wno-error=format-truncation"
"-Wno-error=stringop-overflow"
# Needed with GCC 12
"-Wno-error=use-after-free"
];

propagatedBuildInputs = [ libantlr3c mbedtls_2 bctoolbox belr ];
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/boringssl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ buildGoModule {
export GOARCH=$(go env GOHOSTARCH)
'';

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=stringop-overflow"
];

buildPhase = ''
ninjaBuildPhase
'';
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/bzrtp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ stdenv.mkDerivation rec {
# Do not build static libraries
cmakeFlags = [ "-DENABLE_STATIC=NO" "-DCMAKE_C_FLAGS=-Wno-error=cast-function-type" ];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=stringop-overflow"
];

meta = with lib; {
description = "An opensource implementation of ZRTP keys exchange protocol. Part of the Linphone project.";
homepage = "https://gitlab.linphone.org/BC/public/bzrtp";
Expand Down
13 changes: 8 additions & 5 deletions pkgs/development/libraries/clucene-core/2.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ stdenv.mkDerivation rec {
"-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE__TRYRUN_OUTPUT="
];

patches = # From debian
[ ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
./Install-contribs-lib.patch
] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ];
patches = [
# From debian
./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
./Install-contribs-lib.patch
# From arch
./fix-missing-include-time.patch
] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ];

# fails with "Unable to find executable:
# /build/clucene-core-2.3.3.4/build/bin/cl_test"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From c1c2000c35ff39b09cb70fbdf66a107d3b17a674 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 12 Oct 2022 08:40:49 +0200
Subject: [PATCH] Fix missing #include <time.h>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

At least on recent Fedora 37 beta, building now failed with

> CLucene/document/DateTools.cpp:26:19: error: ‘gmtime’ was not declared in this scope
> 26 | tm *ptm = gmtime(&secs);
> | ^~~~~~

etc.

As it turns out, after 22f9d40320e3deeaa8d6aaa7a770077c20a21dae "git-svn-id:
https://clucene.svn.sourceforge.net/svnroot/clucene/branches/lucene2_3_2@2672
20ef185c-fe11-0410-a618-ba9304b01011" on 2008-06-26 had commented out
_CL_TIME_WITH_SYS_TIME in clucene-config.h.cmake as "not actually used for
anything", then cceccfb52917b5f4da447f1cf20c135952d41442 "Presenting DateTools
and deprecating DateField. DateTools still requires some testing and its own
unit testing" on 2008-06-29 had introduced this use of it (into then
src/CLucene/document/DateTools.H). And apparently most build environments have
silently been happy ever since when the dead leading check for
_CL_TIME_WITH_SYS_TIME didn't include both <sys/time.h> and <time.h>, but the
following check for _CL_HAVE_SYS_TIME_H only included <sys/time.h> but not
<time.h>.
---
src/shared/CLucene/clucene-config.h.cmake | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/shared/CLucene/clucene-config.h.cmake b/src/shared/CLucene/clucene-config.h.cmake
index bd8683a5..6fe0f92b 100644
--- a/src/shared/CLucene/clucene-config.h.cmake
+++ b/src/shared/CLucene/clucene-config.h.cmake
@@ -100,8 +100,7 @@ ${SYMBOL__T}
//#cmakedefine _CL_STAT_MACROS_BROKEN

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-//not actually used for anything...
-//#cmakedefine _CL_TIME_WITH_SYS_TIME 1
+#cmakedefine _CL_TIME_WITH_SYS_TIME 1

/* Define that we will be using -fvisibility=hidden, and
* make public classes visible using __attribute__ ((visibility("default")))
--
2.37.3

2 changes: 2 additions & 0 deletions pkgs/development/libraries/cpp-ipfs-http-client/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ stdenv.mkDerivation {

NIX_CFLAGS_COMPILE = [
"-Wno-error=range-loop-construct"
# Needed with GCC 12
"-Wno-error=deprecated-declarations"
];

meta = with lib; {
Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/libraries/gsmlib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
stdenv.mkDerivation rec {
pname = "gsmlib";
version = "unstable-2017-10-06";

src = fetchFromGitHub {
owner = "x-logLT";
repo = "gsmlib";
rev = "4f794b14450132f81673f7d3570c5a859aecf7ae";
sha256 = "16v8aj914ac1ipf14a867ljib3gy7fhzd9ypxnsg9l0zi8mm3ml5";
};

nativeBuildInputs = [ autoreconfHook ];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-std=c++14"
];

meta = with lib; {
description = "Library to access GSM mobile phones through GSM modems";
homepage = "https://github.com/x-logLT/gsmlib";
Expand Down
6 changes: 6 additions & 0 deletions pkgs/development/libraries/iqueue/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libbsd microsoft_gsl ];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-parameter"
"-Wno-error=misleading-indentation"
];

meta = with lib; {
homepage = "https://github.com/twosigma/iqueue";
description = "Indexed queue";
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/libbladeRF/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ in stdenv.mkDerivation rec {
"-DBLADERF_GROUP=bladerf"
];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
];

hardeningDisable = [ "fortify" ];

meta = with lib; {
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/libcli/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ stdenv.mkDerivation rec {

makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "AR=${stdenv.cc.targetPrefix}ar" "PREFIX=$(out)" ];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=address"
];

meta = with lib; {
description = "Emulate a Cisco-style telnet command-line interface";
homepage = "http://sites.dparrish.com/libcli";
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/libraries/libdynd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ stdenv.mkDerivation rec {
"-DDYND_BUILD_BENCHMARKS=OFF"
];

# added to fix build with gcc7+
NIX_CFLAGS_COMPILE = builtins.toString [
# added to fix build with gcc7+
"-Wno-error=implicit-fallthrough"
"-Wno-error=nonnull"
"-Wno-error=tautological-compare"
"-Wno-error=class-memaccess"
"-Wno-error=parentheses"
"-Wno-error=deprecated-copy"
# Needed with GCC 12
"-Wno-error=deprecated-declarations"
"-Wno-error=maybe-uninitialized"
];

nativeBuildInputs = [ cmake ];
Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/libxkbcommon/libxkbcommon_7.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ stdenv.mkDerivation rec {
"--with-x-locale-root=${libX11.out}/share/X11/locale"
];

NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
];

preBuild = lib.optionalString stdenv.isDarwin ''
sed -i 's/,--version-script=.*$//' Makefile
'';
Expand Down
Loading