From 0494da64db4dbc16b0594d7be6c544ef35af27fd Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Sun, 7 Dec 2025 23:43:50 +0300 Subject: [PATCH] gnu: i3lock-blur: Fix build. * gnu/packages/wm.scm (i3lock-blur): Fix build with gcc-14. [native-inputs]: Replace automake with automake-1.16.5. * gnu/packages/patches/i3lock-blur-fix-build-on-gcc-10.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I2115b05d22e57242a85f54b2ac1a195e3fb863d0 --- gnu/local.mk | 1 + .../i3lock-blur-fix-build-on-gcc-10.patch | 31 +++++++++++++++++++ gnu/packages/wm.scm | 10 ++++-- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/i3lock-blur-fix-build-on-gcc-10.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7a6d044d9a2eadac3b2629f2fade65b8e530d040..0d84b62cf2679e77181dde4915757d4ed9ca46fb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1593,6 +1593,7 @@ dist_patch_DATA = \ %D%/packages/patches/hurd-rumpdisk-no-hd.patch \ %D%/packages/patches/hurd-startup.patch \ %D%/packages/patches/hwloc-1-test-btrfs.patch \ + %D%/packages/patches/i3lock-blur-fix-build-on-gcc-10.patch \ %D%/packages/patches/i7z-gcc-10.patch \ %D%/packages/patches/icecat-adjust-mozilla-desktop.patch \ %D%/packages/patches/icecat-makeicecat.patch \ diff --git a/gnu/packages/patches/i3lock-blur-fix-build-on-gcc-10.patch b/gnu/packages/patches/i3lock-blur-fix-build-on-gcc-10.patch new file mode 100644 index 0000000000000000000000000000000000000000..198908b71416bb0276c83431290f5bd1e803f0d1 --- /dev/null +++ b/gnu/packages/patches/i3lock-blur-fix-build-on-gcc-10.patch @@ -0,0 +1,31 @@ +From ec8fe0e7f7d78bf445602ed517efd5c324bb32f7 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Sun, 15 May 2022 10:36:29 +0100 +Subject: [PATCH] fix build on gcc-10 (-fno-common) + +gcc-10 changed the default from -fcommon to fno-common: + https://gcc.gnu.org/PR85678 + +As a result build fails as: + + ld: i3lock-unlock_indicator.o:(.bss+0xc): multiple definition of + `input_position'; i3lock-i3lock.o:(.bss+0x3c): first defined here + +The change turned one of definitions into declaration. +--- + unlock_indicator.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/unlock_indicator.c b/unlock_indicator.c +index 9ef0b48..34e151b 100644 +--- a/unlock_indicator.c ++++ b/unlock_indicator.c +@@ -36,7 +36,7 @@ extern bool debug_mode; + + /* The current position in the input buffer. Useful to determine if any + * characters of the password have already been entered or not. */ +-int input_position; ++extern int input_position; + + /* The lock window. */ + extern xcb_window_t win; diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 4cb20440cea2d719c6ef76185ab1b31fa0c314a2..6e9d3ab0c50d6d184b7300cc86c99230c8df678d 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -83,6 +83,7 @@ ;;; Copyright © 2025 Ricardo Wurmus ;;; Copyright © 2025 Andrew Wong ;;; Copyright © 2025 Hugo Buddelmeijer +;;; Copyright © 2025 Artyom V. Poptsov ;;; ;;; This file is part of GNU Guix. ;;; @@ -719,10 +720,15 @@ Despite the name it should work with any X11 window manager.") (file-name (git-file-name name version)) (sha256 (base32 - "1bd5nrlga5g1sz1f64gnc3dqy8yfrr4q1ss59krymbpxa1hhf55c")))) + "1bd5nrlga5g1sz1f64gnc3dqy8yfrr4q1ss59krymbpxa1hhf55c")) + (patches + ;; Pull patch pending upstream inclusion for "-fno-common" + ;; toolchain support: + ;; + (search-patches "i3lock-blur-fix-build-on-gcc-10.patch")))) (build-system gnu-build-system) (native-inputs - (list pkg-config automake autoconf)) + (list pkg-config automake-1.16.5 autoconf)) (inputs (list cairo mesa