rizsotto / Bear

Bear is a tool that generates a compilation database for clang tooling.
GNU General Public License v3.0
4.96k stars 321 forks source link

Build problem with fmtlib 11 #592

Closed 0-wiz-0 closed 1 month ago

0-wiz-0 commented 2 months ago

When compiling Bear 3.1.4 with fmtlib 11.0.2, the build fails with:

In file included from Bear-3.1.4/source/citnames/source/semantic/Parsers.cc:20:
Bear-3.1.4/source/citnames/source/semantic/Parsers.h: In lambda function:
Bear-3.1.4/source/citnames/source/semantic/Parsers.h:255:73: error: 'join' is not a member of 'fmt'
  255 |                             fmt::format("Failed to recognize: {}", fmt::join(remainder.begin(), remainder.end(), ", "))
      |                                                                         ^~~~

and

Bear-3.1.4/source/citnames/source/semantic/Semantic.cc: In member function 'virtual std::ostream& cs::semantic::Compile::operator<<(std::ostream&) const':
Bear-3.1.4/source/citnames/source/semantic/Semantic.cc:96:56: error: 'join' is not a member of 'fmt'
   96 |             << ", flags: " << fmt::format("[{}]", fmt::join(flags.begin(), flags.end(), ", "))
      |                                                        ^~~~                                                                                                          
Bear-3.1.4/source/citnames/source/semantic/Semantic.cc:97:58: error: 'join' is not a member of 'fmt'
   97 |             << ", sources: " << fmt::format("[{}]", fmt::join(sources.begin(), sources.end(), ", "))
      |                                                          ^~~~

I have no fix yet, and I didn't see a corresponding commit in the Bear repository.

carlsmedstad commented 1 month ago

This has been fixed - the master branch builds with fmt v11 since https://github.com/rizsotto/Bear/commit/8afeafe61299c87449023d63336389f159b55808.

0-wiz-0 commented 1 month ago

Yes, this is fixed, thanks. I have a different problem now, but I think that's between grpc and abseil:

ld: /scratch/wip/Bear/work/.buildlink/lib/libgrpc.so: undefined reference to `grpc_core::MakeDirectoryReader(absl::lts_20240722::string_view)'