用Mac裝eosio可能會遇到的兩個問題
版權聲明:
Mac上執行./eosio_build.sh,由於網路或Mac本身系統的問題,經常會出現兩個問題:
問題1: LLVM NOTFOUND
CMake Error at libraries/wasm-jit/Source/Runtime/CMakeLists.txt:26 (find_package):
Could not find a package configuration file provided by "LLVM" (requestedversion 4.0) with any of the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set"LLVM_DIR" to a directory containing one of the above files. If "LLVM"provides a separate development package or SDK, be sure it has beeninstalled.
這是
解決方法:查找路徑,移除,重裝
find /usr -name LLVMConfig.cmake -print 2>/dev/null
然後
brew remove --force llvm
rm -rf build/
git submodule update --init --recursive
export LLVM_DIR=/usr/local/Cellar/llvm@4/4.0.1/lib/cmake
./eosio_build.sh
/dev/null : 在類Unix系統中,/dev/null,是一個特殊的設備文件,它丟棄一切寫入其中的數據(但報告寫入操作成功),讀取它則會立即得到一個End Of File。
- 開發過程中,經常會有把一部分個公共庫分離出來,是整個項目具有復用性和模塊化,這就是git submodule的由來
git submodule update --init --recursive的動作是確保submodule被更新下載,並把路徑註冊在本地(register path)出來
在eos中submodule有以下一些
位於contracts下:
contracts/libc++/upstream(https://github.com/EOSIO/libcxx.git)
contracts/musl/upstream(https://github.com/EOSIO/musl.git)
位於externals下:
externals/binaryen(https://github.com/EOSIO/binaryen)
externals/magic_get(https://github.com/EOSIO/magic_get)
位於libaries下:
libraries/appbase(https://github.com/eosio/appbase)
libraries/chainbase(https://github.com/eosio/chainbase)
libraries/fc(https://github.com/EOSIO/fc)
libraries/softfloat(https://github.com/eosio/berkeley-softfloat-3)
EOShenzhen在未來的文章會講解這些庫的原理
問題 2: Boost_INCLUDE_DIR not found
Make Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/Users/mac/Desktop/mainnet/eos/libraries/appbase/Boost_INCLUDE_DIR
used as include directory in directory /Users/mac/Desktop/mainnet/eos/libraries/appbase /Users/mac/Desktop/mainnet/eos/libraries/chainbase/Boost_INCLUDE_DIR
used as include directory in directory /Users/mac/Desktop/mainnet/eos/libraries/chainbase
/Users/mac/Desktop/mainnet/eos/libraries/fc/Boost_INCLUDE_DIR
used as include directory in directory /Users/mac/Desktop/mainnet/eos/libraries/fc
/Users/mac/Desktop/mainnet/eos/tools/Boost_INCLUDE_DIR
used as include directory in directory
/Users/mac/Desktop/mainnet/eos/tools
Boost_INCLUDE_DIR (ADVANCED)
used as include directory in directory /Users/mac/Desktop/mainnet/eos/contracts/proxy
解決方法
解決思路和LLVM類似,即尋找到boost存儲的路徑、移除,並重裝
find / -name boost
如果./eosio_build.sh在一次安裝過程中由於網路或者系統的問題出現問題,可能會導致一系列的問題
history | grep boost
可以執行
brew remove --force boost
rm -rf /usr/local/Cellar/boost
rm -rf /usr/local/include/boost
將保存在Cellar和 include中的boost文件夾刪除掉
成功信號
參考資料:https://github.com/EOSIO/eos/issues/3786
※原來你要的不僅是愛
※【歷史上的今天】菲律賓:Everyday Struggle
TAG:全球大搜羅 |