From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 3399A384A018; Wed, 13 Jan 2021 11:57:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3399A384A018 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ro@cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id C518690F; Wed, 13 Jan 2021 12:57:22 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ywFHuDoOFjtd; Wed, 13 Jan 2021 12:57:20 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddb15f.dip0.t-ipconnect.de [79.221.177.95]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 940E76F8; Wed, 13 Jan 2021 12:57:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1610539040; bh=Lg/G4dQSJ3IfXIXFHsf99tjJ5fynHn1V2Jno7DrR/VQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=mmh7pGsuJzQyxqxQP5UKfagHNSeBnwVNAvC0rH3UIvlZZN9NsipygxiAJznbqwdCg ez60ANhHtUEzQFJ8x81NBPdkCPpT52MFkuyJkCbhuhgW0+7bIXrMEg74Nw2Cut+D7z Nd6p9+GUEG9/Ixq9OmBAOz7wGBlBQrtr3cQFViEwLOQz4VGHfSkBrz5rgkms+deK8i WLrrkMqaESPZlj0EP0lUNxORezpklRbCrCjmXi6m8QIpjToJ4YxCbpIcNUuZPvrX96 Bp3FtDMJfOZDMpxQqk+LldPfDHto1Bod9vkQHgMEcBdP5AVj73ZmdwHY361HPjHLaC QX5LDjL18PIGw== From: Rainer Orth To: David Edelsohn Cc: Jonathan Wakely , "libstdc++@gcc.gnu.org" , David Edelsohn via Gcc-patches , "CHIGOT, CLEMENT" Subject: Re: [PATCH] libstdc++: implement locale support for AIX References: <20210111154058.GB21410@redhat.com> <20210112152505.GE21410@redhat.com> Date: Wed, 13 Jan 2021 12:57:20 +0100 In-Reply-To: (Rainer Orth's message of "Tue, 12 Jan 2021 20:58:48 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3789.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2021 11:57:26 -0000 Hi David, >> I agree that #ifdef's are not the correct approach, but, if you enable >> the fallbacks for Solaris, does everything then work? Are those >> fallbacks portable and we solely need a better mechanism to enable >> them on platforms that require them? > > it mostly compiles, with two caveats: > > * c_locale.h needs to include for declarations of strtod and > friends. > > * Solaris only declares the int_p_cs_precedes etc. members of > struct lconv for C99+, but not for C++11+, as it should. I'll file a > bug for that, but for now one can work around the issue by defining > _LCONV_C99 before including in monetary_members.cc. > > With those changes, I can at least build libstdc++ with > --enable-clocale=ieee_1003.1-2008. Bootstrap still running, though. while that allowed the compilation to succeed, test results are not good: +FAIL: libstdc++-abi/abi_check # of added symbols: 173 # of missing symbols: 72 # of undesignated symbols: 0 # of incompatible symbols: 144 This alone makes the patch inacceptable in its present form: breaking the libstdc++ ABI is a non-starter. However, I suspect this can be avoided somehow. +FAIL: 22_locale/classification/isblank.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/classification/isblank.cc:38: void test02(): Assertion 'std::isblank(L' ', std::locale::classic())' failed. It turns out that this is caused by ieee_1003.1-2008/ctype_members.cc using __bitmapsize = 11 in a couple of places, unlike the generic version which uses 15 to accomodate variations in character classifications. Making this change lets a few tests PASS: @@ -3354 +3354 @@ -FAIL: 22_locale/classification/isblank.cc execution test +PASS: 22_locale/classification/isblank.cc execution test @@ -3621 +3621 @@ -FAIL: 22_locale/ctype/is/wchar_t/1.cc execution test +PASS: 22_locale/ctype/is/wchar_t/1.cc execution test @@ -3655 +3655 @@ -FAIL: 22_locale/ctype/scan/wchar_t/1.cc execution test +PASS: 22_locale/ctype/scan/wchar_t/1.cc execution test @@ -3657 +3657 @@ -FAIL: 22_locale/ctype/scan/wchar_t/wrapped_env.cc execution test +PASS: 22_locale/ctype/scan/wchar_t/wrapped_env.cc execution test @@ -10864 +10864 @@ -FAIL: 28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc execution test +PASS: 28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc execution test @@ -11070 +11070 @@ -FAIL: 28_regex/traits/wchar_t/isctype.cc execution test +PASS: 28_regex/traits/wchar_t/isctype.cc execution test However, there are many more which I haven't even started to investigate. I suspect there's one (or a few) reasons immediately obvious to someone familiar with the code. +FAIL: 22_locale/codecvt/in/wchar_t/3.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc:118: void test03(): Assertion '!int_traits::compare(i_arr, i_lit, size)' failed. +FAIL: 22_locale/codecvt/max_length/wchar_t/4.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc:41: void test04(): Assertion 'k == 6' failed. +FAIL: 22_locale/codecvt/out/wchar_t/3.cc execution test vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc:113: void test03(): Assertion 'r2 == codecvt_base::ok' failed. +FAIL: 22_locale/collate/compare/wchar_t/3.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc:61: void test03(): Assertion 'i == -1' failed. +FAIL: 22_locale/collate/transform/wchar_t/3.cc execution test terminate called after throwing an instance of 'std::length_error' what(): basic_string::append +FAIL: 22_locale/ctype/is/wchar_t/1.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc:71: void test01(): Assertion 'gctype.is(std::ctype_base::punct, c40)' failed. +FAIL: 22_locale/ctype/is/wchar_t/wrapped_env.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc:71: void test01(): Assertion 'gctype.is(std::ctype_base::punct, c40)' failed. +FAIL: 22_locale/ctype/scan/wchar_t/1.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc:69: void test01(): Assertion 'gctype.scan_is((std::ctype_base::xdigit), (ca), (ca) + traits_type::length(ca)) == (ca)' failed. +FAIL: 22_locale/ctype/scan/wchar_t/wrapped_env.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/ctype/scan/wchar_t/1.cc:69: void test01(): Assertion 'gctype.scan_is((std::ctype_base::xdigit), (ca), (ca) + traits_type::length(ca)) == (ca)' failed. +FAIL: 22_locale/ctype/widen/wchar_t/2.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc:39: void test02(): Assertion 'wc == static_cast(0xff)' failed. +FAIL: 22_locale/locale/cons/29217.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/locale/cons/29217.cc:33: void test01(): Assertion 'locale().name() == "LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;" "LC_TIME=C;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=C;" "LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;" "LC_MEASUREMENT=C;LC_IDENTIFICATION=C"' failed. +FAIL: 22_locale/locale/cons/38368.cc execution test terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid +FAIL: 22_locale/messages/members/char/1.cc execution test vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc:52: void test01(): Assertion 's01 == "bitte"' failed. +FAIL: 22_locale/messages_byname/named_equivalence.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/messages_byname/named_equivalence.cc:58: void test01(): Assertion 's01 == "bitte"' failed. +FAIL: 22_locale/money_get/get/wchar_t/1.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc:115: void test01(): Assertion 'result8 == digits1' failed. +FAIL: 22_locale/money_put/put/wchar_t/1.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc:77: void test01(): Assertion 'result4 == L"7.200.000.000,00 \x20ac"' failed. +FAIL: 22_locale/money_put/put/wchar_t/3.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc:74: void test03(): Assertion 'result4 == L"7.200.000.000,00 \x20ac"' failed. +FAIL: 22_locale/time_put/put/char/2.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc:49: void test02(): Assertion 'result2 == "Son" || result2 == "So"' failed. +FAIL: 22_locale/time_put/put/wchar_t/2.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc:50: void test02(): Assertion 'result2 == L"Son" || result2 == L"So"' failed. +FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-1.cc execution test terminate called after throwing an instance of 'std::__ios_failure' what(): basic_filebuf::_M_convert_to_external conversion error: iostream error +FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-2.cc execution test terminate called after throwing an instance of 'std::__ios_failure' what(): basic_filebuf::_M_convert_to_external conversion error: iostream error +FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-3.cc execution test terminate called after throwing an instance of 'std::__ios_failure' what(): basic_filebuf::_M_convert_to_external conversion error: iostream error +FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-4.cc execution test terminate called after throwing an instance of 'std::__ios_failure' what(): basic_filebuf::_M_convert_to_external conversion error: iostream error +FAIL: 27_io/manipulators/extended/get_time/char/2.cc execution test vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/char/2.cc:41: void test01(): Assertion 'time1.tm_wday == 2' failed. +FAIL: 28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc execution test terminate called after throwing an instance of 'std::regex_error' what(): Unexpected end of regex when ascii character. +FAIL: 28_regex/algorithms/regex_match/extended/wstring_locale.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:43: void test01(): Assertion 'regex_match_debug(str2, m2, re2)' failed. +FAIL: 28_regex/iterators/regex_token_iterator/wchar_t/wstring_02.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/28_regex/iterators/regex_token_iterator/wchar_t/wstring_02.cc:44: void test01(): Assertion 'p == end' failed. +FAIL: 28_regex/traits/wchar_t/isctype.cc execution test /vol/gcc/src/hg/master/solaris/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc:51: void test01(): Assertion 't.isctype(L' ', t.lookup_classname(range(blank)))' failed. I've also added the locale handling changes in config/os/aix/ctype_configure_char.cc to config/os/solaris/ctype_configure_char.cc (ctype::ctype), but that made no difference. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University