qtcross-compilingembedded-linuxqtnetworkqtembedded

Qt 4.8.4 Cross-Compiled for Embedded Linux fails with QNetworkProxy Error


I'm trying to cross-compile Qt for embedded Linux with the following options:

(cd /home/user/proj/output/buildroot/build/company-qt-4.8.4; PKG_CONFIG_SYSROOT_DIR="/home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot" PKG_CONFIG="/home/user/proj/output/buildroot/host/usr/bin/pkg-config" PKG_CONFIG_PATH="/home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/pkgconfig:" MAKEFLAGS="w --  -j8" ./configure -silent -force-pkg-config -separate-debug-info -xplatform qws/linux-arm-gnueabi-g++-company -qconfig company -opensource -confirm-license -largefile -no-qt3support -nomake examples -nomake demos -depths 16,32 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-qvfb -qt-gfx-vnc -no-gfx-multiscreen -no-gfx-directfb -no-mouse-pc -no-mouse-linuxtp -qt-mouse-linuxinput -qt-mouse-tslib -no-mouse-qvfb -no-kbd-tty -qt-kbd-linuxinput -no-kbd-qvfb -debug -shared -little-endian -embedded arm -no-gif -no-libmng -system-zlib -system-libjpeg -qt-libpng -no-libtiff -system-freetype -I /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include/freetype2/ -dbus -qdbus -no-openssl -qt-sql-sqlite -xmlpatterns -exceptions -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -svg -webkit -script -no-scripttools -javascript-jit -stl -declarative -no-pch -glib -no-gfx-qnx -no-kbd-qnx -no-mouse-qnx -no-xinerama -no-cups -no-nis -no-accessibility -prefix /usr -hostprefix /home/user/proj/output/buildroot/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr -fast -no-rpath )

I really need webkit for the embedded device and if I include "-webkit" in the configuration options, then the build eventually fails with the traceback below:

../../../../../include/QtCore/../../src/corelib/tools/qlist.h:418:17: error: invalid use of incomplete type ‘class QNetworkProxy’
In file included from ../../../../../include/QtNetwork/qnetworkaccessmanager.h:1:0,
                 from ../../../../../include/QtNetwork/QNetworkAccessManager:1,
                 from platform/network/qt/ProxyServerQt.cpp:32:
../../../../../include/QtNetwork/../../src/network/access/qnetworkaccessmanager.h:62:7: error: forward declaration of ‘class QNetworkProxy’
make[4]: *** [.obj/debug-static-emb-arm/ProxyServerQt.o] Error 1
make[4]: Leaving directory `/home/user/proj/output/buildroot/build/company-qt-4.8.4/src/3rdparty/webkit/Source/WebCore'
make[3]: *** [sub-WebCore-make_default-ordered] Error 2
make[3]: Leaving directory `/home/user/proj/output/buildroot/build/company-qt-4.8.4/src/3rdparty/webkit/Source'
make[2]: *** [sub-webkit-make_default-ordered] Error 2
make[2]: Leaving directory `/home/user/proj/output/buildroot/build/company-qt-4.8.4'
make[1]: *** [/home/user/proj/output/buildroot/build/company-qt-4.8.4/.stamp_built] Error 2
make[1]: Leaving directory `/home/user/proj/buildroot'

If I remove only the "-webkit" option, then the build completes just fine.

So why do I get the QNetworkProxy error and how can I fix it? Thanks!

EDIT: Note that I have also tried to add the following to explicitly include QNetworkProxy but I get exactly the same error:

-feature-networkproxy

Solution

  • I found out that there was a qconfig.h file being included that had the following define:

    //Do not need this one
    #ifndef QT_NO_NETWORKPROXY
    #  define QT_NO_NETWORKPROXY
    #endif
    

    This was obviously the problem.