reformat OS X build instrcs, add 10.8 + Homebrew #2026

pull colindean wants to merge 1 commits into bitcoin:master from colindean:doc/reformat-and-update-osx-instructions changing 3 files +220 −54
  1. colindean commented at 6:05 PM on November 18, 2012: contributor

    I reformatted the entire document to look pretty in both standard text and Markdown. This should make it a lot easier to read.

    Also, I incorporated my OS X 10.8 build instructions with Homebrew as the package manager. I originally posted them on the Bitcoin Stackexchange in the question Trouble compiling bitcoind on OSX with homebrew. I've used these instructions twice now, so I'm fairly certain they'll work.

    I do recognize that I need to find a way to get the Makefile to look at Homebrew's Cellar without needing to be patched. WIP on my branch entitled feature/osx10.8-bitcoind-compilation.

  2. in doc/build-osx.md:None in 7bba0d59e7 outdated
     156 | +It's now available at `./bitcoind`. We have to first create the RPC 
     157 | +configuration file, though. Run `./bitcoind` to get the filename where it
     158 | +should be put, or just try the below command.
     159 | +
     160 | +    echo "rpcuser=bitcoinrpc
     161 | +    rpcpassword=HdAseQSRkirfoNuUSzqzixyL9sM1T6ABfzV1nyNmbuwg" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
    


    gavinandresen commented at 7:16 PM on November 18, 2012:

    rpcpassword=$(xxd -l 16 -p /dev/urandom) > ...etc would be better to create a random 16-hex-character password.

  3. in doc/build-osx.md:None in 7bba0d59e7 outdated
     111 | +2.  If you used Homebrew, you must modify source in order to pick up the
     112 | +    `openssl` library.
     113 | +
     114 | +    Edit the makefile.osx to change it a bit. Here's a diff that shows what
     115 | +    you need to change, or you can just use this as a patch by doing
     116 | +    `echo '$patch-text' | patch`, where $patch-text is the patch text below.
    


    gavinandresen commented at 7:19 PM on November 18, 2012:

    I think it'd be better to ship the patch in contrib/homebrew/makefile.osx.patch file rather than put it here.

  4. colindean commented at 8:12 PM on November 18, 2012: contributor

    Updated as suggested!

  5. BitcoinPullTester commented at 6:42 AM on November 22, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/933304fe886c8e7f3dd6d90acec3f8ee7cd60980 for binaries and test log.

  6. gavinandresen commented at 5:20 PM on December 4, 2012: contributor

    Question: why is openssl special with homebrew? It'd be really nice not to have to ship a Makefile.osx patch that is likely to break when we change Makefile.osx in the future, and it looks like openssl is the only change that couldn't just be made to Makefile.osx directly.

    Also: I think breaking the instructions into three sections:

    • Installing for development using MacPorts
    • Installing for development using HomeBrew
    • Special notes on creating release builds (that I'd write)

    ... would be less confusing.

    Finally: can you squash all this into one commit?

  7. colindean commented at 5:11 AM on December 5, 2012: contributor

    Homebrew doesn't link openssl like it does other packages because "The OpenSSL provided by OS X is too old for some software." It installs in "keg-only" mode, and has to be manually linked only if required:

    What does keg-only mean? It means the formula is installed only into the Cellar, it is not linked into /usr/local. This means most tools will not find it. We don’t do this for stupid reasons. You can link the formula in still if you need to with brew link. - Homebrew FAQ

    I interpret this to mean that if we rely on openssl to be linked already or include an instruction to link it, things may break. I'd rather not see Bitcoin as the cause of a broken dev system because a newer version of openssl is causing problems for Apple's stuff.

    One can get the path to Homebrew's installation of openssl with brew --prefix openssl. However, it appears that the current makefile.osx doesn't account for the possibility of multiple hierarchies to get the include and lib for all necessary libraries. It relies on DEPSDIR to set INCLUDEPATHS and LIBPATHS.

    This also exacerbates static building, because it, too, relies on DEPSDIR and everything being in the same hierarchy. Maybe static compilation as coded is not so much a problem if the releaser is always using MacPorts.

    That said, I'd rather not see a separate makefile.osx just for Homebrew folk. The patch does just enough to make it work for now. I could further improve the patch and the instructions to allow passing of brew --prefix openssl at compilation time in order to eliminate the possibility of an openssl version bump messing up the paths added in the patch.

    If we* could alter makefile.osx to better account for the differences between Homebrew and MacPorts, and do so dynamically, we could remove the need for the patch and remove the need for a separate path of instructions for each packaging system.

    Unfortunately, I don't have access to a system with MacPorts installed and I'm hesitant to introduce it onto mine for fear of messing up my own environment for other things ;-)

    If what's here now in this pull request is good enough for 0.8, I'll split the HOWTO into sections as suggested and squash these commits somehow (is there a way to do that without having to delete and recreate the branch? I've only had to squash once and just ended up doing that and resubmitting a PR) and get them ready. Otherwise, perhaps a makefile.osx modification is in order for 0.9.

    *we = someone involved in the project with perhaps stronger Makefile kung-foo than I

  8. colindean commented at 1:27 AM on December 6, 2012: contributor

    I note also that I'll need to remove the USE_IPV6=1 from the make command, per #2064.

  9. gavinandresen commented at 2:29 PM on December 6, 2012: contributor

    I just set up a machine to do a release build a couple of days ago for the 0.7.2 release, so I went through my bash history and updated the instructions:

    https://gist.github.com/4224563

  10. colindean commented at 9:16 AM on December 10, 2012: contributor

    I've not forgotten about this. I intend to get to it mid week.

  11. colindean commented at 4:59 PM on December 12, 2012: contributor

    I've incorporated the suggested changes and squashed everything together.

  12. BitcoinPullTester commented at 5:29 PM on December 12, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/82cc0ea4fb3e6847ba7475d4fa28942132009de4 for binaries and test log.

  13. BitcoinPullTester commented at 4:42 PM on January 24, 2013: none

    Automatic sanity-testing: FAILED MERGE, see http://jenkins.bluematt.me/pull-tester/82cc0ea4fb3e6847ba7475d4fa28942132009de4 for test log.

    This pull does not merge cleanly onto current master

  14. luke-jr commented at 6:35 PM on January 30, 2013: member

    @colindean, rebase needed

  15. colindean commented at 11:43 PM on January 30, 2013: contributor

    @luke-jr I think I did it right...?

  16. colindean commented at 1:23 AM on February 10, 2013: contributor

    I updated my branch to ensure that it merges cleanly with master.

  17. colindean commented at 6:39 AM on February 16, 2013: contributor

    I just updated again, resyncing with master and with two optimizations:

    • OpenSSL 1.0.1c is no longer hardcoded
    • Static compilation now works (tested on another 10.8 machine without any of the dev dependencies)

    The makefile patch is still necessary. A future optimization would ideally remove this necessity, but I don't have another machine available running MacPorts on which I can test.

  18. colindean commented at 8:33 PM on February 16, 2013: contributor

    Another update, after discovering a new formula in Homebrew for building berkeley-db4 without having to revert to an older version of the formula. Revised the makefile patch and the instructions to reflect this. Now, the only existing difference between the Homebrew and MacPorts instructions is the need to patch the makefile because of path differences between the two systems.

  19. reformat OS X build instrcs, add 10.8 + Homebrew
    * reformatted the entire document to look pretty in both standard text and
      Markdown
    * incorporated [my OS X 10.8 build instructions with Homebrew as the package
      manager](http://bitcoin.stackexchange.com/questions/3672/trouble-compiling-bitcoind-on-osx-with-homebrew/5253#5253)
    * incorporated @gavinandresen's MacPorts and release build instructions based on
      an earlier revision of this commit
    * added makefile patch necessary for Homebrew compilation to `contrib`
    68cb1cd6b6
  20. colindean commented at 2:53 AM on February 20, 2013: contributor

    Rebased to current master as of 0.8.0 release. @gavinandresen @luke-jr, anything else?

  21. gavinandresen referenced this in commit 69c5609699 on Feb 22, 2013
  22. gavinandresen merged this on Feb 22, 2013
  23. gavinandresen closed this on Feb 22, 2013

  24. laudney referenced this in commit 6ffd9fc790 on Mar 19, 2014
  25. KolbyML referenced this in commit ee792245ae on Dec 5, 2020
  26. 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-04-29 03:16 UTC

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