Tencent / TNN

TNN: developed by Tencent Youtu Lab and Guangying Lab, a uniform deep learning inference framework for mobile、desktop and server. TNN is distinguished by several outstanding features, including its cross-platform capability, high performance, model compression and code pruning. Based on ncnn and Rapidnet, TNN further strengthens the support and performance optimization for mobile devices, and also draws on the advantages of good extensibility and high performance from existed open source efforts. TNN has been deployed in multiple Apps from Tencent, such as Mobile QQ, Weishi, Pitu, etc. Contributions are welcome to work in collaborative with us and make TNN a better framework.
Other
4.37k stars 765 forks source link

[Compilation issue] #1962

Open meerfrau opened 10 months ago

meerfrau commented 10 months ago

There are compilation issues against abseil-cpp 20230802 (trunkated):

./TNN/build/tools/onnx2tnn/onnx-converter/onnx.pb.h:4987:34:   required from here
/usr/include/google/protobuf/arena.h:318:5: error: no matching function for call to 'absl::lts_20230802::log_internal::LogMessageFatal::LogMessageFatal(const char [37], int, std::string&)'
  318 |     ABSL_CHECK_LE(num_elements, std::numeric_limits<size_t>::max() / sizeof(T))
      |     ^~~~~~~~~~~~~
/usr/include/absl/log/internal/log_message.h:357:3: note: candidate: 'absl::lts_20230802::log_internal::LogMessageFatal::LogMessageFatal(const char*, int, int)'
  357 |   LogMessageFatal(const char* file, int line,
      |   ^~~~~~~~~~~~~~~
/usr/include/absl/log/internal/log_message.h:358:37: note:   no known conversion for argument 3 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  358 |                   absl::string_view failure_msg) ABSL_ATTRIBUTE_COLD;
      |                   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/usr/include/absl/log/internal/log_message.h:356:3: note: candidate: 'absl::lts_20230802::log_internal::LogMessageFatal::LogMessageFatal(const char*, int)'
  356 |   LogMessageFatal(const char* file, int line) ABSL_ATTRIBUTE_COLD;
      |   ^~~~~~~~~~~~~~~
/usr/include/absl/log/internal/log_message.h:356:3: note:   candidate expects 2 arguments, 3 provided
/usr/include/absl/strings/cord.h: In instantiation of 'H absl::lts_20230802::Cord::HashFragmented(H) const [with H = absl::lts_20230802::hash_internal::MixingHashState]':
/usr/include/absl/strings/cord.h:783:28:   required from 'H absl::lts_20230802::AbslHashValue(H, const Cord&) [with H = hash_internal::MixingHashState]'
/usr/include/absl/hash/internal/hash.h:891:27:   required from 'static absl::lts_20230802::enable_if_t<std::is_same<H, decltype (absl::lts_20230802::hash_internal::AbslHashValue(std::move(state), value))>::value, H> absl::lts_20230802::hash_internal::HashSelect::HashValueProbe::Invoke(H, const T&) [with H = absl::lts_20230802::hash_internal::MixingHashState; T = absl::lts_20230802::Cord; absl::lts_20230802::enable_if_t<std::is_same<H, decltype (absl::lts_20230802::hash_internal::AbslHashValue(std::move(state), value))>::value, H> = absl::lts_20230802::hash_internal::MixingHashState; decltype (absl::lts_20230802::hash_internal::AbslHashValue(std::move(state), value)) = absl::lts_20230802::hash_internal::MixingHashState]'
/usr/include/absl/hash/internal/hash.h:1264:73:   required from 'static H absl::lts_20230802::hash_internal::HashStateBase<H>::combine(H, const T&, const Ts& ...) [with T = absl::lts_20230802::Cord; Ts = {}; H = absl::lts_20230802::hash_internal::MixingHashState]'
/usr/include/absl/hash/internal/hash.h:999:39:   required from 'static size_t absl::lts_20230802::hash_internal::MixingHashState::hash(const T&) [with T = absl::lts_20230802::Cord; typename std::enable_if<(! absl::lts_20230802::conjunction<std::is_integral<_Tp>, absl::lts_20230802::hash_internal::is_uniquely_represented<T, void> >::value), int>::type <anonymous> = 0; size_t = long unsigned int]'
/usr/include/absl/hash/internal/hash.h:1253:33:   required from 'size_t absl::lts_20230802::hash_internal::HashImpl<T>::operator()(const T&) const [with T = absl::lts_20230802::Cord; size_t = long unsigned int]'
/usr/include/absl/container/internal/hash_function_defaults.h:81:36:   required from here
/usr/include/absl/strings/cord.h:1020:18: error: cannot convert 'absl::lts_20230802::Cord::HashFragmented<absl::lts_20230802::hash_internal::MixingHashState>(absl::lts_20230802::hash_internal::MixingHashState) const::<lambda(int)>' to 'int'
 1020 |     ForEachChunk([&combiner, &hash_state](absl::string_view chunk) {
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                  |
      |                  absl::lts_20230802::Cord::HashFragmented<absl::lts_20230802::hash_internal::MixingHashState>(absl::lts_20230802::hash_internal::MixingHashState) const::<lambda(int)>
 1021 |       hash_state = combiner.add_buffer(std::move(hash_state), chunk.data(),
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1022 |                                        chunk.size());
      |                                        ~~~~~~~~~~~~~~
 1023 |     });
      |     ~             
/usr/include/absl/strings/cord.h:1591:48: note:   initializing argument 1 of 'void absl::lts_20230802::Cord::ForEachChunk(int) const'
 1591 |     absl::FunctionRef<void(absl::string_view)> callback) const {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~