crossbuildin of win in ubuntu

i tried it both ways, using the prebuilt env and from scratch. in both cases it stops at 87% with an error. i have no clue how to fix that or what i must be doing wrong. anybody willing to venture a guess? the error concerns QJSEngine:
---------------------------------
[ 87%] Building CXX object libqethereum/CMakeFiles/qethereum.dir/QmlEthereum.cpp.o
In file included from /home/test/repos3/ethereum/cpp-ethereum/libqethereum/QmlEthereum.cpp:12:0:
/home/test/repos3/ethereum/cpp-ethereum/libqethereum/QmlEthereum.h:124:51: error: \u2018QJSEngine\u2019 has not been declared
static QObject* constructU256Helper(QQmlEngine*, QJSEngine*) { return new QmlU256Helper; }
^
/home/test/repos3/ethereum/cpp-ethereum/libqethereum/QmlEthereum.h:125:50: error: \u2018QJSEngine\u2019 has not been declared
static QObject* constructKeyHelper(QQmlEngine*, QJSEngine*) { return new QmlKeyHelper; }
^
make[2]: *** [libqethereum/CMakeFiles/qethereum.dir/QmlEthereum.cpp.o] Error 1
make[1]: *** [libqethereum/CMakeFiles/qethereum.dir/all] Error 2
make: *** [all] Error 2
---------------------------------

Comments

  • exquisitusexquisitus Member Posts: 12
    that was easy, just added the include the next is much weirder.
    is there a fool proof recipe for crossbuilding the windows binaries on ubuntu. how do i solve the following?
    ------------------------------------------
    [ 92%] Built target alethzero_automoc
    Linking CXX executable alethzero.exe
    /usr/bin/x86_64-w64-mingw32-ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5.1.1'
    collect2: error: ld returned 1 exit status
    make[2]: *** [alethzero/alethzero.exe] Error 1
    make[1]: *** [alethzero/CMakeFiles/alethzero.dir/all] Error 2
    make: *** [all] Error 2
    ------------------------------------------
  • mids106mids106 Member Posts: 188 ✭✭✭
    @Maran‌ is working on crosscompiling go-ethereum for windows. Not the same thing, but maybe you could swap horror stories :)
  • AronVanAmmersAronVanAmmers Amsterdam, NetherlandsMember Posts: 40 ✭✭
    edited August 2014
    @exquisitus‌ I just followed the instructions for crossbuilding with the current code and a fresh Ubuntu 14.04. My results were the same. I used the prebuilt dependencies.

    After first build:
    [ 81%] Building CXX object libqethereum/CMakeFiles/qethereum.dir/QmlEthereum.cpp.o
    In file included from /home/aron/AlethZero/cpp-ethereum/libqethereum/QmlEthereum.cpp:12:0:
    /home/aron/AlethZero/cpp-ethereum/libqethereum/QmlEthereum.h:125:51: error: ‘QJSEngine’ has not been declared
    static QObject* constructU256Helper(QQmlEngine*, QJSEngine*) { return new QmlU256Helper; }
    ^
    /home/aron/AlethZero/cpp-ethereum/libqethereum/QmlEthereum.h:126:50: error: ‘QJSEngine’ has not been declared
    static QObject* constructKeyHelper(QQmlEngine*, QJSEngine*) { return new QmlKeyHelper; }
    ^
    make[2]: *** [libqethereum/CMakeFiles/qethereum.dir/QmlEthereum.cpp.o] Error 1
    make[1]: *** [libqethereum/CMakeFiles/qethereum.dir/all] Error 2
    make: *** [all] Error 2
    To solve this, add the following line to libqethereum/QmlEthereum.h and libqethereum/QmlEthereum.cpp:
    #include <QtQml/QJSEngine>
    The line should be outside the #if ETH_QTQML block.

    After building with this change:
    Scanning dependencies of target alethzero
    [ 88%] Building CXX object alethzero/CMakeFiles/alethzero.dir/main.cpp.o
    [ 89%] Building CXX object alethzero/CMakeFiles/alethzero.dir/MiningView.cpp.o
    [ 90%] Building CXX object alethzero/CMakeFiles/alethzero.dir/Grapher.cpp.o
    [ 91%] Building CXX object alethzero/CMakeFiles/alethzero.dir/MainWin.cpp.o
    [ 92%] Building CXX object alethzero/CMakeFiles/alethzero.dir/__/windows/qt_plugin_import.cpp.o
    [ 93%] Building CXX object alethzero/CMakeFiles/alethzero.dir/alethzero_automoc.cpp.o
    Linking CXX executable alethzero.exe
    /usr/bin/x86_64-w64-mingw32-ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5.1.1'
    collect2: error: ld returned 1 exit status
    make[2]: *** [alethzero/alethzero.exe] Error 1
    make[1]: *** [alethzero/CMakeFiles/alethzero.dir/all] Error 2
    make: *** [all] Error 2
    I have been able to achieve my goal of building a fresh AlethZero using the instructions for building on Windows using Visual Studio though.
Sign In or Register to comment.