$ cat test.cpp #include <spdlog/spdlog.h> $ g++ test.cpp In file included from /usr/include/spdlog/common.h:36, from /usr/include/spdlog/spdlog.h:12, from test.cpp:1: /usr/include/spdlog/fmt/fmt.h:22:14: fatal error: spdlog/fmt/bundled/core.h: No such file or directory 22 | # include <spdlog/fmt/bundled/core.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. The fix is to uncomment #define SPDLOG_FMT_EXTERNAL in /usr/include/spdlog/tweakme.h, and that should be done via a patch in dev-libs/spdlog/files/ because this is specific to the way how spdlog is installed, and not related to projects which use spdlog
AFAIK the ebuild use `-DSPDLOG_BUILD_SHARED=yes` so the resulting library is *not* header-only anymore. $ pkg-config --cflags --libs spdlog -DSPDLOG_SHARED_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -lspdlog -pthread -lfmt pkg-config indeed gives appropriate flags for linking against libspdlog.so and libfmt.so installed in the system. However, my concern is, as it is a compiled library, it should use cmake-multilib.eclass instead to build 32- and 64-bit libraries for multilib environment.
ping
I opened an issue upstream some days ago about the use of bundled fmt, it's not a big issue but it really doesn't makes sense to include a bundled library that is not installed. For now I will patch it so it only includes system fmt and use the correct eclass too. thanks
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc822ea2139fce41df9ca35b3e8a02a8f4dba185 commit fc822ea2139fce41df9ca35b3e8a02a8f4dba185 Author: David Roman <davidroman96@gmail.com> AuthorDate: 2022-01-18 23:37:51 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-03-10 23:58:16 +0000 dev-libs/spdlog: force use of external fmt lib Closes: https://bugs.gentoo.org/827889 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: David Roman <davidroman96@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/23863 Signed-off-by: Sam James <sam@gentoo.org> .../spdlog/files/spdlog-force_external_fmt.patch | 15 ++++++ dev-libs/spdlog/spdlog-1.9.2-r1.ebuild | 53 ++++++++++++++++++++++ 2 files changed, 68 insertions(+)