Open3D icon indicating copy to clipboard operation
Open3D copied to clipboard

Build error with fmt 8.0.1

Open adamjstewart opened this issue 3 years ago • 1 comments

Describe the bug

When I try to build with an external installation of fmt 8.0.1, I encounter a compilation issue.

To Reproduce Steps to reproduce the behavior:

$ mkdir build
$ cd build
$ cmake .. -DUSE_SYSTEM_FMT
...
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/filament/FilamentEntitiesMods.cpp:27:
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/filament/FilamentEntitiesMods.h:31:
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/MaterialModifier.h:31:
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/RendererHandle.h:41:
In file included from /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/format.h:44:
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/core.h:1567:3: error: static_assert failed due to requirement '!std::is_same<const fmt::v8::detail::unformattable &, const fmt::v8::detail::unformattable &>::value' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt"
  static_assert(
  ^
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/core.h:1692:23: note: in instantiation of function template specialization 'fmt::v8::detail::make_arg<true, fmt::v8::basic_format_context<fmt::v8::appender, char>, fmt::v8::detail::type::custom_type, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::MaterialInstance>, 0>' requested here
        data_{detail::make_arg<
                      ^
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/core.h:1710:10: note: in instantiation of member function 'fmt::v8::format_arg_store<fmt::v8::basic_format_context<fmt::v8::appender, char>, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::MaterialInstance>, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::Texture>, const char *>::format_arg_store' requested here
  return {args...};
         ^
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/utility/Console.h:201:45: note: in instantiation of function template specialization 'fmt::v8::make_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char>, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::MaterialInstance>, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::Texture>, const char *>' requested here
                                       fmt::make_format_args(args...));
                                            ^
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/filament/FilamentEntitiesMods.cpp:212:22: note: in instantiation of function template specialization 'open3d::utility::Logger::_LogWarning<open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::MaterialInstance> &, const open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::Texture> &, const char *&>' requested here
            utility::LogWarning(
                     ^
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/utility/Console.h:96:13: note: expanded from macro 'LogWarning'
    Logger::_LogWarning(__FILE__, __LINE__, (const char *)__FN__, false, \
            ^
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/filament/FilamentEntitiesMods.cpp:27:
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/filament/FilamentEntitiesMods.h:31:
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/MaterialModifier.h:31:
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/RendererHandle.h:41:
In file included from /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/format.h:44:
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/core.h:1567:3: error: static_assert failed due to requirement '!std::is_same<const fmt::v8::detail::unformattable &, const fmt::v8::detail::unformattable &>::value' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt"
  static_assert(
  ^
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/core.h:1692:23: note: in instantiation of function template specialization 'fmt::v8::detail::make_arg<true, fmt::v8::basic_format_context<fmt::v8::appender, char>, fmt::v8::detail::type::custom_type, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::Texture>, 0>' requested here
        data_{detail::make_arg<
                      ^
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/core.h:1710:10: note: in instantiation of member function 'fmt::v8::format_arg_store<fmt::v8::basic_format_context<fmt::v8::appender, char>, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::MaterialInstance>, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::Texture>, const char *>::format_arg_store' requested here
  return {args...};
         ^
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/utility/Console.h:201:45: note: in instantiation of function template specialization 'fmt::v8::make_format_args<fmt::v8::basic_format_context<fmt::v8::appender, char>, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::MaterialInstance>, open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::Texture>, const char *>' requested here
                                       fmt::make_format_args(args...));
                                            ^
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/filament/FilamentEntitiesMods.cpp:212:22: note: in instantiation of function template specialization 'open3d::utility::Logger::_LogWarning<open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::MaterialInstance> &, const open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::Texture> &, const char *&>' requested here
            utility::LogWarning(
                     ^
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/utility/Console.h:96:13: note: expanded from macro 'LogWarning'
    Logger::_LogWarning(__FILE__, __LINE__, (const char *)__FN__, false, \
            ^
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/filament/FilamentEntitiesMods.cpp:27:
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/filament/FilamentEntitiesMods.h:31:
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/MaterialModifier.h:31:
In file included from /var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/RendererHandle.h:41:
In file included from /Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/format.h:44:
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/core.h:1184:15: error: call to deleted constructor of 'fmt::v8::detail::fallback_formatter<fmt::v8::detail::unformattable, char, void>'
    Formatter f;
              ^
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/core.h:1172:21: note: in instantiation of function template specialization 'fmt::v8::detail::value<fmt::v8::basic_format_context<fmt::v8::appender, char> >::format_custom_arg<fmt::v8::detail::unformattable, fmt::v8::detail::fallback_formatter<fmt::v8::detail::unformattable, char, void> >' requested here
    custom.format = format_custom_arg<
                    ^
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/visualization/rendering/filament/FilamentEntitiesMods.cpp:212:22: note: in instantiation of function template specialization 'open3d::utility::Logger::_LogWarning<open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::MaterialInstance> &, const open3d::visualization::rendering::REHandle<open3d::visualization::rendering::EntityType::Texture> &, const char *&>' requested here
            utility::LogWarning(
                     ^
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-open3d-0.13.0-ue4nzmmyq3acgp2w5oawbreyrm6teax3/spack-src/cpp/open3d/utility/Console.h:96:13: note: expanded from macro 'LogWarning'
    Logger::_LogWarning(__FILE__, __LINE__, (const char *)__FN__, false, \
            ^
/Users/Adam/spack/opt/spack/darwin-catalina-ivybridge/apple-clang-12.0.0/fmt-8.0.1-r54zelfmmeuvgknv2a2y3kiupvsro6vm/include/fmt/core.h:963:3: note: 'fallback_formatter' has been explicitly marked deleted here
  fallback_formatter() = delete;
  ^
3 errors generated.
make[2]: *** [cpp/open3d/visualization/CMakeFiles/visualization.dir/rendering/filament/FilamentEntitiesMods.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [cpp/open3d/visualization/CMakeFiles/visualization.dir/all] Error 2
make: *** [all] Error 2

Expected behavior

I would expect compilation to succeed.

Environment (please complete the following information):

  • Operating system: macOS 10.15.7
  • Python version: Python 3.8.12
  • Open3D version: 0.13.0
  • Is this remote workstation?: no
  • How did you install Open3D?: from source
  • Compiler version (if built from source): Apple Clang 12.0.0

Additional context

Useful build logs:

adamjstewart avatar Dec 01 '21 05:12 adamjstewart

Fixed by #5303

ssheorey avatar Jul 12 '22 22:07 ssheorey