root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.63k stars 1.26k forks source link

tmva/sofie_parsers does not build with latest Protobuf (22.x) #12770

Closed jan-busa closed 5 months ago

jan-busa commented 1 year ago

When building latest ROOT (6.28.02) with latest Protobuf 22.4 tmva/sofie_parsers build fails during linking step with errors of the type:

x86_64-unknown-linux-gnu/bin/ld: ... undefined reference to `absl::lts_20230125::log_internal::LogMessage::OstreamView::~OstreamView()...
x86_64-unknown-linux-gnu/bin/ld: ... undefined reference to `absl::lts_20230125::Mutex::~Mutex()'
x86_64-unknown-linux-gnu/bin/ld: ... undefined reference to `utf8_range::IsStructurallyValid(...

The problem seems to be caused by adding new dependency of Protobuf on Abseil in Protobuf 22.x (https://protobuf.dev/news/2022-08-03/). To make the code build I needed to: Add in file cmake/modules/SearchInstalledSoftware.cmake after line

  find_package(Protobuf)

lines (probably this should be dependent on version of Protobuf)

  find_package(absl REQUIRED)
  find_package(utf8_range REQUIRED)

In file tmva/sofie_parsers/CMakeLists.txt add inside linking after line

    ${Protobuf_LIBRARIES}

lines

    absl::str_format_internal
    absl::log_internal_message
    absl::hash
    absl::flat_hash_set
    absl::log_internal_check_op
    utf8_range::utf8_validity
jan-busa commented 1 year ago

With the latest abseil (20230802.0) three new libraries need to be added during linking

absl::log_internal_conditions
absl::status
absl::statusor
dpiparo commented 7 months ago

Dear @jan-busa , @lmoneta : it is not clear to me from the conversation if this is still an issue. If not, can this be closed?

jan-busa commented 7 months ago

Dear @dpiparo, I haven't checked for a while but it seems, that this issue has been fixed by #14144. I will test it and let you know later today/tomorrow in the morning.

jan-busa commented 7 months ago

Sorry, it took so long. As I see, the issue has been fixed in master, but still persists in the latest ("release") versions 6.28.12 and 6.30.04 so I'm not sure, should it be closed or no. For me both variants are OK.

guitargeek commented 5 months ago

Thanks for reporting back!

We close the issues once they are fixed in master and any path release branches that we need to make backports for to support important usecases. I don't think that's necessary here.