Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937539 - gnome-extra/gnome-system-monitor-46 does not compile on clang due to invalid c++11-narrowing [PATCH]
Summary: gnome-extra/gnome-system-monitor-46 does not compile on clang due to invalid ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2024-08-08 00:22 UTC by David Carlos Manuelda
Modified: 2025-01-15 17:34 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emergeinfo.txt,21.38 KB, text/plain)
2024-08-08 00:23 UTC, David Carlos Manuelda
Details
Full build log (build.log,545.53 KB, text/x-log)
2024-08-08 00:23 UTC, David Carlos Manuelda
Details
Patch fixing compile (0001-Fix-for-invalid-c-11-narrowing-to-make-clang-compile.patch,839 bytes, patch)
2024-08-08 00:28 UTC, David Carlos Manuelda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2024-08-08 00:22:46 UTC
When trying to compile gnome-system-monitor-46.0-r1 I found that it does not compile in al LLVM profile with clang with the error (full log attached below):

../gnome-system-monitor-46.0/src/proctable.cpp:106:25: error: type 'gdouble' (aka 'double') cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing]
../gnome-system-monitor-46.0/src/proctable.cpp:106:28: error: type 'gdouble' (aka 'double') cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing]

I'm attaching below a little patch which fixes the compile issue
Comment 1 David Carlos Manuelda 2024-08-08 00:23:25 UTC
Created attachment 899485 [details]
emerge --info
Comment 2 David Carlos Manuelda 2024-08-08 00:23:52 UTC
Created attachment 899486 [details]
Full build log
Comment 3 David Carlos Manuelda 2024-08-08 00:28:25 UTC
Created attachment 899487 [details, diff]
Patch fixing compile

This only promotes explicitelly gdouble to gint for calling the constructor and avoiding the narrowing error
Comment 4 Pacho Ramos gentoo-dev 2024-08-09 09:15:38 UTC
Thanks for the patch

Was this send to upstream?
Comment 5 David Carlos Manuelda 2024-08-09 09:29:59 UTC
(In reply to Pacho Ramos from comment #4)
> Thanks for the patch
> 
> Was this send to upstream?

No, I just focused on having it working on my system
Comment 6 Pacho Ramos gentoo-dev 2024-08-09 10:14:23 UTC
It would be nice if you could send it to:
https://gitlab.gnome.org/GNOME/gnome-system-monitor/-/issues

Otherwise we will need to carry the patch forever

Thanks
Comment 8 Larry the Git Cow gentoo-dev 2025-01-15 17:34:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e828d1ed696ea6474dfe584df3aa45060bc99c32

commit e828d1ed696ea6474dfe584df3aa45060bc99c32
Author:     Guillermo Joandet <gjoandet@gmail.com>
AuthorDate: 2024-08-06 01:51:13 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2025-01-15 17:29:48 +0000

    gnome-extra/gnome-system-monitor: Bump to 47.0
    
    Bug: https://bugs.gentoo.org/937631
    Closes: https://bugs.gentoo.org/937539
    Signed-off-by: Guillermo Joandet <gjoandet@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/38647
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 gnome-extra/gnome-system-monitor/Manifest          |  1 +
 .../gnome-system-monitor-47.0.ebuild               | 55 ++++++++++++++++++++++
 2 files changed, 56 insertions(+)