eos icon indicating copy to clipboard operation
eos copied to clipboard

EOS macos build error when do Linking CXX executable eosioc

Open fureweb-com opened this issue 8 years ago • 2 comments

Log below:

Scanning dependencies of target eosiod
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f programs/eosiod/CMakeFiles/eosiod.dir/build.make programs/eosiod/CMakeFiles/eosiod.dir/build
[ 99%] Building CXX object programs/eosiod/CMakeFiles/eosiod.dir/main.cpp.o
cd /InstalledFolderPath/eos/build/programs/eosiod && /usr/local/bin/clang++   -I/InstalledFolderPath/eos/build/programs/eosiod -I/InstalledFolderPath/eos/libraries/appbase/include -I/usr/local/include -I/InstalledFolderPath/eos/plugins/account_history_api_plugin/include -I/InstalledFolderPath/eos/plugins/account_history_plugin/include -I/InstalledFolderPath/eos/plugins/chain_plugin/include -I/InstalledFolderPath/eos/libraries/chain/include -I/InstalledFolderPath/eos/build/libraries/chain/include -I/InstalledFolderPath/eos/libraries/chain/../wasm-jit/Include -I/InstalledFolderPath/eos/libraries/chain/../../externals/binaryen/src -I/InstalledFolderPath/eos/libraries/utilities/include -I/InstalledFolderPath/eos/libraries/utilities/../wasm-jit/Include -I/InstalledFolderPath/eos/libraries/fc/include -I/usr/local/opt/openssl/include -I/InstalledFolderPath/eos/libraries/fc/vendor/websocketpp -I/InstalledFolderPath/eos/libraries/chainbase/include -I/InstalledFolderPath/eos/libraries/wasm-jit/Source/Runtime/../../../chain/include -I/InstalledFolderPath/eos/plugins/http_plugin/include -I/InstalledFolderPath/eos/plugins/chain_api_plugin/include -I/InstalledFolderPath/eos/plugins/producer_plugin/include -I/InstalledFolderPath/eos/plugins/net_plugin/include -I/InstalledFolderPath/eos/plugins/wallet_api_plugin/include -I/InstalledFolderPath/eos/plugins/wallet_plugin/include -I/InstalledFolderPath/eos/plugins/net_api_plugin/include -I/InstalledFolderPath/eos/plugins/txn_test_gen_plugin/include -I/InstalledFolderPath/eos/build/contracts -I/InstalledFolderPath/eos/plugins/faucet_testnet_plugin/include  -std=c++14 -Wall -Wno-deprecated-declarations   -o CMakeFiles/eosiod.dir/main.cpp.o -c /InstalledFolderPath/eos/programs/eosiod/main.cpp
[100%] Building CXX object programs/eosioc/CMakeFiles/eosioc.dir/help_text.cpp.o
cd /InstalledFolderPath/eos/build/programs/eosioc && /usr/local/bin/clang++   -I/Library/Frameworks/Mono.framework/Headers -I/InstalledFolderPath/eos/build/programs/eosioc -I/InstalledFolderPath/eos/libraries/appbase/include -I/usr/local/include -I/InstalledFolderPath/eos/plugins/chain_api_plugin/include -I/InstalledFolderPath/eos/plugins/chain_plugin/include -I/InstalledFolderPath/eos/libraries/chain/include -I/InstalledFolderPath/eos/build/libraries/chain/include -I/InstalledFolderPath/eos/libraries/chain/../wasm-jit/Include -I/InstalledFolderPath/eos/libraries/chain/../../externals/binaryen/src -I/InstalledFolderPath/eos/libraries/utilities/include -I/InstalledFolderPath/eos/libraries/utilities/../wasm-jit/Include -I/InstalledFolderPath/eos/libraries/fc/include -I/usr/local/opt/openssl/include -I/InstalledFolderPath/eos/libraries/fc/vendor/websocketpp -I/InstalledFolderPath/eos/libraries/chainbase/include -I/InstalledFolderPath/eos/libraries/wasm-jit/Source/Runtime/../../../chain/include -I/InstalledFolderPath/eos/plugins/http_plugin/include -I/InstalledFolderPath/eos/plugins/producer_plugin/include -I/InstalledFolderPath/eos/plugins/net_plugin/include  -std=c++14 -Wall -Wno-deprecated-declarations   -o CMakeFiles/eosioc.dir/help_text.cpp.o -c /InstalledFolderPath/eos/programs/eosioc/help_text.cpp
[100%] Linking CXX executable eosioc
cd /InstalledFolderPath/eos/build/programs/eosioc && /usr/local/Cellar/cmake/3.10.2/bin/cmake -E cmake_link_script CMakeFiles/eosioc.dir/link.txt --verbose=0
Undefined symbols for architecture x86_64:
  "_libintl_bindtextdomain", referenced from:
      bindtextdomain(char const*, char const*) in main.cpp.o
  "_libintl_gettext", referenced from:
      gettext(char const*) in main.cpp.o
      gettext(char const*) in help_text.cpp.o
  "_libintl_setlocale", referenced from:
      _main in main.cpp.o
  "_libintl_textdomain", referenced from:
      textdomain(char const*) 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/eosioc/eosioc] Error 1
make[1]: *** [programs/eosioc/CMakeFiles/eosioc.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Linking CXX executable eosiod
cd /InstalledFolderPath/eos/build/programs/eosiod && /usr/local/Cellar/cmake/3.10.2/bin/cmake -E cmake_link_script CMakeFiles/eosiod.dir/link.txt --verbose=0
[100%] Built target eosiod
make: *** [all] Error 2

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

How can I solve this problem?

fureweb-com avatar Mar 05 '18 09:03 fureweb-com

Hi, I solved this issue by these commands (you must be at ../eosioc directory, of course):

#first, install libidl:

sudo port install libidl +universal

#then, make a link between the correct (for architecture, installed before) libintl.dylib and the new file #libintl.dylib created by this command itself:

sudo ln -s /opt/local/lib/libintl.8.dylib /usr/local/lib/libintl.2.dylib

#the last:

edit file link.txt that you can find in ../eos/build/programs/eosioc/eosioc.dir/link.txt at the line 8 (for me, but it shoud be the same for you too), whereas the right link is /usr/local/lib/libintl.2.dylib instead of the previous /usr/local/lib/libintl.dylib.

#now, enter the command:

make install

And.. it works! ;)

Thanks to @purblind for his suggestion. You can find this reference at https://gist.github.com/purblind/1082232.

sirkbitt avatar Mar 07 '18 09:03 sirkbitt

Thanks @sirkbitt. But I'm still stuck at this point.

../eos/build/programs/eosioc/CMakeFiles/eosioc.dir/link.txt

Above file doesn't contain that text like %libint%l.

And I manage my program by homebrew, so I have no port command on my macOS.

So I cannot solve this problem yet :(

fureweb-com avatar Mar 08 '18 03:03 fureweb-com