Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 829602

Summary: sys-devel/clang-13.0.0 - .../tools/extra/clangd/CompletionModel.cpp {standard input}: Assembler messages: {standard input}:177127: Error: operand out of range
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: LLVM support project <llvm>
Status: IN_PROGRESS ---    
Severity: normal CC: arfrever.fta, orodruinlair, sam, toolchain
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: PPC   
OS: Linux   
See Also: https://reviews.llvm.org/D136283
https://bugs.gentoo.org/show_bug.cgi?id=885795
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log.xz
emerge --info
build.log.xz (ppc, clang-13.0.1)
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.36.1)
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
CompletionModel.cpp.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
CompletionModel.s.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
emerge --info
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-10.4 + binutils-2.39)
CompletionModel.s.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
CompletionModel.ii.tar.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39), part 1
CompletionModel.ii.tar.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39), part 2
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-10.4 + binutils-2.39)
build.log.xz (ppc, clang-14.0.6-r1 + ppc32 patch, built with gcc-10.4 + binutils-2.39)
build.log.xz (ppc, clang-15.0.1 + clang-15.0.1-libclangBasic_linking.patch + clang-15.0.1-CompletionModel.patch)
clang-15.0.2-CompletionModel.patch
clang-15.0.2-CompletionModel.patch
build.log.xz (ppc, clang-15.0.3 + clang-15.0.2-libclangBasic_linking.patch + clang-15.0.2-CompletionModel.patch)
clang-15.0.2-CompletionModel.patch

Description ernsteiswuerfel archtester 2021-12-19 10:24:36 UTC
Created attachment 759645 [details]
build.log.xz

[...]
[330/1676] /usr/bin/powerpc-gentoo-linux-musl-g++ -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/clang
-13.0.0/work/x/y/clang-.ppc/tools/extra/clangd -I/var/tmp/portage/sys-devel/clang-13.0.0/work/clang-tools-extra/clangd -I/var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/tools/extra/clangd/../clang-ti
dy -I/var/tmp/portage/sys-devel/clang-13.0.0/work/clang/include -I/var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/include -I/include -I/usr/lib/llvm/13/include  -DNDEBUG -O2 -mcpu=7450 -mtune=7450 -p
ipe -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-cla
ss-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-section
s -fno-common -Woverloaded-virtual -fno-strict-aliasing -pedantic -Wno-long-long -std=c++14 -Wno-unused -MD -MT tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o -MF tools/extra/clangd/CMak
eFiles/obj.clangDaemon.dir/CompletionModel.cpp.o.d -o tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o -c /var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/tools/extra/clangd/Com
pletionModel.cpp
FAILED: tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o 
/usr/bin/powerpc-gentoo-linux-musl-g++ -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/sys-devel/clang-13.0.0/wor
k/x/y/clang-.ppc/tools/extra/clangd -I/var/tmp/portage/sys-devel/clang-13.0.0/work/clang-tools-extra/clangd -I/var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/tools/extra/clangd/../clang-tidy -I/var/t
mp/portage/sys-devel/clang-13.0.0/work/clang/include -I/var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/include -I/include -I/usr/lib/llvm/13/include  -DNDEBUG -O2 -mcpu=7450 -mtune=7450 -pipe -fPIC -
fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memacces
s -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-comm
on -Woverloaded-virtual -fno-strict-aliasing -pedantic -Wno-long-long -std=c++14 -Wno-unused -MD -MT tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o -MF tools/extra/clangd/CMakeFiles/obj.
clangDaemon.dir/CompletionModel.cpp.o.d -o tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/CompletionModel.cpp.o -c /var/tmp/portage/sys-devel/clang-13.0.0/work/x/y/clang-.ppc/tools/extra/clangd/CompletionMode
l.cpp
{standard input}: Assembler messages:
{standard input}:177127: Error: operand out of range (0x0000000000008164 is not between 0xffffffffffff8000 and 0x0000000000007fff)
{standard input}:177163: Error: operand out of range (0x000000000000816c is not between 0xffffffffffff8000 and 0x0000000000007fff)
0xffffffffffff8000 and 0x0000000000007fff)
[...]
{standard input}:416785: Error: operand out of range (0x000000000001d6f4 is not between 0xffffffffffff8000 and 0x0000000000007fff)
{standard input}:416841: Error: operand out of range (0x000000000001130c is not between 0xffffffffffff8000 and 0x0000000000007fff)
ninja: build stopped: subcommand failed.
 * ERROR: sys-devel/clang-13.0.0::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 distribution failed
