4

anyone knows how to build the mix IDE? I found no info on this in the README or elsewhere. When I try to build master via cmake I am getting:

 ➜  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".

when building develop:

➜  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".
  • In general you have to compile the whole webthree-umbrella. the single dependencies dont compile on it own (yet), what system are you on? Ubuntu? – Afr Mar 21 '16 at 15:39
  • yes ubuntu - but 16.04 – ligi Mar 22 '16 at 0:03
2

Currently the build process does not allow to build subsets of the webthree umbrella. To compile mix you will have to compile the whole set:

git clone https://github.com/ethereum/webthree-umbrella/
cd webthree-umbrella/
mkdir build/
cd build/
cmake ..
make -j $(nproc)

The mix binary will be available in build/mix/mix.

  • thanks but it fails for me with: CMake Error at libethereum/evmjit/CMakeLists.txt:29 (llvm_map_components_to_libnames): Unknown CMake command "llvm_map_components_to_libnames". – ligi Mar 22 '16 at 10:44
3

You're missing some dependencies, at least the qt libraries, see below. Mix can't be build on its own, you need more building blocks before.

This image depicts quite well the Mix dependencies :

dependencies

Like you, I tried at first to just compile mix and it's in fact simpler to compile the whole cpp stuff, Mix will be in it. The instructions are located here. It boils down to :

  • install the dependencies with your package manager (sudo apt-get install or sudo aptitude install), on Ubuntu these are :

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

  • if you're not on Ubuntu you may have troubles with libqt5webengine5-dev and libcryptopp-dev which depending on the distro aren't shipped exactly the way the compiler want. I may add something on that if you need, I successfully compiled everything on Debian which lacks both libraries.

So on Debian you're not getting libqt5webengine5-dev. The way I got around those 2 dependencies issues was the following :

  1. download Qt 5.4 (the version is important ) on the website , they ask you a few questions. Personally i installed it in my home directory (/home/YOURUSER)
  2. Now you'll have to tell cmake how to find that library : I used cmake .. -DCMAKE_PREFIX_PATH=/home/YOURUSER/Qt/5.4/gcc_64

Accordingly, if you're not getting the correct version of libcrytopp you'll need to compile it yourself.

  1. wget http://cryptopp.com/cryptopp562.zip
  2. unzip cryptopp562.zip -d cryptopp
  3. if make libcryptopp.a libcryptopp.so cryptest.exe in cryptopp directory fails, you may need to edit GNUmakefile and uncomment CXXFLAGS += -fPIC
  4. sudo make install

    • Clone the repo, recursively :) and checkout the release you want :

    git clone --recursive https://github.com/ethereum/webthree-umbrella.git then git checkout XXXX

    • create the build directory, move in it and cmake ! mkdir -p build && cd build && cmake ..

Should your cmake not pass all the test you can comment and I'll try to tell you what's missing :)

  • thanks! can you elaborate on libqt5webengine5-dev and libcryptopp-dev - I am getting: E: Unable to locate package libcryptopp-dev E: Unable to locate package libqt5webengine5-dev E: Unable to locate package qml-module-qtwebengine – ligi Mar 21 '16 at 13:50
  • I edited my answer with specific instructions for Debian related to the missing dependencies, hope it helps. What distro are you using ? – euri10 Mar 21 '16 at 14:02
  • thanks - still installing this qt beast - this takes ages ;-) – ligi Mar 21 '16 at 14:39
  • 1
    ligi, try cmake . -DCMAKE_PREFIX_PATH=/home/ligi/bin/qt/5.4/gcc_64 without mix – Afr Mar 22 '16 at 8:36
  • 1
    you seem to miss llvm-3.7-dev – euri10 Mar 22 '16 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.