POC 3 C++ build fails on Debian

Trying to compile POC3 on Debian Wheezy (stable), following the instructions for Ubuntu.

Regarding dependencies, Ubuntu instructions page mentions libboost1.53-all-dev. Debian stable has only 1.49 so I installed 1.54 from the testing.

According to Ubuntu instructions page, you can install headless version, and "If you want to build the GUI client, AlephZero, you'll need to make sure you have Qt installed", but trying that I run into this error:
  CMake Error at alethzero/CMakeLists.txt:26 (find_package):
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.

Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:

Qt5WidgetsConfig.cmake
qt5widgets-config.cmake

Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.

So I installed qt5 (from testing as well), then tried to compile again:
make
[ 2%] Built target secp256k1
[ 5%] Building CXX object libethereum/CMakeFiles/ethereum.dir/State.cpp.o
[ 8%] Building CXX object libethereum/CMakeFiles/ethereum.dir/PeerNetwork.cpp.o
/opt/ethereum/cpp-ethereum-0.3.8/libethereum/PeerNetwork.cpp: In member function `bool eth::PeerSession::interpret(const eth::RLP&)`:
/opt/ethereum/cpp-ethereum-0.3.8/libethereum/PeerNetwork.cpp:155:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[ 10%] Building CXX object libethereum/CMakeFiles/ethereum.dir/Client.cpp.o
[ 13%] Building CXX object libethereum/CMakeFiles/ethereum.dir/MemTrie.cpp.o
[ 16%] Building CXX object libethereum/CMakeFiles/ethereum.dir/TrieHash.cpp.o
[ 18%] Building CXX object libethereum/CMakeFiles/ethereum.dir/BlockInfo.cpp.o
[ 21%] Building CXX object libethereum/CMakeFiles/ethereum.dir/Dagger.cpp.o
[ 24%] Building CXX object libethereum/CMakeFiles/ethereum.dir/Defaults.cpp.o
[ 27%] Building CXX object libethereum/CMakeFiles/ethereum.dir/TrieDB.cpp.o
[ 29%] Building CXX object libethereum/CMakeFiles/ethereum.dir/Instruction.cpp.o
[ 32%] Building CXX object libethereum/CMakeFiles/ethereum.dir/Common.cpp.o
[ 35%] Building CXX object libethereum/CMakeFiles/ethereum.dir/AddressState.cpp.o
[ 37%] Building CXX object libethereum/CMakeFiles/ethereum.dir/RLP.cpp.o
[ 40%] Building CXX object libethereum/CMakeFiles/ethereum.dir/TransactionQueue.cpp.o
[ 43%] Building CXX object libethereum/CMakeFiles/ethereum.dir/TrieCommon.cpp.o
[ 45%] Building CXX object libethereum/CMakeFiles/ethereum.dir/BlockChain.cpp.o
[ 48%] Building CXX object libethereum/CMakeFiles/ethereum.dir/UPnP.cpp.o
/opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp: In constructor `eth::UPnP::UPnP()`:
/opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp:48:127: error: too many arguments to function `UPNPDev* upnpDiscover(int, const char*, const char*, int)`
In file included from /opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp:26:0:
/usr/include/miniupnpc/miniupnpc.h:45:26: note: declared here
/opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp: In member function `int eth::UPnP::addRedirect(const char*, int)`:
/opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp:114:129: error: too many arguments to function `int UPNP_AddPortMapping(const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*)`
In file included from /opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp:27:0:
/usr/include/miniupnpc/upnpcommands.h:123:1: note: declared here
/opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp:122:126: error: too many arguments to function `int UPNP_AddPortMapping(const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*)`
In file included from /opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp:27:0:
/usr/include/miniupnpc/upnpcommands.h:123:1: note: declared here
/opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp:127:124: error: too many arguments to function `int UPNP_AddPortMapping(const char*, const char*, const char*, const char*, const char*, const char*, const char*, const char*)`
In file included from /opt/ethereum/cpp-ethereum-0.3.8/libethereum/UPnP.cpp:27:0:
/usr/include/miniupnpc/upnpcommands.h:123:1: note: declared here
make[2]: *** [libethereum/CMakeFiles/ethereum.dir/UPnP.cpp.o] Error 1
make[1]: *** [libethereum/CMakeFiles/ethereum.dir/all] Error 2
make: *** [all] Error 2
I don't know how to fix this error, please help.

