Trivial / Doc: Update mac os build instructions #13760

pull renepickhardt wants to merge 1 commits into bitcoin:master from renepickhardt:master changing 1 files +1 −1
  1. renepickhardt commented at 5:20 PM on July 25, 2018: none

    I changed protobuf brew dependancy to protobuf260 because on mac os high sierra brew install protobuf will install protobuf 3.6.0 which is incompatible resulting in

    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
     ^
    

    while running make

    Sorry it is my first PR to bitcoin so I hope I followed your guidlines correctly (:

  2. Update mac os build instructions
    changed protobuf brew dependancy to protobuf260 because on mac os high sierra brew install protobuf will install protobuf 3.6.0 which is incompatible resulting in  
    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
     ^
    while running make
    f6d7538d90
  3. MarcoFalke added this to the milestone 0.17.0 on Jul 25, 2018
  4. MarcoFalke added the label Build system on Jul 25, 2018
  5. fanquake commented at 11:43 PM on July 25, 2018: member

    Protobuf 3.6.x should work fine. Make sure you run a make clean before trying to compile again.

  6. renepickhardt commented at 9:55 AM on July 26, 2018: none

    I think I ran make clean before I downgraded protobuf. I only came to the idea of downgrading after reading this document https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md (which was linked from the installation manual) specifying a lower protobuf version. I don't know if the protobuf problem is specific to the version of macOS which I am running (I guess not).

    How are versions of dependencies tracked in general?

  7. jonasschnelli commented at 9:57 AM on July 26, 2018: contributor

    @renepickhardt Can you give us more info about your problem with protobuf. Installing a specific version sounds not ideal,...

  8. renepickhardt commented at 11:54 AM on July 26, 2018: none

    not sure what exactly you need from me. I gave you some of the output of make. I can give you the rest:

    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 =
     ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    15 errors generated.
    make[2]: *** [qt/bitcoin_qt-bitcoin.o] Error 1
    make[1]: *** [install-recursive] Error 1
    make: *** [install-recursive] Error 1
    [1]+  Exit 2                  make
    

    on the other side using a specific version is as far as I understand what is usually being done to fix the API and make sure the dependancy works. I could be wrong since you might have other processes here. but also the referenced bitcoin doc stated it should be protobuf 2.6.3.

    on the other side I looked up my logfiles. there was also a QT warning:

    Renes-iMac:eclipse-workspace rpickhardt$ brew install \
    > berkeley-db4 boost miniupnpc openssl pkg-config protobuf qt libevent
    Updating Homebrew...
    ==> Auto-updated Homebrew!
    Updated 2 taps (homebrew/cask, homebrew/core).
    ==> New Formulae
    prettier
    ==> Updated Formulae
    libpng ✔               ballerina              etcd                   firebase-cli           fruit                  goreleaser             hugo                   libmagic               pgplot                 sratoolkit             syncthing              utf8proc               wabt
    annie                  citus                  file-formula           fluent-bit             gnome-latex            grafana                kompose                nginx                  pony-stable            swiftformat            uhd                    vips
    
    Warning: berkeley-db@4 4.8.30 is already installed and up-to-date
    To reinstall 4.8.30, run `brew reinstall berkeley-db@4`
    Warning: boost 1.67.0_1 is already installed and up-to-date
    To reinstall 1.67.0_1, run `brew reinstall boost`
    Warning: miniupnpc 2.1 is already installed and up-to-date
    To reinstall 2.1, run `brew reinstall miniupnpc`
    Warning: openssl 1.0.2o_2 is already installed and up-to-date
    To reinstall 1.0.2o_2, run `brew reinstall openssl`
    Warning: pkg-config 0.29.2 is already installed and up-to-date
    To reinstall 0.29.2, run `brew reinstall pkg-config`
    Warning: protobuf 3.6.0 is already installed and up-to-date
    To reinstall 3.6.0, run `brew reinstall protobuf`
    Error: qt 5.10.1 is already installed
    To upgrade to 5.11.1, run `brew upgrade qt`
    Warning: libevent 2.1.8 is already installed and up-to-date
    To reinstall 2.1.8, run `brew reinstall libevent`
    

    since the error took place in qt I might have been able to upgrade QT and stay with protobuf 3.6.0 in that case the docs should be adapted however

  9. fanquake commented at 1:58 PM on July 26, 2018: member

    @renepickhardt From what I can see, protobuf260 will never actually be picked up by ./configure, as it's keg only. So I'm not 100% sure how installing it could be solving the issue?

    See the output from brew info protobuf260:

    This formula is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula.

    If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/protobuf@2.6/bin:$PATH"' >> ~/.bash_profile

    For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/protobuf@2.6/lib CPPFLAGS: -I/usr/local/opt/protobuf@2.6/include For pkg-config to find this software you may need to set: PKG_CONFIG_PATH: /usr/local/opt/protobuf@2.6/lib/pkgconfig

    From my quick test of unlinking protobuf and installing protobuf260, when I run configure I see:

    checking for protobuf... no
    configure: WARNING: libprotobuf not found; bitcoin-qt frontend will not be built
    

    If we were going to "downgrade" to 2.6.x, we'd at least need to pass the --c++11 flag, as we had done previously in the macOS build instructions.

    I'm fairly sure that this is a local issue, and that if you uninstall protobuf260, reinstall protobuf, do a git clean -fx and then run ./autogen.sh and ./configure you shouldn't have a problem.

    As for

    but also the referenced bitcoin doc stated it should be protobuf 2.6.3.

    Protobuf 2.6.3 is just the version currently used in depends. It is likely not the actual minimum version required, and is definitely not the maximum version supported when compiling Core.

  10. MarcoFalke removed this from the milestone 0.17.0 on Jul 29, 2018
  11. fanquake commented at 5:46 AM on August 4, 2018: member

    Closing for now. @renepickhardt Please open a new issue once you've confirmed this isn't a local problem, and have some steps to reproduce.

  12. fanquake closed this on Aug 4, 2018

  13. DrahtBot locked this on Sep 8, 2021

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-05-01 15:15 UTC

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