如何建構混合 IDE
有誰知道如何建構混合IDE?我在自述文件或其他地方沒有找到這方面的資訊。當我嘗試通過 cmake 建構 master 時,我得到:
➜ 3rd cmake mix -- The C compiler identification is GNU 5.3.1 -- The CXX compiler identification is GNU 5.3.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /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: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:23 (include): include could not find load file: EthDependencies CMake Error at CMakeLists.txt:24 (include): include could not find load file: EthExecutableHelper CMake Error at CMakeLists.txt:25 (include): include could not find load file: EthCompilerSettings SRC_LIST: ./src/QFunctionDefinition.cpp;./src/QContractDefinition.cpp;./src/Exceptions.cpp;./src/MixApplication.cpp;./src/QVariableDeclaration.cpp;./src/ClientModel.cpp;./src/QEther.cpp;./src/InverseMouseArea.cpp;./src/QVariableDefinition.cpp;./src/HttpServer.cpp;./src/main.cpp;./src/DebuggingStateWrapper.cpp;./src/FileIo.cpp;./src/QBigInt.cpp;./src/CodeModel.cpp;./src/MixClient.cpp;./src/QBasicNodeDefinition.cpp;./src/Clipboard.cpp;./src/SortFilterProxyModel.cpp;./src/CodeHighlighter.cpp;./src/Web3Server.cpp;./src/ContractCallDataEncoder.cpp CMake Warning at CMakeLists.txt:50 (find_package): By not providing "FindEth.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Eth", but CMake did not find one. Could not find a package configuration file provided by "Eth" with any of the following names: EthConfig.cmake eth-config.cmake Add the installation prefix of "Eth" to CMAKE_PREFIX_PATH or set "Eth_DIR" to a directory containing one of the above files. If "Eth" provides a separate development package or SDK, be sure it has been installed. CMake Warning at CMakeLists.txt:51 (find_package): By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Core", but CMake did not find one. Could not find a package configuration file provided by "Qt5Core" with any of the following names: Qt5CoreConfig.cmake qt5core-config.cmake Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set "Qt5Core_DIR" to a directory containing one of the above files. If "Qt5Core" provides a separate development package or SDK, be sure it has been installed. CMake Warning at CMakeLists.txt:52 (find_package): By not providing "FindQt5WebEngine.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5WebEngine", but CMake did not find one. Could not find a package configuration file provided by "Qt5WebEngine" with any of the following names: Qt5WebEngineConfig.cmake qt5webengine-config.cmake Add the installation prefix of "Qt5WebEngine" to CMAKE_PREFIX_PATH or set "Qt5WebEngine_DIR" to a directory containing one of the above files. If "Qt5WebEngine" provides a separate development package or SDK, be sure it has been installed. CMake Error at CMakeLists.txt:59 (qt5_add_resources): Unknown CMake command "qt5_add_resources". -- Configuring incomplete, errors occurred! See also "/home/ligi/git/3rd/CMakeFiles/CMakeOutput.log".
建構開發時:
➜ 3rd cmake mix CMake Error at CMakeLists.txt:8 (include): include could not find load file: EthPolicy CMake Error at CMakeLists.txt:9 (eth_policy): Unknown CMake command "eth_policy". -- Configuring incomplete, errors occurred! See also "/home/ligi/git/3rd/CMakeFiles/CMakeOutput.log".
目前,建構過程不允許建構 webthree 保護傘的子集。要編譯
mix
,您必須編譯整個集合:git clone https://github.com/ethereum/webthree-umbrella/ cd webthree-umbrella/ mkdir build/ cd build/ cmake .. make -j $(nproc)
混合二進製文件將在
build/mix/mix
.
您缺少一些依賴項,至少是 qt 庫,見下文。Mix 不能單獨建構,你需要更多的建構塊。
這張圖片很好地描述了混合依賴:
像你一樣,我一開始嘗試只編譯 mix ,實際上編譯整個 cpp 東西更簡單,Mix 將在其中。說明位於此處。它歸結為:
- 使用包管理器(
sudo apt-get install
或sudo aptitude install
)安裝依賴項,在 Ubuntu 上這些是:
build-essential git cmake libboost-all-dev libgmp-dev libleveldb-dev libminiupnpc-dev libreadline-dev libncurses5-dev libcurl4-openssl-dev libcryptopp-dev libmicrohttpd-dev libjsoncpp-dev libargtable2-dev libedit-dev mesa-common-dev ocl-icd-libopencl1 opencl-headers libgoogle-perftools-dev qtbase5-dev qt5-default qtdeclarative5-dev libqt5webkit5-dev libqt5webengine5-dev ocl-icd-dev libv8-dev libz-dev libjsonrpccpp-dev qml-module-qtquick-controls qml-module-qtwebengine
- 如果您不在 Ubuntu 上,您可能會遇到libqt5webengine5-dev和libcryptopp-dev 的問題,這取決於發行版並沒有完全按照編譯器想要的方式發布。如果您需要,我可以添加一些內容,我在 Debian 上成功編譯了缺少這兩個庫的所有內容。
所以在 Debian 上你沒有得到 libqt5webengine5-dev。我解決這兩個依賴問題的方法如下:
- 在網站上下載 Qt 5.4(版本很重要),他們問你幾個問題。我個人將它安裝在我的主目錄(/home/YOURUSER)中
- 現在你必須告訴 cmake 如何找到那個庫:我用過
cmake .. -DCMAKE_PREFIX_PATH=/home/YOURUSER/Qt/5.4/gcc_64
因此,如果您沒有獲得正確版本的 libcrytopp,您需要自己編譯它。
wget http://cryptopp.com/cryptopp562.zip
unzip cryptopp562.zip -d cryptopp
- 如果
make libcryptopp.a libcryptopp.so cryptest.exe
在 cryptopp 目錄中失敗,您可能需要編輯 GNUmakefile 並取消註釋CXXFLAGS += -fPIC
sudo make install
遞歸地複製 repo :) 並檢查你想要的版本:
git clone --recursive https://github.com/ethereum/webthree-umbrella.git
然後git checkout XXXX
創建建構目錄,移入其中並 cmake !
mkdir -p build && cd build && cmake ..
如果您的 cmake 未通過所有測試,您可以發表評論,我會嘗試告訴您缺少什麼:)