cross compil qt5

Discussion in 'General Programming Discussion' started by carlou, May 12, 2015.

  1. carlou

    carlou New Member

    Joined:
    May 10, 2015
    Messages:
    9
    Likes Received:
    0
    Hello

    i have a problem when i try tyo compil qt5 on udoo based on the tutorial
    at step 4.4
    ./init-repository

    The error returned is:
    Depuis git://gitorious.org/qt/qtxmlpatterns
    * branch HEAD -> FETCH_HEAD
    + git config commit.template /home/carlou/UDOO_Qt5_build/qt5/qtxmlpatterns/../.commit-template
    + git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtxmlpatterns
    + git config remote.gerrit.fetch +refs/heads/*:refs/remotes/gerrit/* /heads/
    + git submodule update --recursive
    + git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qt5
    + git config remote.gerrit.fetch +refs/heads/*:refs/remotes/gerrit/* /heads/
    Aliasing ..../../qtrepotools/git-hooks/gerrit_commit_msg_hook
    as Entrée dans 'qt3d'.git/hooks/commit-msg ...
    Cannot create forwarding script Entrée dans 'qt3d'.git/hooks/commit-msg: Aucun fichier ou dossier de ce type

    have you an idee of what is the problem?
    thx!
     
  2. carlou

    carlou New Member

    Joined:
    May 10, 2015
    Messages:
    9
    Likes Received:
    0
    problem solved after replacing
    qt5$ git checkout 5.3
    by
    qt5$ git checkout 5.4

    to be continued...
     
  3. nicola

    nicola Member

    Joined:
    Apr 23, 2014
    Messages:
    45
    Likes Received:
    0
    Hi, I'm also trying to cross-compile Qt5.4 but I'm upgrading my current development config where i have Qt5.3. I just realized two points:
    • gitorious is shutting down
    • Qt project changed domain, the new one is qt.io
    The new wiki at http://wiki.qt.io/Building-Qt-5-from-Git uses the git repo git://code.qt.io/qt/qt5.git
     
  4. carlou

    carlou New Member

    Joined:
    May 10, 2015
    Messages:
    9
    Likes Received:
    0
    thx for your answer

    but nothing to do, i can't compil qt5
    I have try many configuration, qt 5.3 to qt 5.5, on host machine, on udoo etc but always multiples errors on make
    :(
     
  5. nicola

    nicola Member

    Joined:
    Apr 23, 2014
    Messages:
    45
    Likes Received:
    0
    What version of operating system are you using?
    The tutorial works only on the previous official OS Ubuntu 12.04 LTS (open the last tab on the right). If you are using UDOObuntu the tutorial wont work.
    I'm currently using a cross-compiled Qt5.3.0 built following the tutorial so I think it should still work for that version. You can post some of the errors you get, maybe someone on the forum can help you.
     
  6. carlou

    carlou New Member

    Joined:
    May 10, 2015
    Messages:
    9
    Likes Received:
    0
    finaly don't work
    For qt5.3 i can't get the repository

    the detail tha i made :

    first i have created a sd card with ubuntu 12.04lts with updates

    on my host machine:

    Code:
    mkdir Qt5_build
    cd Qt5_build
    
    git clone https://github.com/embest-tech/fsl-linaro-toolchain.git
    unpack
    
    cd /media/carlou/udoo_ubu1204/usr/lib
    lib$ sudo rm libEGL.so
    lib$ sudo rm libEGL.so.1
    lib$ sudo rm libGAL.so
    lib$ sudo ln -s libEGL-fb.so libEGL.so
    lib$ sudo ln -s libEGL-fb.so libEGL.so.1
    lib$ sudo ln -s libGAL-fb.so libGAL.so
    lib$ cd /home/carlou/Qt5_build
    
    git clone git://code.qt.io/qt/qt5.git qt5
    cd qt5
    git checkout 5.4
    
    git clone git://code.qt.io/qt/qt3d.git qt3d
    
    ./init-repository
    edit the qmake.conf
    Code:
    gedit qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf
    my config
    
    include(../common/linux_device_pre.conf)
    
    EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_imx6.cpp
    
    QMAKE_INCDIR           += $$[QT_SYSROOT]/usr/include $$[QT_SYSROOT]/usr/include/arm-linux-gnueabi
    QMAKE_LIBDIR           += $$[QT_SYSROOT]/usr/lib
    
    QMAKE_LIBS_EGL         += -lEGL
    QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL -lGAL
    QMAKE_LIBS_OPENVG      += -lOpenVG -lEGL -lGAL
    
    QMAKE_LFLAGS           += -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib -Wl,-rpath-link,$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabi
    
    IMX6_CFLAGS             = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1
    QMAKE_CFLAGS           += $$IMX6_CFLAGS
    QMAKE_CXXFLAGS         += $$IMX6_CFLAGS
    
    include(../common/linux_arm_device_post.conf)
    
    load(qt_config)
    for the error with GL_VIV_I420:
    Code:
    gedit qtmultimedia/src/plugins/videonode/imx6/qsgvivantevideonode.cpp
    
    in function const QMap<QVideoFrame::pixelFormat, GLenum>& QSGVivanteVideoNode::getVideoFormat2GLFormatMap()
    {
    if (static_VideoFormat2GLFormatMap.isEmpty()) {
    // static_VideoFormat2GLFormatMap.insert(QVideoFrame::Format_YUV420P, GL_VIV_I420);
    this video format needs to be commented because it will have support with kernel 3.10 but not with actual one
    
    my configure:
    Code:
    ./configure -prefix /opt/qt5 -make libs -no-pch -no-opengl -device imx6 -device-option CROSS_COMPILE=/home/carlou/Qt5_build/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- -no-largefile -opengl es2 -qt-zlib -qt-libpng -qt-libjpeg -no-nis -no-cups -gui -make examples -sysroot /media/carlou/udoo_ubu1204 -no-gcc-sysroot -opensource -confirm-license -qreal float -v
    
      Configure summary
    
    Building on:  linux-g++ (x86_64, CPU features: mmx sse sse2)
    Building for:  devices/linux-imx6-g++ (arm, CPU features: neon)
    Platform notes:
    
      - Also available for Linux: linux-kcc linux-icc linux-cxx
       
    qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_MTDEV DEFINES += QT_NO_LIBUDEV QMAKE_X11_PREFIX = /usr sql-drivers =  sql-plugins =  sqlite qmake switches ......... [solved]
    
    Build options:
      Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus egl eglfs evdev eventfd freetype full-config getaddrinfo getifaddrs harfbuzz iconv inotify ipv6ifname large-config linuxfb medium-config minimal-config mremap neon opengl opengles2 openvg pcre png posix_fallocate qpa qpa reduce_exports release rpath shared small-config zlib
      Build parts ............  libs examples
      Mode ................... release
      Using C++11 ............ yes
      Using gold linker....... no
      Using PCH .............. no
      Target compiler supports:
      Neon ................. yes
    
    Qt modules and options:
      Qt D-Bus ............... yes (loading dbus-1 at runtime)
      Qt Concurrent .......... yes
      Qt GUI ................. yes
      Qt Widgets ............. yes
      Large File ............. no[solved]
      QML debugging .......... yes
      Use system proxies ..... no
    
    Support enabled for:
      Accessibility .......... yes
      ALSA ................... no
      CUPS ................... no
      Evdev .................. yes
      FontConfig ............. no
      FreeType ............... yes (bundled copy)
      Glib ................... no
      GTK theme .............. no
      HarfBuzz ............... yes (bundled copy)
      Iconv .................. yes
      ICU .................... no
      Image formats:
      GIF .................. yes (plugin, using bundled copy)
      JPEG ................. yes (plugin, using bundled copy)
      PNG .................. yes (in QtGui, using bundled copy)
      journald ............... no
      mtdev .................. no
      Networking:
      getaddrinfo .......... yes
      getifaddrs ........... yes
      IPv6 ifname .......... yes
      OpenSSL .............. no
      NIS .................... no
      OpenGL / OpenVG:
      EGL .................. yes
      OpenGL ............... yes (OpenGL ES 2.0+)
      OpenVG ............... yes-auto
      PCRE ................... yes (bundled copy)
      pkg-config ............. yes
      PulseAudio ............. no
      QPA backends:
      DirectFB ............. no
      EGLFS ................ yes
      KMS .................. no
      LinuxFB .............. yes
      XCB .................. no
      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[solved]
      udev ................... no
      xkbcommon .............. no
      zlib ................... yes (bundled copy)
    
    Info: creating super cache file /home/carlou/Qt5_build/qt5/.qmake.super
    
    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.
    Qt will be installed into /opt/qt5
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    when i run Make, the end is :
    Code:
    make[5]: Leaving directory '/home/carlou/Qt5_build/qt5/qtmultimedia/examples/multimedia/video/qmlvideofx'
    make[4]: Leaving directory '/home/carlou/Qt5_build/qt5/qtmultimedia/examples/multimedia/video'
    make[3]: Leaving directory '/home/carlou/Qt5_build/qt5/qtmultimedia/examples/multimedia'
    make[2]: Leaving directory '/home/carlou/Qt5_build/qt5/qtmultimedia/examples'
    make[1]: Leaving directory '/home/carlou/Qt5_build/qt5/qtmultimedia'
    and Make install:
    Code:
    /home/carlou/Qt5_build/qt5/qtbase/include/QtGui/../../src/gui/math3d/qmatrix4x4.h:893:16: note:  no known conversion for argument 1 from 'const QQuaternion' to 'const QMatrix4x4&'
    /home/carlou/Qt5_build/qt5/qtbase/include/QtGui/../../src/gui/math3d/qmatrix4x4.h:949:19: note: QMatrix4x4 operator*(float, const QMatrix4x4&)
    /home/carlou/Qt5_build/qt5/qtbase/include/QtGui/../../src/gui/math3d/qmatrix4x4.h:949:19: note:  no known conversion for argument 1 from 'const QQuaternion' to 'float'
    /home/carlou/Qt5_build/qt5/qtbase/include/QtGui/../../src/gui/math3d/qmatrix4x4.h:972:19: note: QMatrix4x4 operator*(const QMatrix4x4&, float)
    /home/carlou/Qt5_build/qt5/qtbase/include/QtGui/../../src/gui/math3d/qmatrix4x4.h:972:19: note:  no known conversion for argument 1 from 'const QQuaternion' to 'const QMatrix4x4&'
    Makefile:10061: recipe for target '.obj/qcamera.o' failed
    make[3]: *** [.obj/qcamera.o] Error 1
    make[3]: Leaving directory '/home/carlou/Qt5_build/qt5/qt3d/src/core'
    Makefile:63: recipe for target 'sub-core-install_subtargets' failed
    make[2]: *** [sub-core-install_subtargets] Error 2
    make[2]: Leaving directory '/home/carlou/Qt5_build/qt5/qt3d/src'
    Makefile:56: recipe for target 'sub-src-install_subtargets' failed
    make[1]: *** [sub-src-install_subtargets] Error 2
    make[1]: Leaving directory '/home/carlou/Qt5_build/qt5/qt3d'
    Makefile:364: recipe for target 'module-qt3d-install_subtargets' failed
    make: *** [module-qt3d-install_subtargets] Error 2
    what is wrong? why i c'ant get the repository of the 5.3 version?
    thx!
     
  7. carlou

    carlou New Member

    Joined:
    May 10, 2015
    Messages:
    9
    Likes Received:
    0
    it seems that the problem is solved
    the git repo git://code.qt.io/qt/qt5.git is bugged for the version 5.3 so, i have dowloaded the package here http://download.qt.io/archive/qt/5.3/
    not tested with qt3d (not need for me)
     

Share This Page