-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wlcs,mir_2_15: Fix GCC 14 compat #368425
wlcs,mir_2_15: Fix GCC 14 compat #368425
Conversation
pkgs/by-name/wl/wlcs/package.nix
Outdated
@@ -38,6 +48,9 @@ stdenv.mkDerivation (finalAttrs: { | |||
wayland-scanner # needed by cmake | |||
]; | |||
|
|||
# Whatever default optimisation level is in use here (can reproduce with -O3) breaks std::function usage in some tests | |||
env.NIX_CFLAGS_COMPILE = "-O2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like -Werror
is enabled.
env.NIX_CFLAGS_COMPILE = "-O2"; | |
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=maybe-uninitialized"; |
I was able to get it to compile with out disabling the warning but it is weird.
5x.diff
diff --git a/tests/xdg_popup.cpp b/tests/xdg_popup.cpp
index 99c2a0b..41ee16d 100644
--- a/tests/xdg_popup.cpp
+++ b/tests/xdg_popup.cpp
@@ -734,6 +734,10 @@ INSTANTIATE_TEST_SUITE_P(
Default,
XdgPopupPositionerTest,
testing::Values(
+ PositionerTestParams{"default values", (window_width - popup_width) / 2, (window_height - popup_height) / 2, PositionerParams()},
+ PositionerTestParams{"default values", (window_width - popup_width) / 2, (window_height - popup_height) / 2, PositionerParams()},
+ PositionerTestParams{"default values", (window_width - popup_width) / 2, (window_height - popup_height) / 2, PositionerParams()},
+ PositionerTestParams{"default values", (window_width - popup_width) / 2, (window_height - popup_height) / 2, PositionerParams()},
PositionerTestParams{"default values", (window_width - popup_width) / 2, (window_height - popup_height) / 2, PositionerParams()}
));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be this upstream issue? The explained situation there seems to be around LTO, but the error points at the same line…
Considering that the "fix" there was to just disable LTO in the Debian build code, and there are references to this being a compiler/linker issue, let's go with disabling the warning for now until upstream (whichever one that may be here) sorts that out.
5c4171d
to
0e5a17a
Compare
@ofborg build mir mir.passthru.tests mir_2_15 mir_2_15.passthru.tests |
wlcs:
-O2
to fix issue withstd::function
in testsI do not pretend to even comprehend what's going on there, so I'll just attach the full error and state that enforcing
-O0
--O2
makes the issue go away, and forcing-O3
makes it re-appear. Maybe a regression in GCC?Welcome to C++ hell
mir_2_15:
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.