gccg++protocol-buffersgem5

can't build gem5 because of "undefined reference" warnings


I tried to build gem5 on ubuntu 16.04, but I faced the following warnings and building terminated: (I only put one of them here:)

/usr/include/google/protobuf/generated_message_util.h:80: undefined reference to `google::protobuf::internal::empty_string_'

I used gcc-4.8.5 and g++-4.8.5 and libprotoc-2.6.1


Solution

  • Before building gem5, ensure you're using compatible dependencies, as listed in the official documentation: https://www.gem5.org/documentation/general_docs/building

    Your gcc version is unsupported (too old). Your protobuf version is supported.

    Try upgrading your gcc version to at least GCC 7. This is not directly available from Ubuntu 16.04, but you will find different alternative ways of installing it in the web, including building it from source. Otherwise, use a more recent Ubuntu version.