Comment 1 ernsteiswuerfel archtester 2021-12-19 10:25:15 UTC
Created attachment 759646 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2022-03-20 23:39:54 UTC
A build on glibc ppc revealed that this is not a musl specific issue.
Comment 3 ernsteiswuerfel archtester 2022-03-20 23:40:35 UTC
Created attachment 767479 [details]
build.log.xz (ppc, clang-13.0.1)
Comment 4 ernsteiswuerfel archtester 2022-08-10 21:49:03 UTC
Created attachment 799191 [details]
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.36.1)
Comment 5 ernsteiswuerfel archtester 2022-08-10 22:27:02 UTC
Created attachment 799199 [details]
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
Comment 6 ernsteiswuerfel archtester 2022-08-10 22:29:02 UTC
Created attachment 799201 [details]
CompletionModel.cpp.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
Comment 7 ernsteiswuerfel archtester 2022-08-10 22:44:57 UTC
Created attachment 799205 [details]
CompletionModel.s.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
Comment 8 ernsteiswuerfel archtester 2022-08-10 22:46:49 UTC
Created attachment 799207 [details]
emerge --info
Comment 9 ernsteiswuerfel archtester 2022-08-10 23:13:09 UTC
Created attachment 799209 [details]
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-10.4 + binutils-2.39)
Comment 10 ernsteiswuerfel archtester 2022-08-10 23:58:23 UTC
Created attachment 799213 [details]
CompletionModel.s.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39)
Comment 11 ernsteiswuerfel archtester 2022-08-11 00:24:12 UTC
Created attachment 799219 [details]
CompletionModel.ii.tar.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39), part 1
Comment 12 ernsteiswuerfel archtester 2022-08-11 00:25:00 UTC
Created attachment 799221 [details]
CompletionModel.ii.tar.xz (ppc, clang-14.0.6-r1, built with gcc-12.1 + binutils-2.39), part 2
Comment 13 ernsteiswuerfel archtester 2022-08-11 11:59:43 UTC
Created attachment 799299 [details]
build.log.xz (ppc, clang-14.0.6-r1, built with gcc-10.4 + binutils-2.39)
Comment 14 ernsteiswuerfel archtester 2022-08-12 17:32:40 UTC
Created attachment 799441 [details]
build.log.xz (ppc, clang-14.0.6-r1 + ppc32 patch, built with gcc-10.4 + binutils-2.39)
Comment 15 Larry the Git Cow gentoo-dev 2022-09-10 03:58:36 UTC
The bug has been referenced in the following commit(s):

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

commit 3e8c12159bc7298cf4bb4057bfd197f98713da28
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-10 03:55:13 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-10 03:56:54 +0000

    sys-devel/gcc: keyword 11.3.1_p20220909
    
    Notably contains fixes for PPC which may cause crashes
    at runtime.
    
    Had come across this bug and a few others when poking
    at Clang build failure on PPC (bug 829602), although it doesn't
    seem to have fixed that (tagging bug anyway as it's
    possibly related in some form).
    
    I've been tempted to keyword a newer 11 stable snapshot
    for a while but didn't feel comfortable doing so until
    bug 834845 was resolved (info page/docs issue).
    
    Bug: https://bugs.gentoo.org/829602
    Bug: https://bugs.gentoo.org/834845
    Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104090
    See: https://github.com/buildroot/buildroot/commit/b42c6b24755170a8eb015b3ea0b25e6d91e037cb
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/gcc-11.3.1_p20220909.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Comment 16 ernsteiswuerfel archtester 2022-10-04 18:15:38 UTC
Created attachment 820285 [details]
build.log.xz (ppc, clang-15.0.1 + clang-15.0.1-libclangBasic_linking.patch + clang-15.0.1-CompletionModel.patch)

Successful (!) clang-15.0.1 build.log with 1st patch from bug #874024 and  Arfrever's clang-15.0.1-CompletionModel.patch.

Toolchain used was gcc-11.3.1, glibc-2.35-r8, binutils-2.39-r2.
Comment 17 Arfrever Frehtes Taifersar Arahesis 2022-10-05 01:39:20 UTC
Created attachment 820369 [details, diff]
clang-15.0.2-CompletionModel.patch
Comment 18 Arfrever Frehtes Taifersar Arahesis 2022-10-09 17:33:56 UTC
Created attachment 822952 [details, diff]
clang-15.0.2-CompletionModel.patch
Comment 19 ernsteiswuerfel archtester 2022-10-20 10:42:20 UTC
Created attachment 824847 [details]
build.log.xz (ppc, clang-15.0.3 + clang-15.0.2-libclangBasic_linking.patch + clang-15.0.2-CompletionModel.patch)
Comment 20 Arfrever Frehtes Taifersar Arahesis 2022-10-20 15:53:28 UTC
Created attachment 824859 [details, diff]
clang-15.0.2-CompletionModel.patch

(Setting variable in outer scope using PARENT_SCOPE, as suggested in https://reviews.llvm.org/D136283.)
Comment 21 Larry the Git Cow gentoo-dev 2022-11-19 07:05:07 UTC
The bug has been referenced in the following commit(s):

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

commit 023d53443fa50b70b8a4d5550885d8610ce0cb4f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-19 07:04:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-19 07:05:02 +0000

    profiles/arch/powerpc/ppc32: mask sys-devel/clang[extra]
    
    There's a pending upstream PR for this but there's some
    debate about the complexity and whether we should choose
    a simpler solution or just not bother supporting
    building clangd at all on ppc.
    
    In any case, let's mask USE=extra for now as we know
    it doesn't work.
    
    Bug: https://bugs.gentoo.org/829602
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/arch/powerpc/ppc32/package.use.mask | 4 ++++
 1 file changed, 4 insertions(+)