Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926264 - dev-embedded/raspberrypi-utils-0_p20240203 fails to compile with LTO
Summary: dev-embedded/raspberrypi-utils-0_p20240203 fails to compile with LTO
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal major
Assignee: James Le Cuirot
URL:
Whiteboard:
Keywords: InVCS
Depends on: 941547
Blocks: lto
  Show dependency tree
 
Reported: 2024-03-06 12:52 UTC by Jakub Bidžan
Modified: 2024-10-19 21:45 UTC (History)
4 users (show)

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


Attachments
emerge --info and build log of raspberrypi-utils (bug-report.txt,47.25 KB, text/plain)
2024-03-06 12:52 UTC, Jakub Bidžan
Details
proposed fix (lto-fix.patch,752 bytes, patch)
2024-03-31 01:38 UTC, Andrii Batyiev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Bidžan 2024-03-06 12:52:57 UTC
Created attachment 886805 [details]
emerge --info and build log of raspberrypi-utils

This package fails to compile on a raspberry pi 5 (Cortex-A76 CPU). Attaching complete build-log and emerge --info
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-06 12:54:21 UTC
Please try without LTO.
Comment 2 Jakub Bidžan 2024-03-06 13:03:51 UTC
I did try with only -O2 and -pipe and got same reult(In reply to Sam James from comment #1)
> Please try without LTO.

tried with only -O2 and -pipe and got the same result
Comment 3 James Le Cuirot gentoo-dev 2024-03-09 15:36:19 UTC
(In reply to Jakub Bidžan from comment #2)
> tried with only -O2 and -pipe and got the same result

Really? I only get this when I use -flto.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-09 17:19:36 UTC
(In reply to Jakub Bidžan from comment #2)
> I did try with only -O2 and -pipe and got same reult(In reply to Sam James
> from comment #1)
> > Please try without LTO.
> 
> tried with only -O2 and -pipe and got the same result

In general, you should give the log for the most simple build failure.
Comment 5 James Le Cuirot gentoo-dev 2024-03-09 21:33:04 UTC
I've had a look, but I don't know how to deal with this one. Seems like an odd case. Maybe someone with more LTO experience will have a better idea.
Comment 6 Andrii Batyiev 2024-03-31 01:38:56 UTC
Created attachment 889082 [details, diff]
proposed fix

I've made a fix and created an issue in upstream tracker: https://github.com/raspberrypi/utils/issues/75
The problem is that LTO aggressively removes sections from object files.
Comment 7 Eli Schwartz gentoo-dev 2024-09-09 20:35:28 UTC
The suggested fix was merge in April, but the snapshot we package is from February.

Chewi, is it possible to update the snapshot and check whether the update fixes the problem?

(I would check myself but all I have is amd64 hardware.)
Comment 8 Larry the Git Cow gentoo-dev 2024-09-09 21:14:16 UTC
The bug has been referenced in the following commit(s):

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

commit 70f8c529e4a0639786ebcaec3dc15a6a18e94eb0
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2024-09-09 21:09:41 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2024-09-09 21:14:06 +0000

    dev-embedded/raspberrypi-utils: Bump snapshot to 20240903
    
    Fixes LTO issue.
    
    Bug: https://bugs.gentoo.org/926264
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 dev-embedded/raspberrypi-utils/Manifest            |  1 +
 .../raspberrypi-utils-0_p20240903.ebuild           | 47 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)
Comment 9 James Le Cuirot gentoo-dev 2024-09-09 21:15:00 UTC
Yep, looks good, thanks.

P.S. You can actually build this on amd64. ;)
Comment 10 Eli Schwartz gentoo-dev 2024-10-14 04:46:42 UTC
Are we good to close this? (Were you waiting to stabilize the new version, or... ?)
Comment 11 Larry the Git Cow gentoo-dev 2024-10-19 21:45:08 UTC
The bug has been closed via the following commit(s):

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

commit 643f24ce7de9d74b391b66f469b15dbdbf11b515
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2024-10-19 21:44:25 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2024-10-19 21:44:25 +0000

    dev-embedded/raspberrypi-utils: Drop old 0_p20240203
    
    Closes: https://bugs.gentoo.org/926264
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 dev-embedded/raspberrypi-utils/Manifest            |  1 -
 .../raspberrypi-utils-0_p20240203.ebuild           | 48 ----------------------
 2 files changed, 49 deletions(-)