Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: symbol(s) not found for architecture x86_64 Mac issue #1545

Closed
prateektiwari7 opened this issue Jan 28, 2019 · 11 comments
Closed

ld: symbol(s) not found for architecture x86_64 Mac issue #1545

prateektiwari7 opened this issue Jan 28, 2019 · 11 comments
Assignees
Labels
3d Bug Classification indicating the existing implementation does not match the intention of the design

Comments

@prateektiwari7
Copy link

prateektiwari7 commented Jan 28, 2019

Hi I am facing issue in building the code.

`[ 29%] Linking CXX executable real128_test
Undefined symbols for architecture x86_64:
"boost::system::system_category()", referenced from:
fc::copy(fc::path const&, fc::path const&) in libfc.a(filesystem.cpp.o)
boost::filesystem::detail::recur_dir_itr_imp::increment(boost::system::error_code*) in libfc.a(filesystem.cpp.o)
boost::filesystem::detail::recur_dir_itr_imp::push_directory(boost::system::error_code&) in libfc.a(filesystem.cpp.o)
fc::udp_socket::~udp_socket() in libfc.a(udp_socket.cpp.o)
fc::udp_socket::send_to(char const*, unsigned long, fc::ip::endpoint const&) in libfc.a(udp_socket.cpp.o)
fc::udp_socket::send_to(std::__1::shared_ptr const&, unsigned long, fc::ip::endpoint const&) in libfc.a(udp_socket.cpp.o)
fc::udp_socket::open() in libfc.a(udp_socket.cpp.o)

"boost::system::generic_category()", referenced from:
boost::thread::join() in libfc.a(thread.cpp.o)
boost::condition_variable::condition_variable() in libfc.a(thread.cpp.o)
boost::mutex::mutex() in libfc.a(thread.cpp.o)
boost::condition_variable::wait(boost::unique_lockboost::mutex&) in libfc.a(thread.cpp.o)
boost::mutex::lock() in libfc.a(thread.cpp.o)
boost::unique_lockboost::mutex::unlock() in libfc.a(thread.cpp.o)
boost::unique_lockboost::mutex::lock() in libfc.a(thread.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]: *** [libraries/fc/tests/real128_test] Error 1
make[1]: *** [libraries/fc/tests/CMakeFiles/real128_test.dir/all] Error 2
make: *** [all] Error 2`

I have MAC OSX 10.12

I already went through the build instruction steps of https://github.com/bitshares/bitshares-core/wiki/Building-on-OS-X

Please help me to find build.

@jmjatlanta
Copy link
Contributor

Can you tell me which version of Boost you have installed? Also, please let me know the parameters that you passed to the cmake command.

@prateektiwari7
Copy link
Author

This is cmake command I am using cmake -DBOOST_ROOT=/usr/local/opt/[email protected] -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl .

For boost please check this screenshot.

screen shot 2019-01-29 at 12 39 21 pm

@prateektiwari7
Copy link
Author

prateektiwari7 commented Jan 29, 2019

I got another Error now.

My steps to build are .

1.brew install boost cmake git openssl autoconf automake libtool 
2.brew link --force openssl
3.git clone https://github.com/bitshares/bitshares-core.git
4.cd bitshares-core
5.git submodule update --init --recursive
6.cmake .
7.make

Currently I reinstall my boost version to

Prateek-Tiwari-2:bitshares-core yudiz$ brew reinstall boost
==> Reinstalling boost 
==> Downloading https://homebrew.bintray.com/bottles/boost-1.68.0_1.sierra.bottle.tar.gz
Already downloaded: /Users/yudiz/Library/Caches/Homebrew/downloads/7c649ada5214d3f047263ab765fb2992cdda477e083e1545a7c3218dfc8c54d0--boost-1.68.0_1.sierra.bottle.tar.gz
==> **Pouring boost-1.68.0_1.sierra.bottle.tar.gz**
 /usr/local/Cellar/boost/1.68.0_1: 13,712 files, 460.0MB

The error now I am getting as
`In file included from /Users/yudiz/Documents/Graphene/bitshare_!/bitshares-core/libraries/fc/src/thread/thread_d.hpp:5:
/Users/yudiz/Documents/Graphene/bitshare_!/bitshares-core/libraries/fc/src/thread/context.hpp:3:10: fatal error:
'boost/context/all.hpp' file not found
#include <boost/context/all.hpp>

4 warnings and 1 error generated.`

@abitmore
Copy link
Member

IIRC bitshares-core doesn't support boost 1.68 so far.

@jmjatlanta
Copy link
Contributor

Yes, Boost 1.68 moved around some of the headers. The fixes are in development, but not quite ready yet.

It looks like you have Boost 1.60 installed, and that is what I currently use on macOS. I will follow your steps above, and see if I can recreate your issue.

@prateektiwari7
Copy link
Author

Hi @jmjatlanta Did you fixed that ?

@pmconrad
Copy link
Contributor

Boost 1.68 is not supported yet. Please use a compatible version for now.

@pmconrad pmconrad added the 3d Bug Classification indicating the existing implementation does not match the intention of the design label Jan 31, 2019
@jmjatlanta
Copy link
Contributor

jmjatlanta commented Jan 31, 2019

The following procedure will bring in a fix for macOS...

git cherry-pick e338fdb
cmake -DBOOST_ROOT=/usr/local/opt/[email protected] -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl .
make

Update was able to recreate the issue. The issue has been fixed, and is awaiting review. The git cherry-pick line above will bring in only the fix. If you do not feel comfortable doing that, you may wish to download the pre-built binaries at https://github.com/bitshares/bitshares-core/releases/tag/2.0.181221

@jmjatlanta jmjatlanta self-assigned this Jan 31, 2019
@jmjatlanta
Copy link
Contributor

Closed by mistake... Sorry. Please let us know if this is still an issue.

@jmjatlanta jmjatlanta reopened this Feb 5, 2019
@abitmore abitmore added this to the Future Feature Release milestone Feb 5, 2019
@prateektiwari7
Copy link
Author

@jmjatlanta Thanks for your help

@jmjatlanta
Copy link
Contributor

Fixed by PR #1556 which is part of Issue #1548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3d Bug Classification indicating the existing implementation does not match the intention of the design
Projects
None yet
Development

No branches or pull requests

4 participants