Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914741 - cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826 - build error: ‘mutex’ does not name a type; did you mean ‘minutes’
Summary: cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826 - build error: ‘mutex’ does not...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-26 12:12 UTC by Fabio Rossi
Modified: 2023-11-29 16:38 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt.gz (emerge-info.txt.gz,8.11 KB, application/gzip)
2023-09-26 12:15 UTC, Fabio Rossi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2023-09-26 12:12:52 UTC
I get the folling error:

make[5]: Entering directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/src/c++20'
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=compile /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/./gcc/xgcc -shared-l
ibgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/./gcc -nostdinc++ -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826
/work/build/x86_64-w64-mingw32/libstdc++-v3/src -L/var/tmp/portage/cross-x86_64-
w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/src/.libs -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include    -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/../libgcc -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32 -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/include -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/libsupc++   -std=gnu++20 -prefer-pic -D_GLIBCXX_SHARED -fno-implicit-templates  -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2  -fdiagnostics-show-location=once   -ffunction-sections -fdata-sections  -frandom-seed=tzdb.lo  -fimplicit-templates -g -O2  -I. -c /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/src/c++20/tzdb.cc
libtool: compile:  /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/./gcc/xgcc -shared-libgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/./gcc -nostdinc++ -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/src -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/src/.libs -L/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/../libgcc -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32 -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/include -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/libsupc++ -std=gnu++20 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=tzdb.lo -fimplicit-templates -g -O2 -I. -c /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/src/c++20/tzdb.cc -o tzdb.o
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/src/c++20/tzdb.cc:640:9: error: ‘mutex’ does not name a type; did you mean ‘minutes’?
  640 |         mutex infos_mutex;
      |         ^~~~~
      |         minutes
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/src/c++20/tzdb.cc: In member function ‘void std::chrono::time_zone::_Impl::RulesCounter<_Tp>::lock()’:
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/src/c++20/tzdb.cc:642:23: error: ‘infos_mutex’ was not declared in this scope
  642 |         void lock() { infos_mutex.lock(); }
      |                       ^~~~~~~~~~~
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/src/c++20/tzdb.cc: In member function ‘void std::chrono::time_zone::_Impl::RulesCounter<_Tp>::unlock()’:
/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/gcc-13-20230826/libstdc++-v3/src/c++20/tzdb.cc:643:25: error: ‘infos_mutex’ was not declared in this scope
  643 |         void unlock() { infos_mutex.unlock(); }
      |                         ^~~~~~~~~~~
make[5]: *** [Makefile:754: tzdb.lo] Error 1
make[5]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-13.2.1_p20230826/work/build/x86_64-w64-mingw32/libstdc++-v3/src/c++20'
make[4]: *** [Makefile:791: all-recursive] Error 1
make[3]: *** [Makefile:576: all-recursive] Error 1
make[2]: *** [Makefile:501: all] Error 2
make[1]: *** [Makefile:12295: all-target-libstdc++-v3] Error 2
make[1]: *** Waiting for unfinished jobs....
Comment 1 Fabio Rossi 2023-09-26 12:15:36 UTC
Created attachment 871480 [details]
emerge-info.txt.gz
Comment 2 Fabio Rossi 2023-11-29 10:24:52 UTC
same problem also with gcc-13.2.1_p20231014
Comment 3 Ionen Wolkens gentoo-dev 2023-11-29 11:09:38 UTC
No full build log? Can't tell what configuration got used without it (I'd stick with minimal'ish USE for mingw cross, support is flaky).

Anyhow, gcc-13.2.1_p20231014 built fine for me:

    $ emerge -pvq cross-x86_64-w64-mingw32/gcc
    [ebuild   R   ] cross-x86_64-w64-mingw32/gcc-13.2.1_p20231014  USE="cxx fortran nls nptl openmp ssp -ada -cet -custom-cflags -d -debug (-default-stack-clash-protection) -default-znow -doc -fixed-point -go -graphite (-hardened) -ieee-long-double -jit -libssp -lto -modula2 (-multilib) -objc -objc++ -objc-gc (-pch) -pgo (-pie) -sanitize -systemtap -test -valgrind -vanilla -vtv -zstd" 

Albeit I used gcc:13 to build and haven't tried gcc:12 from your emerge --info, so maybe that's related (may want to try selecting 13).

Not that I really plan to look into cross issues myself outside dev-util/mingw64-toolchain, was just giving it a quick try in case it'd be completely broken.
Comment 4 Fabio Rossi 2023-11-29 15:07:51 UTC
I am trying to build as

# emerge -pv cross-x86_64-w64-mingw32/gcc

[ebuild  NS   ~] cross-x86_64-w64-mingw32/gcc-13.2.1_p20231014:13::crossdev [9.3.0-r2:9.3.0::crossdev, 10.3.0-r2:10::crossdev, 11.3.0:11::crossdev, 12.3.1_p20230526:12::crossdev] USE="cxx fortran nls nptl openmp ssp -ada -cet -custom-cflags -d -debug -default-stack-clash-protection -default-znow -doc -fixed-point -go -graphite -hardened -ieee-long-double -jit -libssp -lto -modula2% -multilib -objc -objc++ -objc-gc (-pch) -pgo -pie -sanitize -systemtap -test -valgrind -vanilla -vtv -zstd" 0 KiB

so it looks like with the same USEFLAGS you are using.

I have also tested with gcc-13 without success.

I'll try to rebuild the whole toolchain with crossdev by deleting the current one first.
Comment 5 Fabio Rossi 2023-11-29 16:38:17 UTC
I solved finally the problem after reinstalling the full toolchain. Probably the problem was due to the too-old mingw64-runtime version which was 6.0.0-r3 (now is 11.0.0). It works also with gcc-12