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

Make fail due to openssl #564

Closed
LanfordCai opened this issue Jan 8, 2018 · 5 comments
Closed

Make fail due to openssl #564

LanfordCai opened this issue Jan 8, 2018 · 5 comments
Labels
build About build process

Comments

@LanfordCai
Copy link

cmake works fine, but make failed.

OS: macOS 10.13.2
Openssl Version: 1.0.2n
Boost Version: 1.60.0
➜  bitshares-core git:(master) ✗ cmake  -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DBOOST_ROOT=/usr/local/opt/boost@1.60 -DBOOST_LIBRARYDIR=/usr/local/opt
-- Using custom FindBoost.cmake
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   thread
--   iostreams
--   date_time
--   system
--   filesystem
--   program_options
--   signals
--   serialization
--   chrono
--   unit_test_framework
--   context
--   locale
-- Using custom FindBoost.cmake
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   coroutine
-- Configuring BitShares on OS X
-- Configuring project fc located in: /Users/lanford/Documents/Crypto/bitshares-core/libraries/fc
-- Configuring fc to build on Unix/Apple
-- Using custom FindBoost.cmake
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   thread
--   date_time
--   system
--   filesystem
--   program_options
--   signals
--   serialization
--   chrono
--   unit_test_framework
--   context
--   locale
--   iostreams
--   coroutine
** websocketpp

=========== Used Build Configuration =============

-- ENABLE_CPP11        = ON
-- BUILD_EXAMPLES      = OFF
-- BUILD_TESTS         = OFF

-- WEBSOCKETPP_ROOT    = /Users/lanford/Documents/Crypto/bitshares-core/libraries/fc/vendor/websocketpp
-- WEBSOCKETPP_BIN     = /Users/lanford/Documents/Crypto/bitshares-core/libraries/fc/vendor/websocketpp/bin
-- WEBSOCKETPP_LIB     = /Users/lanford/Documents/Crypto/bitshares-core/libraries/fc/vendor/websocketpp/lib
-- Install prefix      = /usr/local

-- WEBSOCKETPP_BOOST_LIBS        =
-- WEBSOCKETPP_PLATFORM_LIBS     =
-- WEBSOCKETPP_PLATFORM_TLS_LIBS =

-- OPENSSL_FOUND        = TRUE
-- OPENSSL_INCLUDE_DIR     = /usr/local/opt/openssl/include
-- OPENSSL_LIBRARIES = /usr/local/opt/openssl/lib/libssl.a;/usr/bin/openssl
-- OPENSSL_VERSION = 1.0.2n

-- Found Readline: /usr/lib/libreadline.dylib
-- zlib found
-- bzip2 found
-- LOG_LONG_API: ON
--
--      LOGGING LONG API CALLS
--           MAX  MS: 1000
--           WARN MS: 750
--
-- Finished fc module configuration...
-- Graphene database unity build enabled
-- egenesis: /Users/lanford/Documents/Crypto/bitshares-core/genesis.json
-- embed_genesis_args: -t/Users/lanford/Documents/Crypto/bitshares-core/libraries/egenesis/egenesis_brief.cpp.tmpl---/Users/lanford/Documents/Crypto/bitshares-core/libraries/egenesis/egenesis_brief.cpp-t/Users/lanford/Documents/Crypto/bitshares-core/libraries/egenesis/egenesis_full.cpp.tmpl---/Users/lanford/Documents/Crypto/bitshares-core/libraries/egenesis/egenesis_full.cpp--genesis-json/Users/lanford/Documents/Crypto/bitshares-core/genesis.json
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/lanford/Documents/Crypto/bitshares-core
➜  bitshares-core git:(master) ✗ make
[  3%] Built target project_secp256k1
[ 31%] Built target fc
[ 31%] Linking CXX executable real128_test
ld: can't link with a main executable file '/usr/bin/openssl' 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
@oxarbitrage oxarbitrage added the build About build process label Jan 8, 2018
@oxarbitrage
Copy link
Member

i dont have a macos to help you, unsure if someone here will be able to. your openssl with 1.0.X is supported and there are efforts to support 1.1.X here: #559

for what i see here:

ld: can't link with a main executable file '/usr/bin/openssl' for architecture x86_64

seems like openssl binary is not present in /usr/bin ? maybe creare a symbolic link or copy the binary into that location and make again ?

@oxarbitrage
Copy link
Member

also check if some of this can help you:
https://github.com/bitshares/bitshares-core/wiki/Building-on-OS-X

@LanfordCai
Copy link
Author

LanfordCai commented Jan 9, 2018

@oxarbitrage Thank you for your reply:).

I have checked /usr/bin and openssl does present in the directory... And the Building-on-OS-X doc is not work, brew link --force openssl would failed with this warning:

Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
  -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib

That's why I added -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl when calling cmake ...

@pmconrad
Copy link
Contributor

pmconrad commented Jan 9, 2018

-- OPENSSL_LIBRARIES = /usr/local/opt/openssl/lib/libssl.a; /usr/bin/openssl

This looks broken. /usr/bin/openssl is not a library.

@LanfordCai
Copy link
Author

LanfordCai commented Jan 15, 2018

I used an ubuntu OS to build the code, and It works well. So I would close this issue. Thank you for your help.

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

No branches or pull requests

3 participants