Reverts part of fa67f096bdea9db59dd20c470c9e32f3dac5be94, now that we require a minimum of GCC 11.
See also: #28349 (comment).
Reverts part of fa67f096bdea9db59dd20c470c9e32f3dac5be94, now that we require a minimum of GCC 11.
See also: #28349 (comment).
Reverts part of fa67f096bdea9db59dd20c470c9e32f3dac5be94, now that we
require a minimum of GCC 11.
See also:
https://github.com/bitcoin/bitcoin/pull/28349#issuecomment-1745143612.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Is there any user facing difference? If so, it would be good to show it in a comment.
Is there any user facing difference? If so, it would be good to show it in a comment.
./configure CC=gcc-10 CXX=g++-10
<snip>
configure: error: *** A compiler with support for C++20 language features is required.
Otherwise it would continue to compile (and miscompile RenameOver)?
Otherwise it would continue to compile (and miscompile RenameOver)?
I don't know where it would fail first, but I don't see the point of having it continue past configure in this case. There are multiple devs using clang-14 who've been confused by clang-14 failing to compile code, and unsure what the issue was. So fixing the case here for GCC seems more useful than random compile errors.
I am asking, because this may need backport, if compilation succeeds. I assumed it would fail, which is why I left it as-is. However, if this compiles for users using g++10, then it seems dangerous. It would expose them to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98985 and possibly other bugs.
The first compile failure I see is in util/time.cpp:
util/time.cpp: In function ‘std::string FormatISO8601DateTime(int64_t)’:
util/time.cpp:50:24: error: ‘year_month_day’ in namespace ‘std::chrono’ does not name a type
50 | const std::chrono::year_month_day ymd{days};
| ^~~~~~~~~~~~~~
util/time.cpp:51:24: error: ‘hh_mm_ss’ in namespace ‘std::chrono’ does not name a type
51 | const std::chrono::hh_mm_ss hms{secs - days};
| ^~~~~~~~
util/time.cpp:52:63: error: ‘ymd’ was not declared in this scope
52 | return strprintf("%04i-%02u-%02uT%02i:%02i:%02iZ", signed{ymd.year()}, unsigned{ymd.month()}, unsigned{ymd.day()}, hms.hours().count(), hms.minutes().count(), hms.seconds().count());
| ^~~
util/time.cpp:52:120: error: ‘hms’ was not declared in this scope
52 | return strprintf("%04i-%02u-%02uT%02i:%02i:%02iZ", signed{ymd.year()}, unsigned{ymd.month()}, unsigned{ymd.day()}, hms.hours().count(), hms.minutes().count(), hms.seconds().count());
| ^~~
util/time.cpp: In function ‘std::string FormatISO8601Date(int64_t)’:
util/time.cpp:59:24: error: ‘year_month_day’ in namespace ‘std::chrono’ does not name a type
59 | const std::chrono::year_month_day ymd{days};
| ^~~~~~~~~~~~~~
util/time.cpp:60:47: error: ‘ymd’ was not declared in this scope
60 | return strprintf("%04i-%02u-%02u", signed{ymd.year()}, unsigned{ymd.month()}, unsigned{ymd.day()});
| ^~~
make[2]: *** [Makefile:11756: util/libbitcoin_util_a-time.o] Error 1
Thanks for checking. Can you re-try on 27.x, because https://github.com/bitcoin/bitcoin/commit/c3530254c926a5ab9b710512bbbd29e5cd5b10f7 is not in 27.x.
Can you re-try on 27.x, because https://github.com/bitcoin/bitcoin/commit/c3530254c926a5ab9b710512bbbd29e5cd5b10f7 is not in 27.x.
27.x & fccd32efe6e2950b2c74fdec2ade54040ca32a2c compiles with gcc-10 (Ubuntu 10.5.0-4ubuntu2) 10.5.0.
Oh, 27.x remains on g++-10, so no backport needed. I was wrong. See https://github.com/bitcoin/bitcoin/blob/27.x/doc/dependencies.md
utACK 232928b58a82e3f15307deba1ae921ae2960ccc8
Seems fine to fail early here, instead of running into a util/time compile failure later on.
utACK 232928b58a82e3f15307deba1ae921ae2960ccc8
Milestone
28.0