Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914565 - dev-util/mingw64-toolchain-11.0.0_p2 fails to build with clang-17.0.1: attempt to use a poisoned identifier
Summary: dev-util/mingw64-toolchain-11.0.0_p2 fails to build with clang-17.0.1: attemp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ionen Wolkens
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-libcxx
  Show dependency tree
 
Reported: 2023-09-23 10:01 UTC by ppw0
Modified: 2024-01-22 17:20 UTC (History)
3 users (show)

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


Attachments
build log (dev-util:mingw64-toolchain-11.0.0_p2:20230923-093455.log.gz,208.76 KB, application/gzip)
2023-09-23 10:01 UTC, ppw0
Details
emerge --info (emerge_info.log,6.22 KB, text/x-log)
2023-09-23 10:01 UTC, ppw0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ppw0 2023-09-23 10:01:00 UTC
Created attachment 871155 [details]
build log

In a clang[default-libcxx] environment, the following error is thrown when trying to emerge dev-util/mingw64-toolchain:

---
In file included from /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/libcc1plugin.cc:72:
In file included from /usr/include/c++/v1/vector:321:
In file included from /usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /usr/include/c++/v1/__format/formatter_integral.h:32:
/usr/include/c++/v1/locale:289:36: error: attempt to use a poisoned identifier
  289 |         __status = (unsigned char*)malloc(__nkw);
      |                                    ^
/usr/include/c++/v1/locale:1584:28: error: attempt to use a poisoned identifier
 1584 |         __ob = (char_type*)malloc(2*static_cast<size_t>(__nc)*sizeof(char_type));
      |                            ^
/usr/include/c++/v1/locale:2822:27: error: attempt to use a poisoned identifier
 2822 |     _Tp* __t = (_Tp*)std::realloc(__owns ? __b.get() : 0, __new_cap);
      |                           ^
/usr/include/c++/v1/locale:3066:30: error: attempt to use a poisoned identifier
 3066 |             __h.reset((char*)malloc(static_cast<size_t>(__wn - __wb.get() + 2)));
      |                              ^
/usr/include/c++/v1/locale:3364:32: error: attempt to use a poisoned identifier
 3364 |         __hd.reset((char_type*)malloc(static_cast<size_t>(__n) * sizeof(char_type)));
      |                                ^
/usr/include/c++/v1/locale:3392:32: error: attempt to use a poisoned identifier
 3392 |         __hw.reset((char_type*)malloc(__exn * sizeof(char_type)));
      |                                ^
/usr/include/c++/v1/locale:3434:31: error: attempt to use a poisoned identifier
 3434 |         __h.reset((char_type*)malloc(__exn * sizeof(char_type)));
      |                               ^
1 warning and 7 errors generated.
make[3]: *** [Makefile:608: libcc1plugin.lo] Error 1
make[3]: Leaving directory '/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc_stage1-build/libcc1'
make[3]: *** Waiting for unfinished jobs....
make[3]: Entering directory '/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc_stage1-build/libcc1'
/bin/sh ./libtool  --tag=CXX   --mode=compile clang++ -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1  -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../include -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../libgcc -I ../gcc -I/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../gcc -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../gcc/cp  -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../gcc/c-family -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../libcpp/include  -W -Wall  -fvisibility=hidden   -O2 -march=native -pipe -MT libcp1plugin.lo -MD -MP -MF .deps/libcp1plugin.Tpo -c -o libcp1plugin.lo /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/libcp1plugin.cc
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1 -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../include -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../libgcc -I ../gcc -I/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../gcc -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../gcc/cp -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../gcc/c-family -I /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../libcpp/include -W -Wall -fvisibility=hidden -O2 -march=native -pipe -MT libcp1plugin.lo -MD -MP -MF .deps/libcp1plugin.Tpo -c /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/libcp1plugin.cc  -fPIC -DPIC -o .libs/libcp1plugin.o
In file included from /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/libcp1plugin.cc:54:
In file included from /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../gcc/cp/cp-tree.h:42:
In file included from /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../gcc/c-family/c-common.h:24:
/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../libcpp/include/cpplib.h:1543:1: warning: 'cpp_char_column_policy' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
 1543 | struct cpp_char_column_policy
      | ^
/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/../gcc/input.h:67:1: note: did you mean struct here?
   67 | class cpp_char_column_policy;
      | ^~~~~
      | struct
In file included from /var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc/libcc1/libcp1plugin.cc:74:
In file included from /usr/include/c++/v1/vector:321:
In file included from /usr/include/c++/v1/__format/formatter_bool.h:20:
In file included from /usr/include/c++/v1/__format/formatter_integral.h:32:
/usr/include/c++/v1/locale:289:36: error: attempt to use a poisoned identifier
  289 |         __status = (unsigned char*)malloc(__nkw);
      |                                    ^
/usr/include/c++/v1/locale:1584:28: error: attempt to use a poisoned identifier
 1584 |         __ob = (char_type*)malloc(2*static_cast<size_t>(__nc)*sizeof(char_type));
      |                            ^
