EOS

EOS 编译 FAQ

2018-10-23  本文已影响0人  比特松

build 失败

$ ./eosio_build.sh

    Beginning build version: 1.2
    Mon Oct 21 00:03:42 UTC 2018
    User: bitson
    git head id: f9a3d023c05d6b7984cbd7263a5a39e650c87e90
    Current branch: master

    ARCHITECTURE: Darwin

    OS name: Darwin
    OS Version: 10.13.6
    CPU speed: 2.20Ghz
    CPU cores: 4
    Physical Memory: 16 Gbytes
    Disk install: /dev/disk1s1
    Disk space total: 233G
    Disk space available: 106G
      
    Checking xcode-select installation
    xcode-select installation found @ 
    /usr/bin/xcode-select 

    Checking Ruby installation.
    Ruby installation found @ 
    /usr/bin/ruby 

    Checking Home Brew installation
    Home Brew installation found @
    /usr/local/bin/brew

    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 GMP ...         GMP found
    Checking gettext ...         gettext found
    Checking MongoDB ...         MongoDB found
    Checking Doxygen ...         Doxygen found
    Checking Graphviz ...        Graphviz found
    Checking LCOV ...        LCOV found
    Checking Python3 ...         Python3 found

    No required Home Brew dependencies to install.

    Checking boost library installation.
    Boost 1.67.0 found at /usr/local.

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

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


>>>>>>>> ALL dependencies sucessfully found or installed . Installing EOSIO

>>>>>>>> CMAKE_BUILD_TYPE=Release
>>>>>>>> ENABLE_COVERAGE_TESTING=false
>>>>>>>> DOXYGEN=false

-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /usr/local/opt/llvm@4/bin/clang
-- Check for working C compiler: /usr/local/opt/llvm@4/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
...
...
Scanning dependencies of target cfg
Scanning dependencies of target asmjs
Scanning dependencies of target wasm
Scanning dependencies of target ast
[  0%] Building CXX object externals/binaryen/src/asmjs/CMakeFiles/asmjs.dir/asm_v_wasm.cpp.o
[  0%] Building CXX object externals/binaryen/src/cfg/CMakeFiles/cfg.dir/Relooper.cpp.o
[  0%] Building CXX object externals/binaryen/src/ast/CMakeFiles/ast.dir/ExpressionAnalyzer.cpp.o
[  0%] Building CXX object externals/binaryen/src/wasm/CMakeFiles/wasm.dir/literal.cpp.o
[  0%] Building CXX object externals/binaryen/src/wasm/CMakeFiles/wasm.dir/wasm.cpp.o
[  0%] Building CXX object externals/binaryen/src/asmjs/CMakeFiles/asmjs.dir/shared-constants.cpp.o
...
...
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/tic_tac_toe_tests.cpp.o
[ 98%] Linking CXX static library libnet_api_plugin.a
[ 98%] Built target net_api_plugin
[ 98%] Building CXX object unittests/CMakeFiles/unit_test.dir/wasm_tests.cpp.o
Scanning dependencies of target nodeos
make[2]: *** No rule to make target `/usr/local/lib/libsnappy.dylib', needed by `programs/nodeos/nodeos'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 98%] Building CXX object programs/nodeos/CMakeFiles/nodeos.dir/main.cpp.o
[100%] Building CXX object unittests/CMakeFiles/unit_test.dir/whitelist_blacklist_tests.cpp.o
make[1]: *** [programs/nodeos/CMakeFiles/nodeos.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] 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.
[100%] Built target unit_test
make: *** [all]  2

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

原因:本地 MongoDB C++ 驱动与 EOSIO 不兼容

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

解决办法:

删除 /usr/local/lib/ 下的 mongoDB 相关文件(libbson*、libmongoc*),重新执行 build 脚本

$ ./eosio_build.sh
        ...
        ...
        No required Home Brew dependencies to install.
    
        Checking boost library installation.
        Boost 1.67.0 found at /usr/local.
    
        Checking MongoDB C++ driver installation.
    ==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.high_sierra.bottle.tar.gz
    ######################################################################## 100.0%
    ==> Pouring pkg-config-0.29.2.high_sierra.bottle.tar.gz
    🍺  /usr/local/Cellar/pkg-config/0.29.2: 11 files, 627.2KB
    Unlinking /usr/local/Cellar/pkg-config/0.29.2... 4 symlinks removed
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   617    0   617    0     0    544      0 --:--:--  0:00:01 --:--:--   544
    100 6193k  100 6193k    0     0  1138k      0  0:00:05  0:00:05 --:--:-- 1645k
    -- The C 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
    ...
    ...
[100%] Built target nodeos
    
    
         _______  _______  _______ _________ _______
        (  ____ \(  ___  )(  ____ \\__   __/(  ___  )
        | (    \/| (   ) || (    \/   ) (   | (   ) |
        | (__    | |   | || (_____    | |   | |   | |
        |  __)   | |   | |(_____  )   | |   | |   | |
        | (      | |   | |      ) |   | |   | |   | |
        | (____/\| (___) |/\____) |___) (___| (___) |
        (_______/(_______)\_______)\_______/(_______)
    
        EOSIO has been successfully built. 00:04:07
    
        To verify your installation run the following commands:
    
        /usr/local/bin/mongod -f /usr/local/etc/mongod.conf &
        cd /Users/bitson/eos/build; make test
    
        For more information:
        EOSIO website: https://eos.io
        EOSIO Telegram channel @ https://t.me/EOSProject
        EOSIO resources: https://eos.io/resources/
        EOSIO Stack Exchange: https://eosio.stackexchange.com
        EOSIO wiki: https://github.com/EOSIO/eos/wiki

Reference
https://github.com/EOSIO/eos/issues/5606


相关链接
EOS 源码编译

上一篇下一篇

猜你喜欢

热点阅读