too long lines were shrinked: /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./prev-gcc/xg++ -B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./prev-gcc/ -B/usr/x86_64-gentoo-linux-musl/bin/ -nostdinc++ -B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/prev-x86_64-gentoo-linux-musl/libstdc++-v3 /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./prev-gcc/xg++ -B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/./prev-gcc/ -B/usr/x86_64-gentoo-linux-musl/bin/ -nostdinc++ -B/var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/build/prev-x86_64-gentoo-linux-musl/libstdc++-v3 In file included from /usr/include/pthread.h:30, from /var/tmp/portage/sys-devel/gcc-11.2.1_p20211127/work/gcc-11-20211127/gcc/jit/libgccjit.c:27: /usr/include/sched.h:84:7: error: attempt to use poisoned "calloc" 84 | void *calloc(size_t, size_t); | ^ /usr/include/sched.h:124:36: error: attempt to use poisoned "calloc" 124 | #define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n))) ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0_musl-j4-20211208-192535 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-gentoo-linux-musl-11.2.0 * Python 3.9.9 php cli: HEAD of ::gentoo commit 592dbbb9b953d4b08cb4eac4e5b8fb5e15f3eac9 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Wed Dec 8 18:21:43 2021 +0000 2021-12-08 18:21:42 UTC emerge -qpvO sys-devel/gcc [ebuild U ] sys-devel/gcc-11.2.1_p20211127 [11.2.0] USE="(cxx) fortran jit* nptl openmp pch (pie) ssp (-ada) (-cet) -custom-cflags -d -debug -doc (-fixed-point) -go -graphite (-hardened) (-libssp) -lto (-multilib) (-nls) -objc -objc++ -objc-gc -pgo (-sanitize) -systemtap -test (-valgrind) -vanilla (-vtv) -zstd"
Created attachment 757760 [details] emerge-info.txt
Created attachment 757761 [details] emerge-history.txt
Created attachment 757762 [details] environment
Created attachment 757763 [details] etc.portage.tar.bz2
Created attachment 757764 [details] logs.tar.bz2
Created attachment 757765 [details] sys-devel:gcc-11.2.1_p20211127:20211208-184218.log.bz2
Created attachment 757766 [details] temp.tar.bz2
Alpine have https://git.alpinelinux.org/aports/tree/main/gcc/0039-Fix-attempt-to-use-poisoned-calloc-error-in-libgccji.patch which seems likely to fix this. Can you try it, toralf?
(In reply to Sam James from comment #8) > Alpine have > https://git.alpinelinux.org/aports/tree/main/gcc/0039-Fix-attempt-to-use- > poisoned-calloc-error-in-libgccji.patch which seems likely to fix this. > > Can you try it, toralf? yep - solved with that patch.
Can throw the patch in for musl but would like to know why it doesn't happen on glibc first.
I don't think we should wait on this given it's musl-only and only with USE=jit and this version fixes a bunch of regressions on current stable.
This was discussed in #musl recently and musl is open to a change (somehow avoiding dragging in malloc and string functions in sched.h). Apparently breaks openldap too?
(In reply to Sam James from comment #12) > Apparently breaks openldap too? No, AFAICT.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c90828f2e23881d4c4de20006740b0872461431 commit 6c90828f2e23881d4c4de20006740b0872461431 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-04-25 00:58:57 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-04-25 01:00:07 +0000 sys-devel/gcc: add musl patch for USE=jit to 12 Bug: https://bugs.gentoo.org/828580 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 2 +- sys-devel/gcc/gcc-12.0.0_pre9999.ebuild | 2 +- sys-devel/gcc/gcc-12.0.1_pre20220424.ebuild | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3882af68d598fb126b3f40c7ef4f0ba3cd8eff9f commit 3882af68d598fb126b3f40c7ef4f0ba3cd8eff9f Author: Sam James <sam@gentoo.org> AuthorDate: 2022-04-25 01:11:08 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-04-25 01:11:23 +0000 sys-devel/gcc: update musl calloc patch for 12 Bug: https://bugs.gentoo.org/828580 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 2 +- sys-devel/gcc/gcc-12.0.0_pre9999.ebuild | 2 +- sys-devel/gcc/gcc-12.0.1_pre20220424.ebuild | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e1b2fe74f2926ecc663804531227937a90315a80 commit e1b2fe74f2926ecc663804531227937a90315a80 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-04-25 01:10:06 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-04-25 01:12:06 +0000 12.0.0: update calloc patch (again) Bug: https://bugs.gentoo.org/828580 Signed-off-by: Sam James <sam@gentoo.org> 12.0.0/musl/50_all_calloc_libgccjit.patch | 12 ++++++------ 12.0.0/musl/README.history | 8 ++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e5cf99cfba2cb9de2d80a2823220b256445d033d commit e5cf99cfba2cb9de2d80a2823220b256445d033d Author: Sam James <sam@gentoo.org> AuthorDate: 2022-04-25 00:51:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-04-25 01:12:06 +0000 12.0.0: add musl calloc patch Bug: https://bugs.gentoo.org/828580 Signed-off-by: Sam James <sam@gentoo.org> 12.0.0/musl/50_all_calloc_libgccjit.patch | 68 +++++++++++++++++++++++++++++++ 12.0.0/musl/README.history | 14 +++++++ 2 files changed, 82 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2d1d12d07647cd5ce511c60d8446a9cec41ec86 commit c2d1d12d07647cd5ce511c60d8446a9cec41ec86 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-04-25 02:36:53 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-04-25 02:36:53 +0000 sys-devel/gcc: update calloc patch (again again) Bug: https://bugs.gentoo.org/828580 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/Manifest | 2 +- sys-devel/gcc/gcc-12.0.0_pre9999.ebuild | 2 +- sys-devel/gcc/gcc-12.0.1_pre20220424.ebuild | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e0567416b1eb9ca23636be56d9b017e671881269 commit e0567416b1eb9ca23636be56d9b017e671881269 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-04-25 02:35:02 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-04-25 02:35:02 +0000 12.0.0: update calloc patch (again again) Bug: https://bugs.gentoo.org/828580 Signed-off-by: Sam James <sam@gentoo.org> 12.0.0/musl/50_all_calloc_libgccjit.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=db34375a2a99b865f51349eba2c8c0293f12b953 commit db34375a2a99b865f51349eba2c8c0293f12b953 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-08-11 08:59:45 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-08-11 09:00:41 +0000 11.4.0: add 50_all_calloc_libgccjit I could've sworn we added this for 11.x too, but apparently I never did for 12.x. Bug: https://bugs.gentoo.org/828580 Bug: https://bugs.gentoo.org/851555 Signed-off-by: Sam James <sam@gentoo.org> 11.4.0/musl/50_all_calloc_libgccjit.patch | 72 +++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+)