Qt-5.2.1 cross-compile for BeagleBone with Debian 7.5



  • Regards to all!

    I'm new in this group.

    Forgive me if suddenly a topic already seen, but I have not found an answer at all... (it's a few months that I try!).

    Is it possible to cross-compile QT5 for any version of Linux x11 with the BeagleBone?

    I want cross compile Qt for develop with QtCreator and run my application on BB (now I'm trying with debian 7.5 from "here":http://elinux.org/Beagleboard:BeagleBoneBlack_Debian).

    My best results is with bare-metal library downloaded from here":http://armsdr.blogspot.it/2014/03/qt-521-beaglebone-binaries.html
    It works perfectly, both with example that with my test application (if compiled on BB!).

    Now I'm trying to cross-compile Qt on my pc with that configuration (every following "Louis McCarthy":http://armsdr.blogspot.it/2014/01/bare-metal-qt-52-on-beaglebone-black.html beautifull tutorial!):

    @
    ../qt-everywhere-opensource-src-5.2.1/configure -v
    -sysroot /home/user/qt-5.2-target/debian-7.5
    -opensource -confirm-license
    -prefix /usr/local/qt-deb-5.2.1
    -no-largefile -no-accessibility
    -qt-zlib -no-gif -qt-libpng -qt-libjpeg -no-nis -no-cups
    -xplatform linux-linaro-gnueabihf-g++
    -device linux-beaglebone-g++
    -device-option CROSS_COMPILE=/usr/local/linaro/bin/arm-linux-gnueabihf-
    @

    If I cut -sysroot ... option I've no problem in compilation, but application can work only with linuxfb platform, not under X.
    With ".sysroot..." option (obviously the copy of my uSD file-system), configure give me that report:

    @ Configure summary

    Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
    Building for: devices/linux-beaglebone-g++ (arm, CPU features: neon)

    qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_MTDEV QMAKE_CFLAGS_FONTCONFIG = -I/home/cecco/qt-5.2-target/debian-7.5/usr/include/freetype2 QMAKE_LIBS_FONTCONFIG = -L/home/cecco/qt-5.2-target/debian-7.5/usr/lib/arm-linux-gnueabihf -lfontconfig -lfreetype DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_XKB QMAKE_CFLAGS_XCB = QMAKE_LIBS_XCB = -L/home/cecco/qt-5.2-target/debian-7.5/usr/lib/arm-linux-gnueabihf -lxcb-sync -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb-randr -lxcb-image -lxcb-shm -lxcb-keysyms -lxcb-icccm -lxcb QMAKE_CFLAGS_DIRECTFB = -D_REENTRANT -I/home/cecco/qt-5.2-target/debian-7.5/usr/include/directfb QMAKE_LIBS_DIRECTFB = -L/home/cecco/qt-5.2-target/debian-7.5/usr/lib/arm-linux-gnueabihf -ldirectfb -lfusion -ldirect -lpthread sql-drivers = sql-plugins = sqlite qmake switches .........

    Build options:
    Configuration .......... alsa audio-backend c++11 compile_examples concurrent cross_compile directfb evdev eventfd fontconfig full-config getaddrinfo getifaddrs iconv inotify ipv6ifname large-config linuxfb medium-config minimal-config mremap neon no-gif no-harfbuzz opengl openssl pcre png posix_fallocate precompile_header qpa qpa reduce_exports reduce_relocations release rpath shared small-config system-freetype xcb xcb-glx xcb-render xcb-sm xcb-xlib xinput2 xkbcommon-qt xlib xrender zlib
    Build parts ............ libs examples
    Mode ................... release
    Using C++11 ............ yes
    Using PCH .............. yes
    Target compiler supports:
    iWMMXt/Neon .......... no/yes

    Qt modules and options:
    Qt D-Bus ............... no
    Qt Concurrent .......... yes
    Qt GUI ................. yes
    Qt Widgets ............. yes
    JavaScriptCore JIT ..... yes (To be decided by JavaScriptCore)
    QML debugging .......... yes
    Use system proxies ..... no

    Support enabled for:
    Accessibility .......... no
    ALSA ................... yes
    CUPS ................... no
    FontConfig ............. yes
    FreeType ............... system
    Iconv .................. yes
    ICU .................... no
    Image formats:
    GIF .................. no
    JPEG ................. yes (plugin, using bundled copy)
    PNG .................. yes (in QtGui, using bundled copy)
    Glib ................... no
    GTK theme .............. no
    Large File ............. no
    mtdev .................. no
    Networking:
    getaddrinfo .......... yes
    getifaddrs ........... yes
    IPv6 ifname .......... yes
    OpenSSL .............. yes (loading libraries at run-time)
    NIS .................... no
    OpenGL ................. desktop
    OpenVG ................. no
    PCRE ................... yes (bundled copy)
    pkg-config ............. yes
    PulseAudio ............. no
    QPA backends:
    DirectFB ............. yes
    EGLFS ................ no
    KMS .................. no
    LinuxFB .............. yes
    XCB .................. yes (system library)
    MIT-SHM ............ yes
    Xcb-Xlib ........... yes
    Xcursor ............ yes (loaded at runtime)
    Xfixes ............. yes (loaded at runtime)
    Xi ................. no
    Xi2 ................ yes
    Xinerama ........... yes (loaded at runtime)
    Xrandr ............. yes (loaded at runtime)
    Xrender ............ yes
    XKB ................ no
    XShape ............. yes
    XSync .............. yes
    XVideo ............. yes
    Session management ..... yes
    SQL drivers:
    DB2 .................. no
    InterBase ............ no
    MySQL ................ no
    OCI .................. no
    ODBC ................. no
    PostgreSQL ........... no
    SQLite 2 ............. no
    SQLite ............... yes (plugin, using bundled copy)
    TDS .................. no
    udev ................... no
    xkbcommon .............. yes (bundled copy)
    zlib ................... yes (bundled copy)
    @

    but during "make" I get this error:

    @
    /usr/local/linaro/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: /home/user/qt-5.2-target/debian-7.5/usr/lib/arm-linux-gnueabihf/libm.a(mpa.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
    @

    What have I to "recompile with -fPIC" ?
    I can't figure how proceed!

    I'm sure to be closer to my goal, but...

    Thank you in advance!



  • Hi,
    no one can help me?
    Thanks.


Log in to reply
 

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