From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 544E53858D32; Mon, 30 Jan 2023 18:00:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 544E53858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675101632; bh=wy0p46r97G2HxOlSL5Lho3nbPGoxAwweXSawnRbU/kQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ft8wt9qMAq2ubwsHnr5TnBTsGqAJuoOmt5k7OhzOzAOACbfwJ7zJPiiZOhld/s//1 73m0hBi439M+7v4Glb04CX5lleYv1wL0s8AlwrHFmQOXbCgJFMQEafQ19/92C01b+5 P3JqDrH2DoVl6LZFBqqFocRCwhsICVqL0aLTNhCI= From: "jdx at o2 dot pl" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/108221] Building cross compiler for H8 family fails at libstdc++-v3/src/c++20/tzdb.cc Date: Mon, 30 Jan 2023 18:00:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jdx at o2 dot pl X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108221 --- Comment #21 from Jan Dubiec --- Unfortunately, after recent changes compilation for H8 family ends with: Making all in c++20 make[5]: Entering directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/c++20' echo 'static const char tzdata_chars[] =3D R"__libstdcxx__(' > tzdata.zi.h.= tmp cat ../../../../../../gcc/libstdc++-v3/src/c++20/tzdata.zi >> tzdata.zi.h.t= mp echo ')__libstdcxx__";' >> tzdata.zi.h.tmp mv tzdata.zi.h.tmp tzdata.zi.h /bin/sh ../../libtool --tag CXX --tag disable-shared --mode=3Dcompile /d/Works/xcomp/gcc-build/./gcc/xgcc -shared-libgcc -B/d/Works/xcomp/gcc-build/./gcc -nostdinc++ -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/libsupc++/.libs -B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem /usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include=20= =20=20 -I/d/Works/gcc/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include -I/d/Works/gcc/libstdc++-v3/libsupc++ -std=3Dgnu++20 -fno-implicit-temp= lates=20 -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=3D2=20 -fdiagnostics-show-location=3Donce -ffunction-sections -fdata-sections=20 -frandom-seed=3Dtzdb.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -I. -c ../../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc libtool: compile: /d/Works/xcomp/gcc-build/./gcc/xgcc -shared-libgcc -B/d/Works/xcomp/gcc-build/./gcc -nostdinc++ -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/libsupc++/.libs -B/usr/local/h8300-elf/bin/ -B/usr/local/h8300-elf/lib/ -isystem /usr/local/h8300-elf/include -isystem /usr/local/h8300-elf/sys-include -I/d/Works/gcc/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/h8300-elf -I/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include -I/d/Works/gcc/libstdc++-v3/libsupc++ -std=3Dgnu++20 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=3D2 -fdiagnostics-show-location=3Donce -ffunction-sections -fdata-sections -frandom-seed=3Dtzdb.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/h8300-elf/include -I. -c ../../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc -o tzdb.o d:\works\gcc\libstdc++-v3\src\c++20\tzdb.cc: In constructor 'std::chrono::{anonymous}::tzdata_stream::ispanbuf::ispanbuf()': d:\works\gcc\libstdc++-v3\src\c++20\tzdb.cc:1095:41: error: no matching function for call to 'size(const char [107244])' 1095 | this->setg(p, p, p + std::size(tzdata_chars) - 1); | ~~~~~~~~~^~~~~~~~~~~~~~ In file included from D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/string:53, from D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/locale_classes= .h:40, from D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/ios_base.h:41, from D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/ios:44, from D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/istream:40, from D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/sstream:40, from D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/chrono:45, from d:\works\gcc\libstdc++-v3\src\c++20\tzdb.cc:31: D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/range_access.h= :264:5: note: candidate: 'template constexpr decltype (__cont.siz= e()) std::size(const _Container&)' 264 | size(const _Container& __cont) noexcept(noexcept(__cont.size())) | ^~~~ D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/range_access.h= :264:5: note: template argument deduction/substitution failed: D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/range_access.h= : In substitution of 'template constexpr decltype (__cont.size= ()) std::size(const _Container&) [with _Container =3D char [107244]]': d:\works\gcc\libstdc++-v3\src\c++20\tzdb.cc:1095:34: required from here D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/range_access.h= :265:24: error: request for member 'size' in '__cont', which is of non-class type 'c= onst char [107244]' 265 | -> decltype(__cont.size()) | ~~~~~~~^~~~ D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/range_access.h= :274:5: note: candidate: 'template constexpr std::size_t std::size(const _Tp (&)[_Nm])' 274 | size(const _Tp (&)[_Nm]) noexcept | ^~~~ D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/range_access.h= :274:5: note: template argument deduction/substitution failed: D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/range_access.h= : In substitution of 'template constexpr std::size_t std::size(const _Tp (&)[_Nm]) [with _Tp =3D char; long unsigned= int _Nm =3D 4294943468]': d:\works\gcc\libstdc++-v3\src\c++20\tzdb.cc:1095:34: required from here D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/range_access.h= :274:5: error: size of array exceeds maximum object size '2147483647' D:/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/include/bits/range_access.h= :274:10: error: size of array exceeds maximum object size '2147483647' 274 | size(const _Tp (&)[_Nm]) noexcept | ^~~~~~~~~~~~~~~~~~ make[5]: *** [Makefile:752: tzdb.lo] Error 1 make[5]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src/c++20' make[4]: *** [Makefile:784: all-recursive] Error 1 make[4]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3/src' make[3]: *** [Makefile:576: all-recursive] Error 1 make[3]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3' make[2]: *** [Makefile:501: all] Error 2 make[2]: Leaving directory '/d/Works/xcomp/gcc-build/h8300-elf/libstdc++-v3' make[1]: *** [Makefile:12305: all-target-libstdc++-v3] Error 2 make[1]: Leaving directory '/d/Works/xcomp/gcc-build' make: *** [Makefile:1051: all] Error 2 Compilation for MSP430 ends with: Making all in c++20 make[5]: Entering directory '/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/src/c++20' echo 'static const char tzdata_chars[] =3D R"__libstdcxx__(' > tzdata.zi.h.= tmp cat ../../../../../../gcc/libstdc++-v3/src/c++20/tzdata.zi >> tzdata.zi.h.t= mp echo ')__libstdcxx__";' >> tzdata.zi.h.tmp mv tzdata.zi.h.tmp tzdata.zi.h /bin/sh ../../libtool --tag CXX --tag disable-shared --mode=3Dcompile /d/Works/xcomp/gcc-build/./gcc/xgcc -shared-libgcc -B/d/Works/xcomp/gcc-build/./gcc -nostdinc++ -L/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/libsupc++/.libs -B/usr/local/msp430-elf/bin/ -B/usr/local/msp430-elf/lib/ -isystem /usr/local/msp430-elf/include -isystem /usr/local/msp430-elf/sys-include=20= =20=20 -I/d/Works/gcc/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/include/msp430-elf -I/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/include -I/d/Works/gcc/libstdc++-v3/libsupc++ -std=3Dgnu++20 -fno-implicit-temp= lates=20 -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=3D2=20 -fdiagnostics-show-location=3Donce -ffunction-sections -fdata-sections=20 -frandom-seed=3Dtzdb.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/msp430-elf/include -I. -c ../../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc libtool: compile: /d/Works/xcomp/gcc-build/./gcc/xgcc -shared-libgcc -B/d/Works/xcomp/gcc-build/./gcc -nostdinc++ -L/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/src -L/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/src/.libs -L/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/libsupc++/.libs -B/usr/local/msp430-elf/bin/ -B/usr/local/msp430-elf/lib/ -isystem /usr/local/msp430-elf/include -isystem /usr/local/msp430-elf/sys-include -I/d/Works/gcc/libstdc++-v3/../libgcc -I/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/include/msp430-elf -I/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/include -I/d/Works/gcc/libstdc++-v3/libsupc++ -std=3Dgnu++20 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=3D2 -fdiagnostics-show-location=3Donce -ffunction-sections -fdata-sections -frandom-seed=3Dtzdb.lo -fimplicit-templates -isystem /d/Works/xcomp/sysroot/msp430-elf/include -I. -c ../../../../../../gcc/libstdc++-v3/src/c++20/tzdb.cc -o tzdb.o In file included from d:\works\gcc\libstdc++-v3\src\c++20\tzdb.cc:1082: ./tzdata.zi.h:1:36: error: size of string literal is too large 1 | static const char tzdata_chars[] =3D R"__libstdcxx__( | ^~~~~~~~~~~~~~~~ 2 | # version 2022g | ~~~~~~~~~~~~~~~=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 3 | # This zic input file is in the public domain. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | R d 1916 o - Jun 14 23s 1 S [ about 4200 rows go here ] 4208 | L Pacific/Port_Moresby Pacific/Truk | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=20 4209 | )__libstdcxx__"; | ~~~~~~~~~~~~~~~=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 make[5]: *** [Makefile:752: tzdb.lo] Error 1 make[5]: Leaving directory '/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/src/c++20' make[4]: *** [Makefile:784: all-recursive] Error 1 make[4]: Leaving directory '/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v3/src' make[3]: *** [Makefile:576: all-recursive] Error 1 make[3]: Leaving directory '/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v= 3' make[2]: *** [Makefile:501: all] Error 2 make[2]: Leaving directory '/d/Works/xcomp/gcc-build/msp430-elf/libstdc++-v= 3' make[1]: *** [Makefile:12305: all-target-libstdc++-v3] Error 2 make[1]: Leaving directory '/d/Works/xcomp/gcc-build' make: *** [Makefile:1051: all] Error 2=