Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 860444 - media-sound/audiotools-3.1.1-r1 fails to compile: ICE
Summary: media-sound/audiotools-3.1.1-r1 fails to compile: ICE
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: parallel-make
  Show dependency tree
 
Reported: 2022-07-24 07:53 UTC by Agostino Sarubbo
Modified: 2024-03-13 21:04 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,89.36 KB, text/plain)
2022-07-24 07:53 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-07-24 07:53:18 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: media-sound/audiotools-3.1.1-r1 fails to compile (lto).
Discovered on: amd64 (internal ref: lto_tinderbox)

NOTE:
This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Comment 1 Agostino Sarubbo gentoo-dev 2022-07-24 07:53:20 UTC
Created attachment 793754 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-07-24 07:53:22 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


lto1: internal compiler error: resolution sub id 0x2ed93dbdd28357dc not in object file
lto1: internal compiler error: resolution sub id 0x2ed93dbdd28357dc not in object file
Comment 3 Eli Schwartz 2024-03-13 18:59:01 UTC
This isn't really an LTO issue. It "probably" works fine but sometimes fails to compile due to race conditions, and LTO adds more jobs and can tilt the odds in favor of a race getting triggered.

The issue is that setuptools parallelism doesn't actually work. It doesn't have a real build graph, and it's a build system that was originally intended to only be useful for CPython itself, but due to broad availability it got taken up as the default build system for python.

The issue is that parallelism allows you to build multiple extensions in parallel by spawning each extension in a thread; each thread independently tries to build all the sources for that extension. It is equivalent to running `for i in target1 target2 target3; do make $i & done`.

Each job can scribble over each other if it wants to compile the same file -- and in particular, each job can open the file for writing, causing another job to think it's already been built, and make the other job attempt to perform linking on a half-written or entirely empty file.

audiotools triggers this because it has multiple extensions, and each extension independently builds the same common files.
Comment 4 Larry the Git Cow gentoo-dev 2024-03-13 21:04:34 UTC
The bug has been closed via the following commit(s):

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

commit 2c3538475e38700f080333f9bcc50748036b7055
Author:     Eli Schwartz <eschwartz93@gmail.com>
AuthorDate: 2024-03-13 19:05:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-13 21:04:07 +0000

    media-sound/audiotools: work around broken parallel building
    
    Because setuptools cannot handle two extensions that build the source
    code, and races.
    
    Closes: https://bugs.gentoo.org/860444
    Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 media-sound/audiotools/audiotools-3.1.1-r2.ebuild | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)