seastar icon indicating copy to clipboard operation
seastar copied to clipboard

Error building seastar on Fedora 35

Open talawahtech opened this issue 4 years ago • 4 comments

Attempts to build seastar master (0c86ae0feda9b1052f0f019fad0d0b1a0ba098c1) by following the steps outlined in the README fail on Fedora 35. Note that the build completes successfully without issue on Fedora 34.

Server: AWS EC2 instance (c5n.4xlarge) AMI Version: Fedora-Cloud-Base-35-1.2.x86_64-hvm-us-east-2-gp2-0 (ami-0133ad8c5d900ddef) g++ version: 11.2.1 20210728 (Red Hat 11.2.1-1)

Steps to reproduce:

  1. Launch Instance/AMI
  2. sudo yum install git
  3. git clone https://github.com/scylladb/seastar/ && cd seastar
  4. sudo ./install-dependencies.sh
  5. ./configure.py --mode=release --c++-dialect gnu++20
  6. ninja -C build/release

Error:

[206/304] Building CXX object tests/unit/CMakeFiles/test_unit_log_buf.dir/log_buf_test.cc.o
FAILED: tests/unit/CMakeFiles/test_unit_log_buf.dir/log_buf_test.cc.o
/usr/bin/g++ -DBOOST_TEST_DYN_LINK -DFMT_LOCALE -DFMT_SHARED -DSEASTAR_API_LEVEL=6 -DSEASTAR_DEFERRED_ACTION_REQUIRE_NOEXCEPT -DSEASTAR_HAS_MEMBARRIER -DSEASTAR_HAVE_ASAN_FIBER_SUPPORT -DSEASTAR_HAVE_HWLOC -DSEASTAR_HAVE_LZ4_COMPRESS_DEFAULT -DSEASTAR_HAVE_NUMA -DSEASTAR_SCHEDULING_GROUPS_COUNT=16 -DSEASTAR_TESTING_MAIN -I/home/fedora/seastar/tests/unit -I/home/fedora/seastar/src -I/home/fedora/seastar/include -I/home/fedora/seastar/build/release/gen/include -O2 -g -DNDEBUG -std=gnu++20 -U_FORTIFY_SOURCE -Wno-maybe-uninitialized -DSEASTAR_SSTRING -Wno-error=unused-result -fvisibility=hidden -UNDEBUG -Wall -Werror -Wno-array-bounds -Wno-error=deprecated-declarations -gz -std=gnu++20 -MD -MT tests/unit/CMakeFiles/test_unit_log_buf.dir/log_buf_test.cc.o -MF tests/unit/CMakeFiles/test_unit_log_buf.dir/log_buf_test.cc.o.d -o tests/unit/CMakeFiles/test_unit_log_buf.dir/log_buf_test.cc.o -c /home/fedora/seastar/tests/unit/log_buf_test.cc
/home/fedora/seastar/tests/unit/log_buf_test.cc: In member function ‘virtual seastar::future<> log_buf_insert_iterator_format_to::run_test_case()’:
/home/fedora/seastar/tests/unit/log_buf_test.cc:69:24:   in ‘constexpr’ expansion of ‘fmt::v8::basic_format_string<char, const long unsigned int&>(str)’
/usr/include/fmt/core.h:2835:51:   in ‘constexpr’ expansion of ‘((fmt::v8::basic_format_string<char, const long unsigned int&>*)this)->fmt::v8::basic_format_string<char, const long unsigned int&>::str_.fmt::v8::basic_string_view<char>::basic_string_view(((const char*)s))’
/usr/include/fmt/core.h:465:45:   in ‘constexpr’ expansion of ‘std::char_traits<char>::length(s)’
/usr/include/c++/11/bits/char_traits.h:369:52:   in ‘constexpr’ expansion of ‘__gnu_cxx::char_traits<char>::length(__s)’
/usr/include/c++/11/bits/char_traits.h:171:17:   in ‘constexpr’ expansion of ‘__gnu_cxx::char_traits<char>::eq((*(__p + ((sizetype)__i))), 0)’
/home/fedora/seastar/tests/unit/log_buf_test.cc:69:24: error: the value of ‘str’ is not usable in a constant expression
   69 |     it = fmt::format_to(it, str, size);
      |          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/home/fedora/seastar/tests/unit/log_buf_test.cc:58:10: note: ‘str’ was not declared ‘constexpr’
   58 |     char str[size + 1];
      |          ^~~
/home/fedora/seastar/tests/unit/log_buf_test.cc:76:24:   in ‘constexpr’ expansion of ‘fmt::v8::basic_format_string<char, const long unsigned int&>(str)’
/usr/include/fmt/core.h:2835:51:   in ‘constexpr’ expansion of ‘((fmt::v8::basic_format_string<char, const long unsigned int&>*)this)->fmt::v8::basic_format_string<char, const long unsigned int&>::str_.fmt::v8::basic_string_view<char>::basic_string_view(((const char*)s))’
/usr/include/fmt/core.h:465:45:   in ‘constexpr’ expansion of ‘std::char_traits<char>::length(s)’
/usr/include/c++/11/bits/char_traits.h:369:52:   in ‘constexpr’ expansion of ‘__gnu_cxx::char_traits<char>::length(__s)’
/usr/include/c++/11/bits/char_traits.h:171:17:   in ‘constexpr’ expansion of ‘__gnu_cxx::char_traits<char>::eq((*(__p + ((sizetype)__i))), 0)’
/home/fedora/seastar/tests/unit/log_buf_test.cc:76:24: error: the value of ‘str’ is not usable in a constant expression
   76 |     it = fmt::format_to(it, str, size);
      |          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/home/fedora/seastar/tests/unit/log_buf_test.cc:58:10: note: ‘str’ was not declared ‘constexpr’
   58 |     char str[size + 1];
      |          ^~~
[223/304] Building CXX object tests/unit/CMakeFiles/test_unit_rpc.dir/rpc_test.cc.o
ninja: build stopped: subcommand failed.

talawahtech avatar Dec 06 '21 18:12 talawahtech

PR #983 fixes this

psqli avatar Dec 14 '21 17:12 psqli

I'll send the patch to the mailing list ASAP.

psqli avatar Dec 14 '21 17:12 psqli

Should be fixed by 9baead6e8842aded8ee84ecdfd2d5c4cef74acab

psqli avatar Dec 21 '21 12:12 psqli

update: fmt-8.1.1 is now available on Fedora 35 https://bodhi.fedoraproject.org/updates/FEDORA-2022-71221357d9

psqli avatar Jan 12 '22 14:01 psqli