/usr/include/c++/v1/locale:2822:27: error: attempt to use a poisoned identifier
 2822 |     _Tp* __t = (_Tp*)std::realloc(__owns ? __b.get() : 0, __new_cap);
      |                           ^
/usr/include/c++/v1/locale:3066:30: error: attempt to use a poisoned identifier
 3066 |             __h.reset((char*)malloc(static_cast<size_t>(__wn - __wb.get() + 2)));
      |                              ^
/usr/include/c++/v1/locale:3364:32: error: attempt to use a poisoned identifier
 3364 |         __hd.reset((char_type*)malloc(static_cast<size_t>(__n) * sizeof(char_type)));
      |                                ^
/usr/include/c++/v1/locale:3392:32: error: attempt to use a poisoned identifier
 3392 |         __hw.reset((char_type*)malloc(__exn * sizeof(char_type)));
      |                                ^
/usr/include/c++/v1/locale:3434:31: error: attempt to use a poisoned identifier
 3434 |         __h.reset((char_type*)malloc(__exn * sizeof(char_type)));
      |                               ^
1 warning and 7 errors generated.
make[3]: *** [Makefile:608: libcp1plugin.lo] Error 1
make[3]: Leaving directory '/var/tmp/portage/dev-util/mingw64-toolchain-11.0.0_p2/work/gcc_stage1-build/libcc1'
make[2]: *** [Makefile:443: all] Error 2
make[1]: *** [Makefile:11426: all-libcc1] Error 2
make[1]: *** Waiting for unfinished jobs....
---

Attaching log.
Comment 1 ppw0 2023-09-23 10:01:45 UTC
Created attachment 871156 [details]
emerge --info
Comment 2 Ionen Wolkens gentoo-dev 2023-09-23 13:26:26 UTC
Haven't tried yet but I assume this is related to https://github.com/gentoo/gentoo/pull/32249 and bug #912035 (albeit error is different, so maybe there's more to it), was waiting to see what sys-devel/gcc itself would do and had kinda forgot about it -- albeit now that 17 is released should probably do something either way.

Need to check if sys-devel/gcc builds fine (now), it's possible the snapshots are not affected then could just bump a _p3 to use a newer one. Otherwise try if the PR still works with released 17.0.1.

May take a little bit but will look at this hopefully soon'ish.
Comment 3 Ionen Wolkens gentoo-dev 2023-09-23 13:30:40 UTC
(In reply to Ionen Wolkens from comment #2)
> Need to check if sys-devel/gcc builds fine (now), it's possible the
> snapshots are not affected then could just bump a _p3 to use a newer one.
> Otherwise try if the PR still works with released 17.0.1.
Then again, given the PR is just header changes it'd need little testing -- so may favor that for now if it works.
Comment 4 Larry the Git Cow gentoo-dev 2023-09-23 18:30:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91de32d5f3f633f479687f16573716ca177cb13b

commit 91de32d5f3f633f479687f16573716ca177cb13b
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2023-09-23 17:39:32 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-09-23 18:30:02 +0000

    dev-util/mingw64-toolchain: fix build with libcxx-17
    
    Meant to delay this until it'd be fixed in sys-devel/gcc, but issue
    unfortunately went under the radar. Tried a snapshot (13-20230916)
    but still seems broken the same way, and assume sys-devel/gcc likely
    still has issues too (not tested).
    
    For now no harm in just picking/rebasing PR#32249 which is sufficient
    for what is used here (tested on llvm-musl w/ default-libcxx-17).
    
    Technically patch could warrant a revbump like the PR did (and in
    ~arch), but feels too basic to be worth the extra churn and a long
    rebuild.
    
    Closes: https://bugs.gentoo.org/914565
    Closes: https://github.com/gentoo/gentoo/pull/32249
    Co-Authored-By: Violet Purcell <vimproved@inventati.org>
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 .../files/gcc-13.2.0-libcxx-17.patch               | 63 ++++++++++++++++++++++
 .../mingw64-toolchain-11.0.0_p2.ebuild             |  1 +
 2 files changed, 64 insertions(+)
Comment 5 tt_1 2023-09-24 05:58:05 UTC
hi, is there a gcc bug about this somewhere?
Comment 6 Ionen Wolkens gentoo-dev 2023-09-24 06:09:57 UTC
(In reply to tt_1 from comment #5)
> hi, is there a gcc bug about this somewhere?
If you mean for here it's in the see also, bug #912035 (or at least that it fails with libcxx-17, errors may vary).
Comment 7 tt_1 2023-09-24 06:17:06 UTC
the only bug linked there is from freebsd?
Comment 8 Ionen Wolkens gentoo-dev 2023-09-24 06:19:32 UTC
(In reply to tt_1 from comment #7)
> the only bug linked there is from freebsd?
It was only looked at a bit yesterday, not sure if it's been reported anywhere upstream. I don't really handle gcc more than necessary in mingw64-toolchain bugs and just keep up with whatever sys-devel/gcc does.