GithubHelp home page GithubHelp logo

Comments (12)

feng-qi avatar feng-qi commented on September 26, 2024

I had the same problem when building in a Ubuntu 22.04.4 container.

And cmake found this protobuf library:

-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so (found version "3.12.4")

from autofdo.

michaelrun avatar michaelrun commented on September 26, 2024

I encountered this issue too, tried both 'master' and 'v0.20', both failed

from autofdo.

erozenfeld avatar erozenfeld commented on September 26, 2024

@shenhanc78 @dhoekwater After recent changes (most likely the submodule perf_data_converter update) the build fails both on Ubuntu 20.04 and 22.04. It looks like the latest protoc and libprotobuf.so available on those versions of Ubuntu is not compatible with the version of perf_data_converter this repo is including as a submodule. What's the proper way to fix this?

[2/279] Building CXX object CMakeFiles/quipper_perf.dir/third_party/perf_data_converter/src/quipper/perf_serializer.cc.o
FAILED: CMakeFiles/quipper_perf.dir/third_party/perf_data_converter/src/quipper/perf_serializer.cc.o
/usr/bin/c++  -I/home/erozen/autofdo/third_party/perf_data_converter/src -I/home/erozen/autofdo/third_party/perf_data_converter/src/quipper -I/home/erozen/autofdo -I/home/erozen/autofdo/third_party/glog/src -I/home/erozen/autofdo/third_party/abseil -I/home/erozen/autofdo/util -I/home/erozen/autofdo/build_debug -I/home/erozen/autofdo/build_debug/third_party/glog -g -std=gnu++17 -MD -MT CMakeFiles/quipper_perf.dir/third_party/perf_data_converter/src/quipper/perf_serializer.cc.o -MF CMakeFiles/quipper_perf.dir/third_party/perf_data_converter/src/quipper/perf_serializer.cc.o.d -o CMakeFiles/quipper_perf.dir/third_party/perf_data_converter/src/quipper/perf_serializer.cc.o -c /home/erozen/autofdo/third_party/perf_data_converter/src/quipper/perf_serializer.cc
/home/erozen/autofdo/third_party/perf_data_converter/src/quipper/perf_serializer.cc: In member function ‘bool quipper::PerfSerializer::SerializeHybridTopologyMetadata(const quipper::PerfHybridTopologyMetadata&, quipper::PerfDataProto_PerfHybridTopologyMetadata*) const’:
/home/erozen/autofdo/third_party/perf_data_converter/src/quipper/perf_serializer.cc:1453:39: error: ‘class google::protobuf::RepeatedField<unsigned int>’ has no member named ‘Assign’
 1453 |   proto_metadata->mutable_cpu_list()->Assign(metadata.cpu_list.begin(),
      |                                       ^~~~~~
[11/279] Building CXX object CMakeFiles/dump_gcov_lib.dir/symbol_map.cc.o
ninja: build stopped: subcommand failed.

from autofdo.

dinyy avatar dinyy commented on September 26, 2024

I encountered this issue too , has anyone solved this issue as well?

from autofdo.

snehasish avatar snehasish commented on September 26, 2024

@erozenfeld

What's the proper way to fix this?

Discussed this with @dhoekwater and he will look into bundling the appropriate version of protobuf as a submodule.

from autofdo.

dhoekwater avatar dhoekwater commented on September 26, 2024

I'll take a look and see if we can use older versions of some dependencies to get the same functionality.

If not, we can bundle necessary dependencies. Failing that, I'll update the cmake to give more descriptive errors.

from autofdo.

dhoekwater avatar dhoekwater commented on September 26, 2024

Unfortunately, it looks like the protobuf dependency was updated from 3.19.x to 3.20.1 in 261b96f, just two commits before the most recent fix to SPE decoder in b665ece (I suppose this means that any version prior to 3.19.x was already out of date, but that's on us as maintainers to clearly communicate).

Thankfully, none of the intermediate commits change the way they interact with the proto library; the breaking change was introduced in d95f790, so we should be fine downgrading our dependency to any time before then. I'll try that now.

from autofdo.

snehasish avatar snehasish commented on September 26, 2024

This should be fixed in #197 and released as 0.20.1.

Thanks for the quick fix @dhoekwater !

from autofdo.

dhoekwater avatar dhoekwater commented on September 26, 2024

No problem, thanks for the review!

from autofdo.

algrant-arm avatar algrant-arm commented on September 26, 2024

Apologies but I'm still struggling with this. With a clean checkout and following the "build with LLVM" commands in the README, cmake prints

-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    WITH_LLVM

then the build fails:

ninja: Entering directory `Build'
[20/2580] Building CXX object CMakeFiles/perfdata_reader.dir/perfdata_reader.cc.o
FAILED: CMakeFiles/perfdata_reader.dir/perfdata_reader.cc.o
/usr/bin/c++ -DHAVE_LLVM=1 -I/home/agrant/build/autofdo/autofdo -I/home/agrant/build/autofdo/autofdo/third_party/glog/src -I/home/agrant/build/autofdo/autofdo/third_party/abseil -I/home/agrant/build/autofdo/autofdo/third_party/llvm-project/llvm/include -I/home/agrant/build/autofdo/autofdo/third_party/perf_data_converter/src -I/home/agrant/build/autofdo/autofdo/third_party/perf_data_converter/src/quipper -I/home/agrant/build/autofdo/Build -I/home/agrant/build/autofdo/Build/third_party/glog -I/home/agrant/build/autofdo/Build/third_party/llvm-project/llvm/include -I/home/agrant/build/autofdo/autofdo/third_party/googletest/googletest/include -I/home/agrant/build/autofdo/autofdo/third_party/googletest/googlemock/include -I/home/agrant/build/autofdo/autofdo/util/regexp -O3 -DNDEBUG -std=gnu++17 -MD -MT CMakeFiles/perfdata_reader.dir/perfdata_reader.cc.o -MF CMakeFiles/perfdata_reader.dir/perfdata_reader.cc.o.d -o CMakeFiles/perfdata_reader.dir/perfdata_reader.cc.o -c /home/agrant/build/autofdo/autofdo/perfdata_reader.cc
In file included from /home/agrant/build/autofdo/autofdo/perfdata_reader.cc:16:
/home/agrant/build/autofdo/autofdo/spe_tid_pid_provider.h:14:10: fatal error: google/protobuf/repeated_ptr_field.h: No such file or directory
   14 | #include "google/protobuf/repeated_ptr_field.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

apt reports

libprotobuf-dev is already the newest version (3.6.1.3-2ubuntu5.2).

from autofdo.

dhoekwater avatar dhoekwater commented on September 26, 2024

Looks like the breakage is due to RepeatedPtrField being separated into its own header in v3.19.0. We should be able to fix this one by making the function take an absl::span<quipper::PerfDataProto_PerfEvent*> instead of a const RepeatedPtrField<quipper::PerfDataProto_PerfEvent>&. I'll have to plumb this through a couple places, which I'll get to in the next couple days.

This change does put us a bit further out of sync with the internal version. That's fine for AutoFDO, but once we split Propeller tooling into its own repository, it will probably have a more recent version of google/protobuf as a dependency.

from autofdo.

dhoekwater avatar dhoekwater commented on September 26, 2024

Since repeated_field.h transitively includes repeated_ptr_field in newer versions, swapping the header we include is sufficient.

#197 fixed the breakage for stock builds (non-LLVM), and #200 fixes it for WITH_LLVM builds.

from autofdo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.