docs: Add info about factors that affect dependency list #15222

pull merland wants to merge 1 commits into bitcoin:master from merland:patch-2 changing 1 files +16 −0
  1. merland commented at 11:24 AM on January 21, 2019: contributor

    To simplify build instructions, the librsvg formula should be moved to the main brew install ... command, in my opinion. It is not a big problem to install a single extra formula, and it will only be unused for some users.

    An additional reason for this change is that I would like to add a comment (in a future PR) about making sure you have the latest version of all deps (in the case of preexisting formulae). That comment can be authored more clearly if this simplification PR is merged.

  2. merland renamed this:
    Simplification of macOS build instructions
    docs: Simplification of macOS build instructions
    on Jan 21, 2019
  3. matt-auckland commented at 11:28 AM on January 21, 2019: none

    ACK - looks good to me

  4. hebasto commented at 11:29 AM on January 21, 2019: member

    This PR reduces clarity of the build instructions, IMO. Slightly inclined to NACK.

  5. merland commented at 11:34 AM on January 21, 2019: contributor

    @hebasto Granted, some information is lost, but I felt it was not crucial to tell the user for what reason librsvg is needed. Do you think it is important? If so, why?

  6. fanquake added the label Docs on Jan 21, 2019
  7. hebasto commented at 11:42 AM on January 21, 2019: member

    @merland

    Do you think it is important?

    Yes.

    If so, why?

    The task of any docs is to provide a user with clear and relevant info.

  8. merland commented at 12:03 PM on January 21, 2019: contributor

    @hebasto Then maybe the instructions should state exactly why every dependency is needed? :) I think good instructions should tell you all you need to know, but nothing more. There is a link to dependencies.md for the more curious reader.

  9. Sjors commented at 5:21 PM on January 21, 2019: member

    I'm not a fan of removing this information. Currently https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md points back to the OS specific build instructions for more information. macOS instructions are far less detailed than Linux at the moment, and I've often just looked there.

    Maybe we can add a section where we briefly mention which dependencies can be avoided or added:

    • librsvg can be avoided if you don't need make deploy
    • miniupnpc can be avoided if you use ./configure --with-miniupnpc=no
    • berkeley-db4 can be avoided if you compile without wallet --disable-wallet, or you just use berkeley-db if you compile with --with-incompatible-bdb
    • protobuf can be avoided with --disable-bip70
    • qt with --disable-gui
    • when qrencode is absent, it won't add QR support, to explicitly complain in such a case: --with-qrencode
    • missing from the instructions: brew install zeromq is needed for --with-zmq

    (not sure about the others)

    I'm fine with including librsvg in the default instruction, since it's non-trivial to install the GUI without that, and I'm assuming the main target audience for these instructions are users, not developers.

  10. merland commented at 8:18 PM on January 21, 2019: contributor

    @Sjors This makes a lot of sense, thank you! Hope it's ok if I update this PR with your suggestions, adding you as co-author.

  11. laanwj commented at 12:09 PM on January 22, 2019: member

    This PR reduces clarity of the build instructions, IMO. Slightly inclined to NACK.

    Agree, it slightly reduces the information for no good reason IMO.

  12. merland force-pushed on Jan 22, 2019
  13. merland force-pushed on Jan 22, 2019
  14. merland force-pushed on Jan 22, 2019
  15. merland commented at 12:26 PM on January 22, 2019: contributor

    Updated. I added the info provided by @Sjors as a new column in doc/dependencies.md.
    What do you think?

  16. merland force-pushed on Jan 22, 2019
  17. in doc/dependencies.md:8 in 8928375dc0 outdated
      28 | -| xkbcommon |  |  |  |  | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L86) (Linux only) |
      29 | -| ZeroMQ | [4.3.1](https://github.com/zeromq/libzmq/releases) | 4.0.0 | No |  |  |
      30 | -| zlib | [1.2.11](https://zlib.net/) |  |  |  | No |
      31 | +| Dependency | Version used | Minimum required | CVEs | Shared | [Bundled Qt library](https://doc.qt.io/qt-5/configure-options.html#third-party-libraries) |Notes|
      32 | +| --- | --- | --- | --- | --- | --- | --- |
      33 | +| Berkeley DB | [4.8.30](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No |  |  |Not needed if you compile with `--disable-wallet`, or `--with-incompatible-bdb`|
    


    hebasto commented at 1:18 PM on January 22, 2019:

    Building with --with-incompatible-bdb option does not make Berkeley DB dependency unneeded.


    merland commented at 1:27 PM on January 22, 2019:

    Ok, thanks @hebasto. Did I misunderstand this bullet point, @Sjors ?
    What is the best phrasing for this cell?


    hebasto commented at 1:43 PM on January 22, 2019:

    @merland

    From Ubuntu & Debian Dependency Build Instructions:

    Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install BerkeleyDB 5.1 or later. This will break binary wallet compatibility with the distributed executables, which are based on BerkeleyDB 4.8. If you do not care about wallet compatibility, pass --with-incompatible-bdb to configure.

  18. DrahtBot commented at 1:30 PM on January 22, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #14066 (gitian-linux: Build binaries for 64-bit POWER by luke-jr)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  19. Sjors commented at 3:03 PM on January 22, 2019: member

    I don't think adding the extra column to the table in dependencies is the right approach.

    Try adding a new section at the bottom instead "Configuration options". There you can explain the effect of each --disable option on which dependencies you need.

    Regarding Berkeley DB: it's used by the wallet, so you don't need it at all if you compile with --disable-wallet. In addition, which often confuses people, the wallet is super picky about which BDB version it wants, which is why we still use 4.8. If you don't mind a potentially incompatible wallet file, then you can use newer versions too. That's when you need --with-incompatible-bdb. Again, too subtle to squeeze into a column.

    P.S. I didn't know Github integrated so well with the Co-authored-by tag (no need by the way, though it's always nice).

  20. laanwj commented at 6:30 PM on January 22, 2019: member

    Still tend toward NACK.I think it's better to keep this information where it is and can be easily found.

  21. merland commented at 7:27 PM on January 22, 2019: contributor

    Thanks for weighing in, @laanwj. I see your point. However, having a history as a technical writer (but also developer for many years), I tend to think mainly in terms of readability and simplicity for the majority of the readers.

    As @Sjors writes above, the main target audience for these instructions is probably users, not developers. As a result, I think it makes a lot of sense to think along the lines of "convention over configuration" and hide complexities wherever possible. Taking away non-crucial info can greatly improve docs like these, sometimes.

    Having said this, I admit that this PR (that started as a small simplification) may be growing over my head. I may not see the full implications of centralizing dependency info for several platforms into one place. Nonetheless, @sjors' suggestion to extend dependencies.md sure seemed like an elegant and de-duplicating doc refactoring.

  22. merland force-pushed on Jan 23, 2019
  23. merland renamed this:
    docs: Simplification of macOS build instructions
    docs: Add info about factors that affect dependency list
    on Jan 23, 2019
  24. merland commented at 9:09 AM on January 23, 2019: contributor

    Since I got some pushback against the change to simplicification of the build instructions, this PR has now "pivoted" into being about the added dependency info only. @Sjors, I intentionally omitted the info about --with-incompatible-bdb, since I think it may confuse more than it helps the majority of the readers. Also, it is documented elsewhere.

  25. in doc/dependencies.md:42 in 707a8a2370 outdated
      37 | +* **miniupnpc** is not needed with  `--with-miniupnpc=no`. 
      38 | +* **berkeley-db4** is not needed with `--disable-wallet`.
      39 | +* **protobuf** is not needed with `--disable-bip70`.
      40 | +* **qt** is not needed with `--without-gui`.
      41 | +* If the **qrencode** dependency is absent, QR support won't be added. To force an error when that happens, pass `--with-qrencode`.
      42 | +* **zeromq** is needed only with the `--with-zmq` option. 
    


    Sjors commented at 11:22 AM on January 23, 2019:

    Trailing whitespace


    merland commented at 11:48 AM on January 23, 2019:

    fixed, thanks.

  26. in doc/dependencies.md:45 in 707a8a2370 outdated
      40 | +* **qt** is not needed with `--without-gui`.
      41 | +* If the **qrencode** dependency is absent, QR support won't be added. To force an error when that happens, pass `--with-qrencode`.
      42 | +* **zeromq** is needed only with the `--with-zmq` option. 
      43 | +
      44 | +#### Other
      45 | +* **librsvg** is only needed if you need to run `make deploy`.
    


    Sjors commented at 11:25 AM on January 23, 2019:

    Nit, add: "on (cross-compliation to) macOS."


    merland commented at 11:48 AM on January 23, 2019:

    good.

  27. Sjors commented at 11:26 AM on January 23, 2019: member

    Ok, so now it's strictly adding information, which should not be controversial.

    Travis ran into a linter issue (some trailing whitespace, most code editors have an option to prevent that).

  28. merland force-pushed on Jan 23, 2019
  29. Sjors commented at 12:07 PM on January 23, 2019: member

    ACK a59529e

  30. laanwj commented at 1:13 PM on January 23, 2019: member

    utACK a59529ed2c579d015e7867eb23ba353b7a616bec looks good to me now

  31. in doc/dependencies.md:37 in a59529ed2c outdated
      32 | +Controlling dependencies
      33 | +------------------------
      34 | +Some dependencies are not needed in all configurations. The following are some factors that affect the dependency list.
      35 | +
      36 | +#### Options passed to `./configure`
      37 | +* **miniupnpc** is not needed with  `--with-miniupnpc=no`.
    


    flack commented at 1:39 PM on January 23, 2019:

    Nit: would be nice if the dependency names used the same capitalization as in the table above (MiniUPnPc, ZeroMQ, Berkeley DB, Qt).


    merland commented at 2:56 PM on January 23, 2019:

    Agreed! Will fix.

  32. Added some factors that affect the dependency list
    Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
    55e05a82cd
  33. in doc/dependencies.md:45 in a59529ed2c outdated
      40 | +* **qt** is not needed with `--without-gui`.
      41 | +* If the **qrencode** dependency is absent, QR support won't be added. To force an error when that happens, pass `--with-qrencode`.
      42 | +* **zeromq** is needed only with the `--with-zmq` option.
      43 | +
      44 | +#### Other
      45 | +* **librsvg** is only needed if you need to run `make deploy` on (cross-compliation to) macOS.
    


    flack commented at 1:40 PM on January 23, 2019:

    librsvg is not listed in the table. Should it be added?


    merland commented at 2:56 PM on January 23, 2019:

    Good catch. It was added in an earlier commit, but hence forgotten... Will update.

  34. merland force-pushed on Jan 23, 2019
  35. merland commented at 3:14 PM on January 23, 2019: contributor

    Updated after comments from @flack. If anyone knows if a certain version of librsvg is reqiured, please comment.

  36. in doc/dependencies.md:20 in 55e05a82cd
      16 | @@ -17,6 +17,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
      17 |  | libevent | [2.1.8-stable](https://github.com/libevent/libevent/releases) | 2.0.22 | No |  |  |
      18 |  | libjpeg |  |  |  |  | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L65) |
      19 |  | libpng |  |  |  |  | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk#L64) |
      20 | +| libsrvg | |  |  |  |  |
    


    Sjors commented at 3:19 PM on January 23, 2019:

    There's a bunch of CVE's for librsvg, though afaik they all involve a specially crafted SVG file. Since we don't let users open arbitrary images, I doubt they matter. So that also means we don't have to recommend a minimum version. @laanwj thoughts on what to put in the CVE column in this case (current PR leaves it blank)? Either way I think that can wait for another PR.


    Sjors commented at 3:34 PM on January 23, 2019:

    Out of an abundance of caution, I would just set the minimum to 2.41.2 which fixes the most recent CVE. It's almost a year old, which is ancient for most macOS users :-)

    However it seems our macOS Gitian build would then be in violation of that, since Bionic is still at 2.40, and they don't even list this CVE in their tracker.


    laanwj commented at 3:39 PM on January 24, 2019:

    Right—if it's linked into bitcoin-qt itself—and not a side dependency used for tooling only—these kind of indirect vulnerabilities could still be a problem. In many cases exploitation involves multiple stages, where one exploit is able to insert something into memory which another bug will stumble over, eventually resulting in RCE. So in that case it should be mentioned.

  37. Sjors approved
  38. Sjors commented at 3:20 PM on January 23, 2019: member

    re-ACK 55e05a8

  39. laanwj commented at 8:59 AM on February 21, 2019: member

    This is pretty useful info now, thanks! utACK 55e05a82cdc347400e4e6f8df2b0aba690b835ea

  40. laanwj merged this on Feb 21, 2019
  41. laanwj closed this on Feb 21, 2019

  42. laanwj referenced this in commit b853746d4a on Feb 21, 2019
  43. merland deleted the branch on Apr 15, 2019
  44. deadalnix referenced this in commit 1ae5c5f139 on Apr 2, 2020
  45. MarcoFalke locked this on Dec 16, 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-04-15 15:14 UTC

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