Debian Wheezy - Build Tips

I succesfully built the console client on Debian Wheezy. For now I am testing this. In need of any tips, your welcome.

If someone knows how to get the graphical client working on debian feel free to enlighten me.

Comments

  • accapeaccape Member Posts: 66
    How does the UI fail?
  • arckearcke Member Posts: 34
    Not yet tried it. Can we test mine with the console client?

    I will try installing a qt5 binary from the web. I dont think there is an appropriate qt in debian stable.
  • accapeaccape Member Posts: 66
    Mining doesn't really seem to work. I think my client found a block (at least there was some message that indicated that i was the one finding it) but since then nothing really happened.
  • arckearcke Member Posts: 34
    edited February 2014
    How do you test mining? When I try the -m switch this is what happens:

    [email protected]:~/cpp-ethereum-build$ LD_LIBRARY_PATH=$HOME/lib eth/eth -m
    Opened blockchain db. Latest: ##############################################
    Address: 127.0.0.1 = 127.0.0.1 [LOCAL]
    Address: 10.0.0.2 = 10.0.0.2 [PEER]
    TB : init_upnp()
    Listening on local port 30303 (public: 0.0.0.0:0)
    Mode: Full
    Attempting connection to -m:30303
    Initialising: latest=###############################################
    Connection refused (resolve: Host not found (authoritative))
  • accapeaccape Member Posts: 66
    edited February 2014
    Try ./eth -x 256 -l 30303 -m on -v 1 54.200.78.45
    CPU is constantly at 100%, so i guess it's mining
  • arckearcke Member Posts: 34
    It connects and at least 1 CPU core is busy right now.
  • accapeaccape Member Posts: 66
    Someone just found the second block and my first transaction is now confirmed
  • arckearcke Member Posts: 34
    Yes, I noticed. On my way to building the qt client i get the following error.

    [email protected]:~/cpp-ethereum-build/alephzero$ ~/Qt5.2.0/5.2.0/gcc_64/bin/qmake ../../cpp-ethereum/alephzero
    [email protected]:~/cpp-ethereum-build/alephzero$ make
    g++ -c -pipe -std=c++11 -O2 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../Qt5.2.0/5.2.0/gcc_64/mkspecs/linux-g++ -I../../cpp-ethereum/alephzero -I../../secp256k1/include -I../../cryptopp562 -I../../cpp-ethereum -I../../include -I../../Qt5.2.0/5.2.0/gcc_64/include -I../../Qt5.2.0/5.2.0/gcc_64/include/QtWidgets -I../../Qt5.2.0/5.2.0/gcc_64/include/QtNetwork -I../../Qt5.2.0/5.2.0/gcc_64/include/QtGui -I../../Qt5.2.0/5.2.0/gcc_64/include/QtCore -I. -I. -I. -o MainWin.o ../../cpp-ethereum/alephzero/MainWin.cpp
    In file included from ../../cpp-ethereum/alephzero/MainWin.cpp:6:0:
    ./ui_Main.h:14:25: fatal error: QtGui/QAction: No such file or directory
    compilation terminated.
    make: *** [MainWin.o] Error 1
  • accapeaccape Member Posts: 66
    You lack some development files for qt
  • accapeaccape Member Posts: 66
    I think I know your mistake. You need to use qmake instead of make.
  • arckearcke Member Posts: 34
    edited February 2014
    Actually I had to clean the directory once and it corrected some previous misconfigurations.

    Now I get this

    g++ -Wl,-O1 -Wl,-rpath,/home/test/Qt5.2.0/5.2.0/gcc_64 -Wl,-rpath,/home/test/Qt5.2.0/5.2.0/gcc_64/lib -o alephzero main.o MainWin.o moc_MainWin.o -L/home/test/lib:MAKE_LIBDIR -Wl,-rpath,../../cpp-ethereum-build/libethereum -Wl,-rpath,../../secp256k1 -Wl,-rpath,../../cryptopp562 -lethereum -lminiupnpc -lsecp256k1 -lleveldb -lcryptopp -lgmp -lboost_filesystem -lboost_system -L/home/test/Qt5.2.0/5.2.0/gcc_64/lib -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread
    /usr/bin/ld: cannot find -lethereum
    /usr/bin/ld: cannot find -lsecp256k1
    collect2: error: ld returned 1 exit status
    make: *** [alephzero] Error 1

    while the console client does find these and builds fine.

    Modify: Maybe add some extra includes to .pro or flags to the compiler.

    Modify: Build is OK!
  • arckearcke Member Posts: 34
    edited February 2014
    After the git repository was updated I tried to recompile. First I got a client which immediately dumped core. Then I deleted my source and kept my modified CMakeLists.txt aned alephzero.pro containing respectively

    SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "/home/test/include")
    SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "/home/test/lib")

    FIND_PACKAGE(Boost)
    IF (Boost_FOUND)
    INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
    ADD_DEFINITIONS( "-DHAS_BOOST" )
    ENDIF()

    and

    INCLUDEPATH += /home/test/include
    QMAKE_LIBDIR += /home/test/lib

    since I do not want boost 1.55 in system directories.

    Next I pull the source from git and recreate cpp-ethereum-build and do

    [email protected]:~/cpp-ethereum-build$ cmake ../cpp-ethereum -DCMAKE_BUILD_TYPE=Release
    -- Boost version: 1.55.0
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/test/cpp-ethereum-build

    and then make produces this error

    [email protected]:~/cpp-ethereum-build$ make
    [ 62%] Built target ethereum
    Linking CXX executable testeth
    ../libethereum/libethereum.a(BlockChain.cpp.o): In function `eth::BlockChain::BlockChain(std::string, bool)':
    BlockChain.cpp:(.text+0x3a25): undefined reference to `boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)'
    BlockChain.cpp:(.text+0x3a92): undefined reference to `boost::filesystem::detail::remove_all(boost::filesystem::path const&, boost::system::error_code*)'
    BlockChain.cpp:(.text+0x3b0f): undefined reference to `boost::filesystem::detail::remove_all(boost::filesystem::path const&, boost::system::error_code*)'
    ../libethereum/libethereum.a(State.cpp.o): In function `eth::State::openDB(std::string, bool)':
    State.cpp:(.text+0xc89): undefined reference to `boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)'
    State.cpp:(.text+0xcd2): undefined reference to `boost::filesystem::detail::remove_all(boost::filesystem::path const&, boost::system::error_code*)'
    collect2: error: ld returned 1 exit status
    make[2]: *** [test/testeth] Error 1
    make[1]: *** [test/CMakeFiles/testeth.dir/all] Error 2
    make: *** [all] Error 2

    Does anyone know why this build fails?
  • j0bj0b Member Posts: 2
    edited February 2014
    apt-get install libqt4-dev libminiupnpc-dev

    this solved some issues for me regarding missing includes and such.

    EDIT: saw that this now exists in the howto..
  • arckearcke Member Posts: 34
    It compiled fine before I updated git. Maybe I'm missing some flag for boost, but it already detects boost and if I dont modify CMakeLists.txt it gives an error as soon as the first boost include comes by. So it does detect boost, but then when linking the executable it doesn't.
Sign In or Register to comment.