Compiling STEEM 0.20.6 on macOS 10.14

Words
136
Reading
1 min
Listen
Play
8y

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.

Compiling STEEM 0.20.6 on macOS 10.14 | Ecency