Comments

  • RomyenRomyen Member Posts: 1
    I am also trying to install Ethereum on Debian stable, i.e. wheezy. so far unsuccessfully. This probably doesn't help with your specific problem, but I think my comments should go here rather than starting a new thread. I am not going to switch to testing on my computer, because I am worried about screwing up other things. If I switch to testing, I'll set it up on a clean computer, from scratch, but if I take that approach for the sole purpose of testing etherium, I might just as well install Ubuntu.

    I haven't yet given up installing Etherium on Debian stable, and here's the approach I've used so far.

    First, I installed qt5 directly using an installer downloaded from qt-project. It isn't necessary to switch to testing for that. If I install as superuser, qt5 automatically goes below my /opt directory, and the libraries are found during installation. This seems to be a much safer thing to do, than install from testing.

    Second, libboost1.53-all-dev is not available in either stable (1.49 used) or testing (1.54 or 1.55 used). All the other listed dependencies can be installed in stable:

    build-essential
    libgmp-dev
    libgmp3-dev
    libcrypto++-dev
    git
    cmake
    automake
    libtool
    libleveldb-dev
    yasm
    unzip
    libminiupnpc-dev

    I'm encountering a dependency problem here:

    Scanning dependencies of target BuildInfo.h
    Current source dir: /home/myhomedirectory/Project/Coins/cpp-ethereum-0.3.11
    Current binary dir: /home/myhomedirectory/Project/Coins/cpp-ethereum-build
    Build type: Release
    Build platform: Linux/g++
    Unknown repo.
    [ 0%] Built target BuildInfo.h
    Scanning dependencies of target secp256k1
    [ 2%] Building C object secp256k1/CMakeFiles/secp256k1.dir/secp256k1.c.o
    Linking C static library libsecp256k1.a
    [ 2%] Built target secp256k1
    Scanning dependencies of target ethereum
    [ 5%] Building CXX object libethereum/CMakeFiles/ethereum.dir/VM.cpp.o
    In file included from /home/myhomedirectory/Project/Coins/cpp-ethereum-0.3.11/libethereum/VM.h:39:0,
    from /home/myhomedirectory/Project/Coins/cpp-ethereum-0.3.11/libethereum/VM.cpp:22:
    /home/myhomedirectory/Project/Coins/cpp-ethereum-0.3.11/libethereum/Common.h:53:44: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    compilation terminated.
    make[2]: *** [libethereum/CMakeFiles/ethereum.dir/VM.cpp.o] Error 1
    make[1]: *** [libethereum/CMakeFiles/ethereum.dir/all] Error 2
    make: *** [all] Error 2

    This looks like it might be a problem with libboost. I'm using 1.49 which comes with stable. If you switched to Debian testing, then you must be using 1.54 or 1.55. Is that right?

    One thing I tried, but didn't yet finish, is to download the *.deb file from the Ubuntu repository, and manually installing it. I didn't finish, because there are a lot of dependencies to libboost1.53-all-dev that I would need to install as well.

    There must be an easier way. Please help!
  • kershykershy Member Posts: 46
    @empyrean

    The Qt5 issues can be solved by adding the following libraries

    snappy libsnappy-dev qtdeclarative5-dev

    See: https://github.com/ethereum/cpp-ethereum/wiki/Building-on-Ubuntu

    Unfortunately, the build instructions for the PoC are not well updated.
    But the only difference is that you use the Git repository instead of a source-file.
  • IgorIgor BrasilMember Posts: 37 ✭✭
Sign In or Register to comment.