Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libtiledbsoma build fails with libfmt errors when linked to libtiledb 2.27.0-rc1 #26

Closed
jdblischak opened this issue Nov 19, 2024 · 4 comments
Assignees

Comments

@jdblischak
Copy link
Collaborator

This morning I tested the latest libtiledb 2.27.0-rc1 release binary in the centralized nightlies pipeline

The libtiledbsoma build failed with libfmt-related errors.

cc: @johnkerl, @ihnorton

[  5%] Building CXX object src/CMakeFiles/TILEDB_SOMA_OBJECTS.dir/soma/managed_query.cc.o
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/soma/managed_query.cc:37:10: fatal error: format: No such file or directory
   37 | #include <format>
      |          ^~~~~~~~
compilation terminated.
gmake[5]: *** [src/CMakeFiles/TILEDB_SOMA_OBJECTS.dir/build.make:93: src/CMakeFiles/TILEDB_SOMA_OBJECTS.dir/soma/managed_query.cc.o] Error 1
gmake[5]: *** Waiting for unfinished jobs....


[ 10%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/reporters/catch_reporter_compact.cpp.o
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc: In member function ‘void tiledbsoma::IntIndexer::map_locations(const int64_t*, size_t)’:
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:63:14: error: ‘format’ is not a member of ‘std’; did you mean ‘fmt::v8::format’?
   63 |         std::format("[Re-indexer] Start of Map locations with {} keys", size));
      |              ^~~~~~
In file included from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/core.h:3234,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/fmt.h:24,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/common.h:45,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/spdlog.h:12,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/utils/logger.h:54,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:41:
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/format.h:3058:13: note: ‘fmt::v8::format’ declared here
 3058 | inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
      |             ^~~~~~
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:74:20: error: ‘format’ is not a member of ‘std’; did you mean ‘fmt::v8::format’?
   74 |     LOG_DEBUG(std::format("[Re-indexer] khash size = {}", hsize));
      |                    ^~~~~~
In file included from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/core.h:3234,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/fmt.h:24,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/common.h:45,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/spdlog.h:12,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/utils/logger.h:54,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:41:
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/format.h:3058:13: note: ‘fmt::v8::format’ declared here
 3058 | inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
      |             ^~~~~~
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:77:14: error: ‘format’ is not a member of ‘std’; did you mean ‘fmt::v8::format’?
   77 |         std::format("[Re-indexer] Thread pool started and hash table created"));
      |              ^~~~~~
In file included from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/core.h:3234,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/fmt.h:24,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/common.h:45,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/spdlog.h:12,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/utils/logger.h:54,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:41:
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/format.h:3058:13: note: ‘fmt::v8::format’ declared here
 3058 | inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
      |             ^~~~~~
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc: In member function ‘void tiledbsoma::IntIndexer::lookup(const int64_t*, int64_t*, size_t)’:
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:98:20: error: ‘format’ is not a member of ‘std’; did you mean ‘fmt::v8::format’?
   98 |     LOG_DEBUG(std::format(
      |                    ^~~~~~
In file included from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/core.h:3234,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/fmt.h:24,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/common.h:45,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/spdlog.h:12,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/utils/logger.h:54,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:41:
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/format.h:3058:13: note: ‘fmt::v8::format’ declared here
 3058 | inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
      |             ^~~~~~
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:117:24: error: ‘format’ is not a member of ‘std’; did you mean ‘fmt::v8::format’?
  117 |         LOG_DEBUG(std::format(
      |                        ^~~~~~
In file included from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/core.h:3234,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/fmt.h:24,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/common.h:45,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/spdlog.h:12,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/utils/logger.h:54,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:41:
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/format.h:3058:13: note: ‘fmt::v8::format’ declared here
 3058 | inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
      |             ^~~~~~
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:134:24: error: ‘format’ is not a member of ‘std’; did you mean ‘fmt::v8::format’?
  134 |         LOG_DEBUG(std::format(
      |                        ^~~~~~
In file included from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/core.h:3234,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/fmt.h:24,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/common.h:45,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/spdlog.h:12,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/utils/logger.h:54,
                 from /home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/libtiledbsoma/src/reindexer/reindexer.cc:41:
/home/runner/work/centralized-tiledb-nightlies/centralized-tiledb-nightlies/build-libtiledbsoma/externals/install/include/spdlog/fmt/bundled/format.h:3058:13: note: ‘fmt::v8::format’ declared here
 3058 | inline auto format(const Locale& loc, format_string<T...> fmt, T&&... args)
      |             ^~~~~~
@johnkerl
Copy link
Contributor

fmt::format is in a 3rd-party library

As of C++ 20 we can use std::format instead. Core has been at C++ 20 for a while; tiledbsoma is at C++ 20 as of 2024-11-19. Tracking issue: single-cell-data/TileDB-SOMA#3154.

Let's check tonight's run.

@johnkerl johnkerl self-assigned this Nov 19, 2024
@jdblischak
Copy link
Collaborator Author

As of C++ 20 we can use std::format instead. Core has been at C++ 20 for a while; tiledbsoma is at C++ 20 as of 2024-11-19. Tracking issue: single-cell-data/TileDB-SOMA#3154.

@johnkerl Great! Thanks for the context. It's good to know that this is being actively worked on so I can expect it to be in flux.

Let's check tonight's run.

Tonight's scheduled run will build the main branch of libtiledbsoma against the dev branch of libtiledb. I went ahead and manually triggered another build on my branch that builds the main branch of libtiledbsoma against the release binary for 2.27.0-rc1.

https://github.com/TileDB-Inc/centralized-tiledb-nightlies/actions/runs/11919421932

The original build failure I described above used TileDB-SOMA commit single-cell-data/TileDB-SOMA@f5a3dbc (the one that migrated to C++20), and the latest one used single-cell-data/TileDB-SOMA@8b6ab64 (only a CI update). I should have checked this before I manually triggered the build!

In summary, the build failure was with the C++20 enabled TileDB-SOMA, which in retrospect makes sense, since the error messages mention std::format instead of fmt::format.

We'll see what happens tonight when it is built against dev libtiledb.

@johnkerl
Copy link
Contributor

johnkerl commented Nov 19, 2024

@jdblischak https://github.com/TileDB-Inc/centralized-tiledb-nightlies/actions/runs/11919421932/job/33219106678 shows Ubuntu 22.04 which has an older compiler version. @XanthosXanthopoulos found for our tiledbsoma CI that it was easiest to move to Ubuntu 24.04 to get the minimum compiler version (GCC 13).

That said, I cloned this repo & grepped for 22.04 and did not find it. But I found .github/workflows/linux.yml saying ubuntu-latest and @XanthosXanthopoulos found on single-cell-data/TileDB-SOMA#3331 that latest is 22.04 not 24.04.

I've drafted PR #27.

@jdblischak
Copy link
Collaborator Author

I rebased my branch onto main to build with a newer GCC (#27). libtiledbsoma successfully built against the release binary for libtiledb 2.27.0-rc1 🎉 Thanks @johnkerl!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants