You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this might be an issue with how Abseil is configured in your system.
Both protobuf and utf8_range use absl::string_view in their APIs.
Abseil itself has a configuration where you can make absl::string_view be an alias to std::string_view.
From the linker error I think the protobuf library is built with the aliasing on (which is why it is looking for IsStructurallyValid(std::string_view)), but the utf8_range library has it off.
By default Abseil will autodetect the presence of std::string_view and alias if it is there.
However, this means that if you try to mix libraries built with different configs (eg one at C++14 and one at C++17) you might get conflicting answers. For those cases, you should manually specify -DABSL_OPTION_USE_STD_STRING_VIEW=0 on all builds to make sure they all agree.
I build brpc(https://github.com/apache/brpc) and meet the following when It link protobuf:
My protobuf version is 'tags/v4.25.0' and I use the following command to build my protobuf:
When I built out the 'libprotobuf.a', I checked my protobuf has already linked 'utf8_validity':
But why It stills report: undefined reference to `utf8_range::IsStructurallyValid(std::basic_string_view<char, std::char_traits >)'
Can anyone help me ?
The text was updated successfully, but these errors were encountered: