Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 889004 - x11-libs/gtk+-3.24.35 fails to compile (lto): /usr/include/sysprof-4/sysprof-capture-writer.h:169:23: error: type of 'sysprof_capture_writer_set_counters' does not match original declaration [-Werror=lto-type-mismatch]
Summary: x11-libs/gtk+-3.24.35 fails to compile (lto): /usr/include/sysprof-4/sysprof-...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-30 16:43 UTC by Kostadin Shishmanov
Modified: 2025-05-06 08:46 UTC (History)
3 users (show)

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


Attachments
emerge --info and build log (build.log,305.59 KB, text/x-log)
2022-12-30 16:43 UTC, Kostadin Shishmanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin Shishmanov 2022-12-30 16:43:35 UTC
Created attachment 845940 [details]
emerge --info and build log

x11-libs/gtk+-3.24.35 fails to compile with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror-strict-aliasing


/usr/include/sysprof-4/sysprof-capture-writer.h:169:23: error: type of 'sysprof_capture_writer_set_counters' does not match original declaration [-Werror=lto-type-mismatch]
  169 | bool                  sysprof_capture_writer_set_counters                    (SysprofCaptureWriter              *self,
      |                       ^
../../../../../dev-util/sysprof-capture-3.36.0-r1/work/sysprof-3.36.0-abi_x86_64.amd64/../sysprof-3.36.0/src/libsysprof-capture/sysprof-capture-writer.c:1218:1: note: return value type mismatch
../../../../../dev-util/sysprof-capture-3.36.0-r1/work/sysprof-3.36.0-abi_x86_64.amd64/../sysprof-3.36.0/src/libsysprof-capture/sysprof-capture-writer.c:1218:1: note: type 'gboolean' should match type '_Bool'
../../../../../dev-util/sysprof-capture-3.36.0-r1/work/sysprof-3.36.0-abi_x86_64.amd64/../sysprof-3.36.0/src/libsysprof-capture/sysprof-capture-writer.c:1218:1: note: 'sysprof_capture_writer_set_counters' was previously declared here
../../../../../dev-util/sysprof-capture-3.36.0-r1/work/sysprof-3.36.0-abi_x86_64.amd64/../sysprof-3.36.0/src/libsysprof-capture/sysprof-capture-writer.c:1218:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/usr/include/sysprof-4/sysprof-capture-writer.h:112:23: error: type of 'sysprof_capture_writer_add_mark' does not match original declaration [-Werror=lto-type-mismatch]
  112 | bool                  sysprof_capture_writer_add_mark                        (SysprofCaptureWriter              *self,
      |                       ^
../../../../../dev-util/sysprof-capture-3.36.0-r1/work/sysprof-3.36.0-abi_x86_64.amd64/../sysprof-3.36.0/src/libsysprof-capture/sysprof-capture-writer.c:608:1: note: return value type mismatch
../../../../../dev-util/sysprof-capture-3.36.0-r1/work/sysprof-3.36.0-abi_x86_64.amd64/../sysprof-3.36.0/src/libsysprof-capture/sysprof-capture-writer.c:608:1: note: type 'gboolean' should match type '_Bool'
../../../../../dev-util/sysprof-capture-3.36.0-r1/work/sysprof-3.36.0-abi_x86_64.amd64/../sysprof-3.36.0/src/libsysprof-capture/sysprof-capture-writer.c:608:1: note: 'sysprof_capture_writer_add_mark' was previously declared here
../../../../../dev-util/sysprof-capture-3.36.0-r1/work/sysprof-3.36.0-abi_x86_64.amd64/../sysprof-3.36.0/src/libsysprof-capture/sysprof-capture-writer.c:608:1: note: code may be misoptimized unless '-fno-strict-aliasing' is used
Comment 1 Mart Raudsepp gentoo-dev 2024-05-19 21:36:58 UTC
I don't quite understand how you are getting such an error when gtk+-3.24.35 only supported sysprof-capture-3 (not 4).
I'm making gtk+-3.24.42 explicitly use sysprof-capture-4, please retry with that.
Comment 2 Kostadin Shishmanov 2024-06-23 16:44:40 UTC
Haven't been able to reproduce the issue for some time, no idea what was causing it.
Comment 3 Larry the Git Cow gentoo-dev 2025-05-06 08:46:00 UTC
The bug has been referenced in the following commit(s):

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

commit 20777571e30b77ce3c58f91dd95fc66f3c3c2f18
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-05-02 00:18:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-05-06 08:45:08 +0000

    dev-util/sysprof-capture: use dot-a.eclass for LTO
    
    This means that USE=static-libs doesn't produce a "broken" library
    when built w/ LTO.
    
    Bug: https://bugs.gentoo.org/818097
    Bug: https://bugs.gentoo.org/889004
    Bug: https://bugs.gentoo.org/927994
    Bug: https://bugs.gentoo.org/939515
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/sysprof-capture/sysprof-capture-3.48.0.ebuild | 14 ++++++++++++--
 dev-util/sysprof-capture/sysprof-capture-46.0.ebuild   | 12 +++++++++++-
 dev-util/sysprof-capture/sysprof-capture-47.2.ebuild   | 12 +++++++++++-
 3 files changed, 34 insertions(+), 4 deletions(-)