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
Created attachment 793754 [details] build.log build log and emerge --info
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
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.
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(-)