/var/tmp/portage/x11-misc/slim-1.3.6-r5/work/slim-1.3.6/panel.cpp: In constructor ‘Panel::Panel(Display*, int, Window, Cfg*, const string&, Panel::PanelType)’: /var/tmp/portage/x11-misc/slim-1.3.6-r5/work/slim-1.3.6/panel.cpp:51:27: error: ordered comparison of pointer with integer zero (‘GC’ {aka ‘_XGC*’} and ‘int’) 51 | if (WinGC < 0) { | ~~~~~~^~~ /var/tmp/portage/x11-misc/slim-1.3.6-r5/work/slim-1.3.6/panel.cpp: In member function ‘bool Panel::OnKeyPress(XEvent&)’: /var/tmp/portage/x11-misc/slim-1.3.6-r5/work/slim-1.3.6/panel.cpp:549:31: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_no-multilib_hardened-20210427-181545 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-10.3.0 [2] x86_64-pc-linux-gnu-11.1.0 * clang version 12.0.0 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/12/bin /usr/lib/llvm/12 12.0.0 Python 3.8.9 Available Ruby profiles: [1] ruby26 (with Rubygems) [2] ruby30 (with Rubygems) * Available Rust versions: [1] rust-bin-1.51.0 * The following VMs are available for generation-2: *) AdoptOpenJDK 8.292_p10 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 system-vm timestamp(s) of HEAD at this tinderbox image: /var/db/repos/gentoo Wed Apr 28 15:20:17 UTC 2021 emerge -qpvO x11-misc/slim [ebuild N ] x11-misc/slim-1.3.6-r5 USE="pam -branding"
Created attachment 703335 [details] emerge-info.txt
Created attachment 703338 [details] emerge-history.txt
Created attachment 703341 [details] environment
Created attachment 703344 [details] etc.portage.tar.bz2
Created attachment 703347 [details] logs.tar.bz2
Created attachment 703350 [details] temp.tar.bz2
Created attachment 703353 [details] x11-misc:slim-1.3.6-r5:20210428-153705.log
Created attachment 705765 [details, diff] Patch to fix signed comparison with nullptr
Comment to the patch, since it might look wrong at a first glance: All documentation about the return value of XCreateGC I found states that it returns a proper pointer and in the error case sets some failure stat. In particular, I found no documentation that it returns a "negative" pointer. The cleanest patch would probably be to check the failure stat, but since I am not sure about it, the most reasonable analogous check to the original code is to check whether we get a null pointer returned. (Very likely, neither the original code nor the patch work properly in the error case, but at least the patch fixes the compilation issue and causes no regression in the non-error case.)
(In reply to Martin Väth from comment #9) > Comment to the patch, since it might look wrong at a first glance: > > All documentation about the return value of XCreateGC I found states that it > returns a proper pointer and in the error case sets some failure stat. In > particular, I found no documentation that it returns a "negative" pointer. > > The cleanest patch would probably be to check the failure stat, but since I > am not sure about it, the most reasonable analogous check to the original > code is to check whether we get a null pointer returned. (Very likely, > neither the original code nor the patch work properly in the error case, but > at least the patch fixes the compilation issue and causes no regression in > the non-error case.) Can confirm that the patch fixes building with gcc-11.1.0, thanks.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ab287d52bf8f597b107156a07e70a6348fecfbd commit 1ab287d52bf8f597b107156a07e70a6348fecfbd Author: Sam James <sam@gentoo.org> AuthorDate: 2021-07-25 23:10:55 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-07-25 23:23:34 +0000 x11-misc/slim: EAPI 7, cmake-utils--, fix build with GCC 11 Closes: https://bugs.gentoo.org/786498 Signed-off-by: Sam James <sam@gentoo.org> x11-misc/slim/files/slim-1.3.6-config.diff | 4 +-- x11-misc/slim/files/slim-1.3.6-freetype.patch | 4 +-- x11-misc/slim/files/slim-1.3.6-gcc11.patch | 12 +++++++ x11-misc/slim/files/slim-1.3.6-honour-cflags.patch | 4 +-- .../slim-1.3.6-strip-systemd-unit-install.patch | 4 +-- x11-misc/slim/slim-1.3.6-r5.ebuild | 31 +++++++++------- x11-misc/slim/slim-9999.ebuild | 42 +++++++++++----------- 7 files changed, 59 insertions(+), 42 deletions(-)