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

Build failed on MacOS #5

Open
Incrediblez7 opened this issue Jan 6, 2019 · 4 comments
Open

Build failed on MacOS #5

Incrediblez7 opened this issue Jan 6, 2019 · 4 comments

Comments

@Incrediblez7
Copy link

Incrediblez7 commented Jan 6, 2019

after I execute "cmake -DCMAKE_BUILD_TYPE=Release` . && make -j4", these pops up.

-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Boost version: 1.67.0
-- Found the following Boost libraries:
-- system
-- date_time
-- thread
-- chrono
-- atomic
-- Found OpenSSL: /usr/local/opt/openssl/lib/libcrypto.a (found version "1.0.2q")
-- Using OpenSSL 1.0.2q
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - found
-- Found OpenCL: /System/Library/Frameworks/OpenCL.framework (found version "1.2")
-- Using OpenCL 1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mac/desktop/opencl-miner
Scanning dependencies of target beam-opencl-miner
[ 25%] Building CXX object CMakeFiles/beam-opencl-miner.dir/beamStratum.cpp.o
[ 25%] Building CXX object CMakeFiles/beam-opencl-miner.dir/clHost.cpp.o
[ 37%] Building C object CMakeFiles/beam-opencl-miner.dir/crypto/sha256.c.o
[ 50%] Building CXX object CMakeFiles/beam-opencl-miner.dir/main.cpp.o
[ 62%] Building CXX object CMakeFiles/beam-opencl-miner.dir/beam/core/difficulty.cpp.o
[ 75%] Building CXX object CMakeFiles/beam-opencl-miner.dir/beam/core/uintBig.cpp.o
[ 87%] Building CXX object CMakeFiles/beam-opencl-miner.dir/beam/utility/common.cpp.o
[100%] Linking CXX executable beam-opencl-miner
clang: error: unsupported option '-static-libgcc'
make[2]: *** [beam-opencl-miner] Error 1
make[1]: *** [CMakeFiles/beam-opencl-miner.dir/all] Error 2
make: *** [all] Error 2

cmake seems working perfectly, but something went wrong in make.

@QuentinDrt
Copy link

Hi, you need to remove the -static-libgcc flag this line of CMakeLists.txt :
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")

@Incrediblez7
Copy link
Author

Hi, you need to remove the -static-libgcc flag this line of CMakeLists.txt :
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")

It still doesn't work...

-- Boost version: 1.68.0
-- Found the following Boost libraries:
-- system
-- date_time
-- thread
-- chrono
-- atomic
-- Using OpenSSL 1.0.2q
-- Using OpenCL 1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mac/desktop/opencl-miner
[ 12%] Linking CXX executable beam-opencl-miner
clang: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
ld: warning: -L path '/usr/local/opt/openssl/lib/libssl.a' is not a directory
ld: warning: -L path '/usr/local/opt/openssl/lib/libcrypto.a' is not a directory
ld: warning: text-based stub file /System/Library/Frameworks//OpenCL.framework/OpenCL.tbd and library file /System/Library/Frameworks//OpenCL.framework/OpenCL are out of sync. Falling back to library file for linking.
Undefined symbols for architecture x86_64:
"boost::system::system_category()", referenced from:
beamMiner::beamStratum::activateWrite() in beamStratum.cpp.o
beamMiner::beamStratum::connect() in beamStratum.cpp.o
boost::asio::ip::basic_resolverboost::asio::ip::tcp::resolve(boost::asio::ip::basic_resolver_queryboost::asio::ip::tcp const&) in beamStratum.cpp.o
void boost::asio::ssl::stream<boost::asio::basic_stream_socketboost::asio::ip::tcp >::set_verify_callback<boost::_bi::bind_t<bool, boost::_mfi::mf2<bool, beamMiner::beamStratum, bool, boost::asio::ssl::verify_context&>, boost::_bi::list3<boost::_bi::valuebeamMiner::beamStratum*, boost::arg<1>, boost::arg<2> > > >(boost::_bi::bind_t<bool, boost::_mfi::mf2<bool, beamMiner::beamStratum, bool, boost::asio::ssl::verify_context&>, boost::_bi::list3<boost::_bi::valuebeamMiner::beamStratum*, boost::arg<1>, boost::arg<2> > >) in beamStratum.cpp.o
boost::asio::async_result<std::__1::decay<boost::_bi::bind_t<void, boost::_mfi::mf2<void, beamMiner::beamStratum, boost::system::error_code const&, boost::asio::ip::basic_resolver_iteratorboost::asio::ip::tcp >, boost::_bi::list3<boost::_bi::valuebeamMiner::beamStratum*, boost::arg<1> ()(), boost::_bi::value<boost::asio::ip::basic_resolver_iteratorboost::asio::ip::tcp > > > >::type, void (boost::system::error_code)>::return_type boost::asio::basic_socketboost::asio::ip::tcp::async_connect<boost::_bi::bind_t<void, boost::_mfi::mf2<void, beamMiner::beamStratum, boost::system::error_code const&, boost::asio::ip::basic_resolver_iteratorboost::asio::ip::tcp >, boost::_bi::list3<boost::_bi::valuebeamMiner::beamStratum*, boost::arg<1> ()(), boost::_bi::value<boost::asio::ip::basic_resolver_iteratorboost::asio::ip::tcp > > > >(boost::asio::ip::basic_endpointboost::asio::ip::tcp const&, boost::_bi::bind_t<void, boost::_mfi::mf2<void, beamMiner::beamStratum, boost::system::error_code const&, boost::asio::ip::basic_resolver_iteratorboost::asio::ip::tcp >, boost::_bi::list3<boost::_bi::valuebeamMiner::beamStratum*, boost::arg<1> (*)(), boost::_bi::value<boost::asio::ip::basic_resolver_iteratorboost::asio::ip::tcp > > >&&) in beamStratum.cpp.o
beamMiner::beamStratum::handleConnect(boost::system::error_code const&, boost::asio::ip::basic_resolver_iteratorboost::asio::ip::tcp) in beamStratum.cpp.o
boost::asio::basic_socketboost::asio::ip::tcp::close() in beamStratum.cpp.o
...
"boost::system::generic_category()", referenced from:
boost::mutex::lock() in beamStratum.cpp.o
boost::system::error_category::std_category::equivalent(int, std::__1::error_condition const&) const in beamStratum.cpp.o
boost::system::error_category::std_category::equivalent(std::__1::error_code const&, int) const in beamStratum.cpp.o
boost::mutex::mutex() in beamStratum.cpp.o
boost::system::error_category::std_category::equivalent(int, std::__1::error_condition const&) const in clHost.cpp.o
boost::system::error_category::std_category::equivalent(std::__1::error_code const&, int) const in clHost.cpp.o
boost::system::error_category::std_category::equivalent(int, std::__1::error_condition const&) const in main.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]: *** [beam-opencl-miner] Error 1
make[1]: *** [CMakeFiles/beam-opencl-miner.dir/all] Error 2
make: *** [all] Error 2

@Incrediblez7
Copy link
Author

It seems has even more errors... Maybe something else not working?

@Incrediblez7
Copy link
Author

2019-01-08 19 51 52 810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants