Eos: Can't build on macOS

Created on 6 Apr 2018  ยท  10Comments  ยท  Source: EOSIO/eos

macOS: 10.13.4

$ git clone https://github.com/EOSIO/eos --recursive
$ cd eos
$ ./eosio_build.sh

Output:

```
maxblock@mbp eos (master)$ ./eosio_build.sh

Beginning build version: 1.2
Fri Apr  6 07:43:06 UTC 2018
git head id: 54d4d177ed80b37dcc93a9f7e7f310cb4542d492
Current branch: * master

ARCHITECTURE: Darwin

OS name: Darwin
OS Version: 10.13.4
CPU speed: 230.00Ghz
CPU cores: 4
Physical Memory: 16 Gbytes
Disk space total: 465G
Disk space available: 246G

Checking XCode installation
XCode installation found.

Checking Ruby installation
Ruby installation found.

Checking Home Brew installation
Home Brew installation found.

Checking dependencies.
Checking automake ...        automake found
Checking Libtool ...         Libtool found
Checking OpenSSL ...         OpenSSL found
Checking llvm ...        llvm found
Checking wget ...        wget found
Checking CMake ...       CMake found
Checking Boost ...       Boost found
Checking GMP ...         GMP found
Checking gettext ...         gettext found
Checking MongoDB ...         MongoDB found
Checking Doxygen ...         Doxygen found
Checking Graphviz ...        Graphviz found
Checking Python3 ...         Python3 found

No required Home Brew dependencies to install.

Checking MongoDB C++ driver installation.
Mongo C++ driver found at /usr/local/lib/libmongocxx-static.a.

Checking secp256k1-zkp installation.
secp256k1 found at /usr/local/lib/

Checking LLVM with WASM support.
WASM found at /usr/local/wasm/bin/

ALL dependencies sucessfully found or installed . Installing EOS.IO

-- Using custom FindBoost.cmake
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- thread
-- date_time
-- filesystem
-- system
-- program_options
-- signals
-- serialization
-- chrono
-- unit_test_framework
-- context
-- locale
-- iostreams
-- Configuring Eos on OS X
-- binaryen building with -std=c++11
-- binaryen building for platform x86-64
-- binaryen building with -Wall
-- binaryen building with -Werror
-- binaryen building with -Wextra
-- binaryen building with -Wno-unused-parameter
-- binaryen building with -fno-omit-frame-pointer
-- binaryen building with -fPIC
-- binaryen building with -O2
-- binaryen building with -UNDEBUG
-- Using WASM clang => /usr/local/wasm/bin/clang
-- Using WASM llc => /usr/local/wasm/bin/llc
-- Using WASM llvm-link => /usr/local/wasm/bin/llvm-link
-- Found Secp256k1: /usr/local/lib/libsecp256k1.a
-- Configuring fc to build on Unix/Apple
-- zlib found
-- bzip2 found
-- Configuring SoftFloat
-- Using custom FindBoost.cmake
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- thread
-- date_time
-- filesystem
-- system
-- chrono
-- unit_test_framework
-- locale
-- Configuring ChainBase on OS X
-- Using custom FindBoost.cmake
-- Boost version: 1.66.0
-- Found the following Boost libraries:
-- thread
-- date_time
-- filesystem
-- system
-- chrono
-- program_options
-- unit_test_framework
-- locale
-- Configuring AppBase on OS X
-- Found bsoncxx headers: /usr/local/include/bsoncxx/v_noabi
-- Found bsoncxx library: /usr/local/lib/libbsoncxx-static.a;/usr/local/lib/libbson-static-1.0.a;-D_THREAD_SAFE
-- Found mongocxx headers: /usr/local/include/mongocxx/v_noabi;/usr/local/include/bsoncxx/v_noabi
-- Found mongocxx library: /usr/local/lib/libmongocxx-static.a;/usr/local/lib/libbsoncxx-static.a;/usr/local/lib/libbson-static-1.0.a;-D_THREAD_SAFE;/usr/local/lib/libmongoc-static-1.0.a;/usr/local/lib/libbson-static-1.0.a;-D_THREAD_SAFE;-lsasl2;-framework Security;-framework CoreFoundation;-lz;-lresolv
-- Git commit revision: 54d4d177
-- Git commit revision: 54d4d177
-- Git commit revision: 54d4d177
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/maxblock/projects/tmp/eos/build
[ 0%] Built target binaryen
[ 1%] Built target asmjs
[ 1%] Built target wasm
[ 1%] Built target ast
[ 1%] Built target cfg
[ 1%] Built target emscripten-optimizer
[ 2%] Built target support
[ 5%] Built target passes
[ 5%] Built target Platform
[ 16%] Built target chainbase
[ 29%] Built target softfloat
[ 29%] Built target eosiolib
[ 31%] Built target libc++
[ 31%] Built target appbase
[ 31%] contract...
[ 31%] Built target copy_skeleton_contract
[ 55%] Built target print_floats
[ 73%] Built target libc
[ 73%] Built target eosio-s2wasm
[ 74%] Built target Logging
[ 75%] Built target eosio.bios
[ 76%] Built target simple.token
[ 76%] Built target chainbase_test
[ 77%] Built target eosio.token
[ 77%] Built target appbase_example
[ 77%] Built target eosio.msig
[ 79%] Built target multi_index_test
[ 79%] Built target eosio.system
[ 79%] Built target identity
[ 80%] Built target currency
[ 80%] Built target identity_test
[ 80%] Built target stltest
[ 80%] Built target asserter
[ 80%] Built target test.inline
[ 80%] Built target infinite
[ 81%] Built target test_api
[ 81%] Built target proxy
[ 81%] Built target test_api_mem
[ 81%] Built target test_api_db
[ 82%] Built target test_api_multi_index
[ 83%] Built target noop
[ 84%] Built target dice
[ 84%] Built target IR
[ 84%] Built target exchange
[ 84%] Built target WASM
[ 85%] Built target Runtime
[ 86%] Built target WAST
[ 86%] Built target Emscripten
[ 86%] Built target Assemble
[ 86%] Built target Test
[ 86%] Built target Disassemble
[ 87%] Built target wavm
[ 92%] Built target fc
[ 92%] Built target eos_utilities
[ 92%] Built target test_cypher_suites
[ 92%] Built target test_exchange
[ 92%] Built target http_plugin
[ 92%] Built target eosio-applesedemo
[ 94%] Built target eosio_chain
[ 94%] Built target abi_generator
[ 94%] Built target chain_plugin
[ 94%] Built target eosio-launcher
[ 95%] Built target wallet_plugin
[ 96%] Built target eosio-abigen
[ 97%] Built target eosio_testing
[ 97%] Built target chain_api_plugin
[ 97%] Built target producer_plugin
[ 97%] Built target account_history_plugin
[ 97%] Built target wallet_api_plugin
[ 97%] Built target txn_test_gen_plugin
[ 97%] Built target faucet_testnet_plugin
[ 97%] Built target mongo_db_plugin
[ 97%] Built target net_plugin
[ 97%] Built target account_history_api_plugin
[ 97%] Built target keosd
[ 97%] Built target net_api_plugin
[ 97%] Linking CXX executable cleos
[ 97%] Built target nodeos
Undefined symbols for architecture x86_64:
"_libintl_bindtextdomain", referenced from:
_main in main.cpp.o
"_libintl_gettext", referenced from:
eosio::client::localize::localized_with_variant(char const, fc::variant_object const&) in main.cpp.o
eosio::client::localize::localized_with_variant(char const
, fc::variant_object const&) in help_text.cpp.o
"_libintl_textdomain", referenced from:
_main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: * [programs/cleos/cleos] Error 1
make[1]:
[programs/cleos/CMakeFiles/cleos.dir/all] Error 2
make[1]:
Waiting for unfinished jobs....
[ 99%] Built target chain_test
make: *
[all] Error 2

>>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.

maxblock@mbp eos (master)$```

