Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 708430 - sys-libs/compiler-rt-sanitizers-9.0.1 with sys-libs/glibc-2.31 - .../work/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:1131:1: error: 'assertion_failed__1131' declared as an array with a negative size
Summary: sys-libs/compiler-rt-sanitizers-9.0.1 with sys-libs/glibc-2.31 - .../work/com...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 5 votes (vote)
Assignee: LLVM support project
URL:
Whiteboard: fixed in 10
Keywords: PATCH
: 710800 720222 733378 (view as bug list)
Depends on:
Blocks: glibc-2.31
  Show dependency tree
 
Reported: 2020-02-05 23:58 UTC by Mike Lothian
Modified: 2020-09-12 10:12 UTC (History)
17 users (show)

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


Attachments
Build log (build.log.xz,4.54 KB, application/x-xz)
2020-02-05 23:58 UTC, Mike Lothian
Details
Patch for glibc-2.31 (glibc-2.31.patch,1.81 KB, patch)
2020-02-05 23:59 UTC, Mike Lothian
Details | Diff
Fixes the compilation issue with glibc 2.31 (fix-compile-with-glibc-2.31.patch,549 bytes, patch)
2020-03-11 19:49 UTC, Frits Letteboer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2020-02-05 23:58:06 UTC
This has been fixed upstream with:

https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce.patch

I've reworked the patch to apply on 9.0.1

Reproducible: Always
Comment 1 Mike Lothian 2020-02-05 23:58:40 UTC
Created attachment 612052 [details]
Build log
Comment 2 Mike Lothian 2020-02-05 23:59:25 UTC
Created attachment 612054 [details, diff]
Patch for glibc-2.31
Comment 3 Mike Lothian 2020-02-06 00:00:18 UTC
FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cc.o 
/usr/lib/llvm/9/bin/x86_64-pc-linux-gnu-clang++ -DHAVE_RPC_XDR_H=0 -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-9.0.1/work/compiler-rt/lib/sanitizer_common/..  -O3 -march=native -pipe -Wall -std=c++11 -Wno-unused-parameter    -m32 -fPIC -fno-builtin -fno-exceptions
 -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -MD -MT
 lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cc.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cc.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizer
CommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cc.o -c /var/tmp/portage/sys-libs/compiler-rt-sanitizers-9.0.1/work/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-9.0.1/work/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:1131:1: error: 'assertion_failed__1131' declared as an array with a negative size
CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-9.0.1/work/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h:1437:3: note: expanded from macro 'CHECK_SIZE_AND_OFFSET'
  COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-9.0.1/work/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:336:30: note: expanded from macro 'COMPILER_CHECK'
#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-libs/compiler-rt-sanitizers-9.0.1/work/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:342:57: note: expanded from macro 'IMPL_COMPILER_ASSERT'
    typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                        ^~~~~~~~~~~~~~~
1 error generated.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-02-23 18:06:20 UTC
Thanks, I'll backport it now.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-02-23 18:19:07 UTC
Actually, it doesn't apply cleanly and it seems that getting full set of patches is not worth the effort.  Just use 10.x if you need bleeding edge glibc.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-02-25 18:59:08 UTC
*** Bug 710800 has been marked as a duplicate of this bug. ***
Comment 7 Frits Letteboer 2020-03-11 19:49:35 UTC
Created attachment 618030 [details, diff]
Fixes the compilation issue with glibc 2.31

As a quick workaround

Taken from: http://www.linuxfromscratch.org/blfs/view/svn/general/llvm.html
Comment 8 Craig Andrews gentoo-dev 2020-05-01 02:34:06 UTC
(In reply to Frits Letteboer from comment #7)
> Created attachment 618030 [details, diff] [details, diff]
> Fixes the compilation issue with glibc 2.31
> 
> As a quick workaround
> 
> Taken from: http://www.linuxfromscratch.org/blfs/view/svn/general/llvm.html

I confirm that this patch solves the problem.
Comment 9 Sam James gentoo-dev Security 2020-05-01 03:36:35 UTC
*** Bug 720222 has been marked as a duplicate of this bug. ***
Comment 10 Pavel Volkov 2020-05-08 06:25:43 UTC
(In reply to Michał Górny from comment #5)
> Actually, it doesn't apply cleanly and it seems that getting full set of
> patches is not worth the effort.  Just use 10.x if you need bleeding edge
> glibc.

It's said that some packages are broken with LLVM 10, in other distros as well — bug 711788.
Comment 11 Victor Mataré 2020-05-13 22:26:21 UTC
app-doc/doxygen has RDEPEND="clang? ( <sys-devel/clang-10:= )", so we should either get rid of that or continue to support clang:9.
Comment 12 Bernd 2020-05-19 09:45:58 UTC
This issue also happens to compiler-rt-sanitizers:8.0.1
Comment 13 Arfrever Frehtes Taifersar Arahesis 2020-07-21 21:57:36 UTC
*** Bug 733378 has been marked as a duplicate of this bug. ***
Comment 14 Andrew 2020-07-27 14:21:02 UTC
I also confirm that the patch from  Frits Letteboer  solves the problem
Comment 15 Viktar Patotski 2020-07-31 14:53:37 UTC
I Confirm that patch from Frits Letteboer solves compilation problem and I'm able to build sys-libs/compiler-rt-sanitizers-9.0.1. However I believe disabling check is not the best way fixing it. We need to wait for upstream to fix it.
Comment 16 Herbert Wantesh 2020-09-12 10:12:11 UTC
the patch from Frits Letteboer fixes the compile for me too