Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 927994 - dev-libs/glib rebuilt before dev-util/sysprof-capture; causing LTO problems
Summary: dev-libs/glib rebuilt before dev-util/sysprof-capture; causing LTO problems
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 926120
Blocks: lto
  Show dependency tree
 
Reported: 2024-03-27 22:52 UTC by Jay Faulkner
Modified: 2025-06-17 19:04 UTC (History)
4 users (show)

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


Attachments
glib-build-failure-log (glib-2.78.4-r1-buildlog2.txt,244.54 KB, text/plain)
2024-03-27 22:52 UTC, Jay Faulkner
Details
emerge -pev --debug (emerge_-pev_--debug_world.txt.bz2,96.11 KB, application/x-bzip2)
2024-03-27 22:53 UTC, Jay Faulkner
Details
emerge --info (emerge_--info.txt.bz2,3.99 KB, application/x-bzip2)
2024-03-27 22:53 UTC, Jay Faulkner
Details
emerge -pev @world (no debug) (emerge_-pev_world.txt.bz2,14 bytes, application/x-bzip2)
2024-03-27 22:54 UTC, Jay Faulkner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Faulkner gentoo-dev 2024-03-27 22:52:10 UTC
Created attachment 888855 [details]
glib-build-failure-log

While going through the 23.0 profile migration, I ran into the following issue. My system had LTO enabled, but during the `emerge -e @world` step of the profile migration, gcc threw an ICE -- AIUI this is related to USE=+zstd being added to gcc in this profile. Even after disabling LTO (the state of the system in the emerge --info attached), this continued.

The library with the .a file gcc was unable to read, dev-util/sysprof-capture, was not being built until *after* glib in the world build process. Rebuilding this library manually with a oneshot portage command appears to have resolved this issue.

Sam James indicated to me in IRC this could be worth troubleshooting as a portage dependency resolution error as dev-util/sysprof-capture should have been rebuilt before dev-libs/glib.

Build failure build log attached for context, along with emerge --info, emerge -epv @world and emerge -epv --debug @world (stderr and stdout both).
Comment 1 Jay Faulkner gentoo-dev 2024-03-27 22:53:17 UTC
Created attachment 888856 [details]
emerge -pev --debug
Comment 2 Jay Faulkner gentoo-dev 2024-03-27 22:53:37 UTC
Created attachment 888857 [details]
emerge --info
Comment 3 Jay Faulkner gentoo-dev 2024-03-27 22:54:34 UTC
Created attachment 888858 [details]
emerge -pev @world (no debug)
Comment 4 Larry the Git Cow gentoo-dev 2025-05-06 08:46:01 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(-)

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

commit 7abf9be713ffbe610cb77648fb162501764785fc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-05-02 00:13:11 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-05-06 08:45:07 +0000

    dev-libs/glib: 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/927994
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/glib/glib-2.78.6.ebuild    | 9 ++++++++-
 dev-libs/glib/glib-2.80.5-r1.ebuild | 9 ++++++++-
 dev-libs/glib/glib-2.82.5.ebuild    | 9 ++++++++-
 dev-libs/glib/glib-2.84.0.ebuild    | 9 ++++++++-
 dev-libs/glib/glib-2.84.1.ebuild    | 9 ++++++++-
 5 files changed, 40 insertions(+), 5 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2025-06-17 19:04:50 UTC
The bug has been referenced in the following commit(s):

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

commit b73a2fd4c41a392d9e08e911ae75a75e9e5d8f31
Author:     Eli Schwartz <eschwartz@gentoo.org>
AuthorDate: 2025-06-17 06:08:40 +0000
Commit:     Eli Schwartz <eschwartz@gentoo.org>
CommitDate: 2025-06-17 19:04:09 +0000

    dev-util/sysprof-capture: use dot-a.eclass
    
    ... to avoid installing broken static libraries w/ LTO.
    
    For old SLOTs, it's not enough to simply add in a new version.
    
    Closes: https://bugs.gentoo.org/958254
    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: Eli Schwartz <eschwartz@gentoo.org>

 dev-util/sysprof-capture/sysprof-capture-3.36.0-r2.ebuild | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)