public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jdx at o2 dot pl" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-108221-4-iNIC8iodCI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108221-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108221

--- Comment #21 from Jan Dubiec <jdx at o2 dot pl> ---
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[] = R"__libstdcxx__(' > tzdata.zi.h.tmp
cat ../../../../../../gcc/libstdc++-v3/src/c++20/tzdata.zi >> tzdata.zi.h.tmp
echo ')__libstdcxx__";' >> tzdata.zi.h.tmp
mv tzdata.zi.h.tmp tzdata.zi.h
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=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=gnu++20   -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 -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=gnu++20 -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 -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<class _Container> constexpr decltype (__cont.size())
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<class _Container> constexpr decltype (__cont.size())
std::size(const _Container&) [with _Container = 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 'const
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<class _Tp, long unsigned int _Nm> 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<class _Tp, long unsigned int _Nm> constexpr
std::size_t std::size(const _Tp (&)[_Nm]) [with _Tp = char; long unsigned int
_Nm = 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[] = R"__libstdcxx__(' > tzdata.zi.h.tmp
cat ../../../../../../gcc/libstdc++-v3/src/c++20/tzdata.zi >> tzdata.zi.h.tmp
echo ')__libstdcxx__";' >> tzdata.zi.h.tmp
mv tzdata.zi.h.tmp tzdata.zi.h
/bin/sh ../../libtool --tag CXX --tag disable-shared   --mode=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=gnu++20   -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 -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=gnu++20 -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 -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[] = R"__libstdcxx__(
      |                                    ^~~~~~~~~~~~~~~~
    2 | # version 2022g
      | ~~~~~~~~~~~~~~~                     
    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
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 4209 | )__libstdcxx__";
      | ~~~~~~~~~~~~~~~                     
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++-v3'
make[2]: *** [Makefile:501: all] Error 2
make[2]: Leaving directory '/d/Works/xcomp/gcc-build/msp430-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

  parent reply	other threads:[~2023-01-30 18:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-25  9:58 [Bug libstdc++/108221] New: " jdx at o2 dot pl
2022-12-27  9:55 ` [Bug libstdc++/108221] " marxin at gcc dot gnu.org
2023-01-05  0:55 ` redi at gcc dot gnu.org
2023-01-05 12:23 ` redi at gcc dot gnu.org
2023-01-05 14:02 ` redi at gcc dot gnu.org
2023-01-06 13:25 ` cvs-commit at gcc dot gnu.org
2023-01-06 13:27 ` redi at gcc dot gnu.org
2023-01-07  1:09 ` jdx at o2 dot pl
2023-01-07  1:13 ` redi at gcc dot gnu.org
2023-01-07  1:17 ` redi at gcc dot gnu.org
2023-01-07  1:23 ` redi at gcc dot gnu.org
2023-01-07  1:25 ` redi at gcc dot gnu.org
2023-01-07  8:29 ` jdx at o2 dot pl
2023-01-07 10:34 ` redi at gcc dot gnu.org
2023-01-08 11:44 ` jdx at o2 dot pl
2023-01-09 12:58 ` redi at gcc dot gnu.org
2023-01-10 10:10 ` cvs-commit at gcc dot gnu.org
2023-01-10 10:10 ` cvs-commit at gcc dot gnu.org
2023-01-10 11:48 ` redi at gcc dot gnu.org
2023-01-12  4:32 ` jdx at o2 dot pl
2023-01-13 17:04 ` jdx at o2 dot pl
2023-01-13 17:40 ` redi at gcc dot gnu.org
2023-01-30 18:00 ` jdx at o2 dot pl [this message]
2023-01-30 19:28 ` redi at gcc dot gnu.org
2023-01-31 16:26 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108221-4-iNIC8iodCI@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).