[Solved] Cross compile



  • hi,
    I'm trying to compile qt for x86 platform with toolchain
    other than the host, the result is qt with framebuffer, instead I want qt with x11. How do I configure to get with x11?



  • Check if this other toolchain finds correctly the dependencies listed in "this page":http://doc.trolltech.com/4.7/requirements-x11.html

    Provide more information about your environment, it can help us to find your issue :-)



  • i try to compile with the buildroot uclib toolchain. I have added in mkspecs my dir for the crosscompiling copied from linux-g++ with the difference of the qmake.conf. The qmake.conf has that information:
    @
    MAKEFILE_GENERATOR = UNIX
    TARGET_PLATFORM = unix
    TEMPLATE = app
    CONFIG += qt warn_on release incremental link_prl
    QT += core gui
    QMAKE_INCREMENTAL_STYLE = sublib

    include(../common/g++.conf)
    include(../common/linux.conf)
    QMAKE_QMAKE_INCDIR_X11 = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/include/
    QMAKE_QMAKE_LIBDIR_X11 = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/target/usr/lib/
    QMAKE_LFLAGS = -L/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/lib -L/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/lib
    QMAKE_CXXFLAGS = --sysroot=/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging -pipe -Os -mtune=i686 -march=i686 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/include -I/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/include
    QMAKE_CFLAGS = --sysroot=/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging -pipe -Os -mtune=i686 -march=i686 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/include -I/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/include
    QMAKE_STRIP = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/bin/i686-unknown-linux-uclibc-strip
    QMAKE_RANLIB = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/bin/i686-unknown-linux-uclibc-ranlib
    QMAKE_OBJCOPY = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/bin/i686-unknown-linux-uclibc-objcopy
    QMAKE_AR = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/bin/i686-unknown-linux-uclibc-ar cqs
    QMAKE_LINK_SHLIB = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/bin/i686-unknown-linux-uclibc-g++ --sysroot=/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging
    QMAKE_LINK = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/bin/i686-unknown-linux-uclibc-g++ --sysroot=/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging
    QMAKE_CXX = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/bin/i686-unknown-linux-uclibc-g++
    QMAKE_CC = /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/bin/i686-unknown-linux-uclibc-gcc
    load(qt_config)
    @

    after when i try to compile with:

    @
    PKG_CONFIG_SYSROOT_DIR="/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging" PKG_CONFIG="/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/host/usr/bin/pkg-config" PKG_CONFIG_PATH="/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr/lib/pkgconfig:" ./configure -silent -force-pkg-config -opensource -confirm-license -xplatform linux-x11-crosscompile-g++ -arch i386 -largefile -no-qt3support -nomake examples -nomake demos -depths 8,16,32 -no-gfx-linuxfb -no-gfx-transformed -no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen -no-gfx-directfb -no-mouse-pc -no-mouse-linuxtp -no-mouse-linuxinput -no-mouse-tslib -no-mouse-qvfb -no-kbd-tty -no-kbd-linuxinput -no-kbd-qvfb -release -shared -little-endian -no-gif -no-libmng -qt-zlib -no-libjpeg -no-libpng -no-libtiff -no-freetype -no-openssl -no-sql-sqlite -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-svg -no-webkit -script -no-scripttools -javascript-jit -no-stl -no-gfx-qnx -no-kbd-qnx -no-mouse-qnx -no-cups -no-nis -no-accessibility -no-separate-debug-info -prefix /usr -hostprefix /home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/staging/usr -fast -no-rpath ;

    @
    i have this problem at linking:
    @
    compiling .moc/release-shared/moc_qdeclarativedebug_p.cpp
    rm -f libQtDeclarative.so.4.7.0 libQtDeclarative.so libQtDeclarative.so.4 libQtDeclarative.so.4.7
    linking ../../lib/libQtDeclarative.so.4.7.0
    .obj/release-shared/moc_qdeclarativeview.o:(.data.rel.ro._ZTV16QDeclarativeView[vtable for QDeclarativeView]+0xb0): undefined reference to `QWidget::x11Event(_XEvent*)'
    collect2: ld returned 1 exit status
    make[1]: *** [../../lib/libQtDeclarative.so.4.7.0] Errore 1
    make[1]: uscita dalla directory «/home/vittorio/lavoro/media_box/buildroot/buildroot-2010.08/output/build/qt-everywhere-opensource-src-4.7.0/src/declarative»
    make: *** [sub-declarative-make_default-ordered] Errore 2
    @

    have some idea to solve the problem?

    thanks



  • Resolved with gcc 4.4


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.