Compiling STEEM 0.20.6 on macOS 10.14

in #utopian-io6 years ago (edited)

Its not possible to compile STEEM blockchain on the latest macOS version (Mojave) following the official instructions. For developers using macOS this is inconvenient.

cmake errors

image.png

BZIP2_LIBRARIES missing:

  Could NOT find bzip2 (missing: BZIP2_LIBRARIES)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.12.3/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  libraries/vendor/rocksdb/cmake/modules/Findbzip2.cmake:17 (find_package_handle_standard_args)
  libraries/vendor/rocksdb/CMakeLists.txt:82 (find_package)

ZLIB_LIBRARIES also will be missing and will get a simialr error message

Fixing Zlib error

Assuming that you are in $HOME/steem/build, do the following from the terminal to fix the ZLib error

wget https://www.zlib.net/zlib-1.2.11.tar.gz ; cd zlib-1.2.11 ; ./configure ; make 

Fixing the BZIP Lib Error

Run the following from the command prompt:

cd $HOME/steem/build/bzip2-1.0.6/ ; sudo make -n 

Getting things work

image.png
(If you are using the fancy cmake GUI, you can set paths like this)

To just get things done, clone STEEM from the github & build as follows after compiling and keeping bzip2 and zlib in their respective directories. P

export BZIP2_LIBRARIES=$HOME/steem/build/bzip2-1.0.6/lib
export ZLIB_LIBRARIES=$HOME/steem/build/zlib-1.2.11
export OPENSSL_ROOT_DIR=$(brew --prefix)/Cellar/openssl/1.0.2o_1/
export SNAPPY_LIBRARIES=$(brew --prefix)/Cellar/snappy/1.1.7_1/lib/
export SNAPPY_INCLUDE_DIR=$(brew --prefix)/Cellar/snappy/1.1.7_1/include/

cmake -DCMAKE_BUILD_TYPE=Release ..
make steemd cli_wallet

build steemd & cli_wallet

[11:30 PM] bobinson@air 🖖 [~/hack/steem/build]`make install steemd cli_wallet
image.png

I hope this helps developers.

Sort:  

Thank you for sharing this. It definitely looks helpful for anyone running a witness on MAC.
In terms of our utopian review since you selected utopian tag:

  • This is mostly a tutorial, so we suggest using #tutorials tag instead of documentation
  • Nice work on screenshots. Certainly helpful!
  • We normally suggest tutorials to be a bit more structured and with larger content and explanation.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thanks @mcfarhat

This is mostly a tutorial, so we suggest using #tutorials tag instead of documentation

I think this more of a documentation that needs to be updated in https://github.com/steemit/steem/blob/master/doc/building.md as opposed to a tutorial. I didn't create a github issue and send a PR for this as I am still testing it.

More documentation is pretty key in this whole shabang!

TY for your diligence : )
Screen Shot 2018-11-03 at 10.17.47 AM.png

Thank you for your review, @mcfarhat! Keep up the good work!

Hey, @bobinson!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Hi @bobinson!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

This post has been rewarded with 100% upvote from @indiaunited-bot community account. We are happy to have you as one of the valuable member of the community.

If you would like to delegate to @IndiaUnited you can do so by clicking on the following links: 5SP, 10SP, 15SP, 20SP 25SP, 50SP, 100SP, 250SP. Be sure to leave at least 50SP undelegated on your account.

Please contribute to the community by upvoting this comment and posts made by @indiaunited.

Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!

Reply !stop to disable the comment. Thanks!

Congratulations @bobinson! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You got more than 800 replies. Your next target is to reach 900 replies.

Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

The new Steemfest³ Award is ready!
Be ready for the next contest!

Support SteemitBoard's project! Vote for its witness and get one more award!