Protocol buffers version mismatch in qt on macOS #14751

issue Varunram opened this issue on November 18, 2018
  1. Varunram commented at 10:09 AM on November 18, 2018: contributor

    Trying to ./configure and then make. Getting

    ./qt/paymentrequest.pb.h:17:2: error: This file was generated by an older version of protoc which is
    #error This file was generated by an older version of protoc which is
     ^
    ./qt/paymentrequest.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
    #error incompatible with your Protocol Buffer headers.  Please
     ^
    ./qt/paymentrequest.pb.h:19:2: error: regenerate this file with a newer version of protoc.
    #error regenerate this file with a newer version of protoc.
     ^
    ./qt/paymentrequest.pb.h:131:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:131:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:259:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:259:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:465:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:465:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:648:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:648:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:771:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:771:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:943:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:943:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    15 errors generated.
    make[2]: *** [qt/libbitcoinqt_a-bitcoingui.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    In file included from qt/guiutil.cpp:10:
    In file included from ./qt/walletmodel.h:18:
    In file included from ./qt/paymentrequestplus.h:10:
    ./qt/paymentrequest.pb.h:17:2: error: This file was generated by an older version of protoc which is
    #error This file was generated by an older version of protoc which is
     ^
    ./qt/paymentrequest.pb.h:18:2: error: incompatible with your Protocol Buffer headers. Please
    #error incompatible with your Protocol Buffer headers.  Please
     ^
    ./qt/paymentrequest.pb.h:19:2: error: regenerate this file with a newer version of protoc.
    #error regenerate this file with a newer version of protoc.
     ^
    ./qt/paymentrequest.pb.h:131:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:131:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:259:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:259:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:465:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:465:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:648:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:648:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:771:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:771:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    ./qt/paymentrequest.pb.h:943:10: error: unknown type name 'PROTOBUF_CONSTEXPR'
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
             ^
    ./qt/paymentrequest.pb.h:943:29: error: expected member name or ';' after declaration specifiers
      static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    

    Relevant / Helpful info:

    protoc --version
    libprotoc 3.6.1
    

    Build works just fine if I add the NO_QT flag (which I guess is expected since the protobuf thing is in qt)

  2. fanquake added the label macOS on Nov 18, 2018
  3. fanquake commented at 10:12 AM on November 18, 2018: member

    Try a ‘make clean’, and re-run autogen, configure and make.

  4. Varunram commented at 10:20 AM on November 18, 2018: contributor

    Thanks @fanquake! I was confused reading the error log, maybe if something like

    error: This file was generated by an older version of protoc or generated long ago. Please run make clean to start again
    

    was printed, would've be more explanative. Thanks and sorry!

  5. Varunram closed this on Nov 18, 2018

  6. MarcoFalke locked this on Sep 8, 2021
Contributors
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me