Gaudi 36.7 fails to compile against fmt 9.1.0
As reported by Wouter Deconinck on github (https://github.com/key4hep/Gaudi/issues/1):
- OS version: ubuntu 22.04
- Compiler version: gcc 12.1.0
- Package version: gaudi 36.7
- Reproduced by:
spack install gaudi@36.7 ^fmt@9.1.0
on up-to-date spack develop - Output: see below
The latest version of gaudi fails to compile against the latest version of fmt. This is apparent in the current develop branch of spack, where fmt 9.0.0 and 9.1.0 have landed a few days ago. The issue seems to be due to a missing formatter for StatEntity e.g. here, but I have not looked into this in more detail.
See also https://github.com/spack/spack/pull/32699.
In file included from /opt/software/linux-ubuntu22.04-skylake/gcc-12.1.0/fmt-9.1.0-3gig6ivmaup62mkfcwlezcn2kniykdpu/include/fmt/format.h:48,
from /home/wdconinc/.spack/stage/spack-stage-gaudi-36.7-4mk4pnq4lyxy3cwgkmfx73257umgluz5/spack-src/GaudiKernel/src/Lib/Stat.cpp:14:
/opt/software/linux-ubuntu22.04-skylake/gcc-12.1.0/fmt-9.1.0-3gig6ivmaup62mkfcwlezcn2kniykdpu/include/fmt/core.h: In instantiation of 'constexpr fmt::v9::detail::value<Context> fmt::v9::detail::make_value(T&&) [with Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; T = StatEntity&]':
/opt/software/linux-ubuntu22.04-skylake/gcc-12.1.0/fmt-9.1.0-3gig6ivmaup62mkfcwlezcn2kniykdpu/include/fmt/core.h:1777:29: required from 'constexpr fmt::v9::detail::value<Context> fmt::v9::detail::make_arg(T&&) [with bool IS_PACKED = true; Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; type <anonymous> = fmt::v9::detail::type::custom_type; T = StatEntity&; typename std::enable_if<IS_PACKED, int>::type <anonymous> = 0]'
/opt/software/linux-ubuntu22.04-skylake/gcc-12.1.0/fmt-9.1.0-3gig6ivmaup62mkfcwlezcn2kniykdpu/include/fmt/core.h:1901:77: required from 'constexpr fmt::v9::format_arg_store<Context, Args>::format_arg_store(T&& ...) [with T = {StatEntity&}; Context = fmt::v9::basic_format_context<fmt::v9::appender, char>; Args = {StatEntity}]'
/opt/software/linux-ubuntu22.04-skylake/gcc-12.1.0/fmt-9.1.0-3gig6ivmaup62mkfcwlezcn2kniykdpu/include/fmt/core.h:1918:31: required from 'constexpr fmt::v9::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<Args>::type>::type ...> fmt::v9::make_format_args(Args&& ...) [with Context = basic_format_context<appender, char>; Args = {StatEntity&}]'
/opt/software/linux-ubuntu22.04-skylake/gcc-12.1.0/fmt-9.1.0-3gig6ivmaup62mkfcwlezcn2kniykdpu/include/fmt/core.h:3206:44: required from 'std::string fmt::v9::format(format_string<T ...>, T&& ...) [with T = {StatEntity&}; std::string = std::__cxx11::basic_string<char>; format_string<T ...> = basic_format_string<char, StatEntity&>]'
/home/wdconinc/.spack/stage/spack-stage-gaudi-36.7-4mk4pnq4lyxy3cwgkmfx73257umgluz5/spack-src/GaudiKernel/src/Lib/Stat.cpp:95:50: required from here
/opt/software/linux-ubuntu22.04-skylake/gcc-12.1.0/fmt-9.1.0-3gig6ivmaup62mkfcwlezcn2kniykdpu/include/fmt/core.h:1757:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
1757 | formattable,
| ^~~~~~~~~~~
/opt/software/linux-ubuntu22.04-skylake/gcc-12.1.0/fmt-9.1.0-3gig6ivmaup62mkfcwlezcn2kniykdpu/include/fmt/core.h:1757:7: note: 'formattable' evaluates to false
make[2]: *** [GaudiKernel/CMakeFiles/GaudiKernel.dir/build.make:1367: GaudiKernel/CMakeFiles/GaudiKernel.dir/src/Lib/Stat.cpp.o] Error 1
make[2]: Leaving directory '/home/wdconinc/.spack/stage/spack-stage-gaudi-36.7-4mk4pnq4lyxy3cwgkmfx73257umgluz5/spack-build-4mk4pnq'
make[1]: *** [CMakeFiles/Makefile2:1590: GaudiKernel/CMakeFiles/GaudiKernel.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Edited by Valentin Volkl