Most helpful comment

After such commands it works for me now:

maxblock@mbp ~ $ brew link gettext --force
Linking /usr/local/Cellar/gettext/0.19.8.1... 197 symlinks created

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
maxblock@mbp ~ $ echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

All 10 comments

After such commands it works for me now:

maxblock@mbp ~ $ brew link gettext --force
Linking /usr/local/Cellar/gettext/0.19.8.1... 197 symlinks created

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
maxblock@mbp ~ $ echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

Similar to #2028

Worked for me too.

Worked for me too.

Thank you worked for me.
under mac os 10.13.5

Thanks. It helped me to make the build.

Can we please make it a part of the build script as well so the other people cloning the project wouldn't have to go through this whole googling process. Thanks.

I don't know if it would help to resolve the issue in any manner but following are the commands I had to run:

brew cleanup
brew install --with-clang --with-lld --with-python llvm@4
export LLVM_DIR=/usr/local/Cellar/llvm@4/4.0.1/lib/cmake/llvm
brew link gettext --force 
export PATH="/usr/local/opt/gettext/bin:$PATH"
git clone https://github.com/eosio/eos --recursive
cd eos
sh ./eosio_build.sh darwin

Thank you worked for me.
brew link gettext --force
export PATH="/usr/local/opt/gettext/bin:$PATH"

Worked for me too.

Worked for me too.

For googling purpose, my build halted at his point

[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/whitelist_blacklist_tests.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [programs/cleos/cleos] Error 1
make[1]: *** [programs/cleos/CMakeFiles/cleos.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 98%] Linking CXX executable unit_test
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
[ 98%] Built target unit_test
make: *** [all] Error 2

    >>>>>>>>>>>>>>>>>>>> MAKE building EOSIO has exited with the above error.
Was this page helpful?
0 / 5 - 0 ratings