Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. cross-compile Qt 5.5 for iMX6 - with or without -no-gcc-sysroot?
Qt 6.11 is out! See what's new in the release blog

cross-compile Qt 5.5 for iMX6 - with or without -no-gcc-sysroot?

Scheduled Pinned Locked Moved Mobile and Embedded
1 Posts 1 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    m_andrej
    wrote on last edited by m_andrej
    #1

    Hi,
    I'm trying to cross-compile Qt 5.5 for iMX6 (Phytec board with Yocto). I have two questions:

    • can I use g++ compiler from Ubuntu package g++-arm-linux-gnueabi, or do I have to download Linaro?
    • should I run configure with -no-gcc-sysroot?

    At the moment configure fails both with and without -no-gcc-sysroot, but with slightly different error messages related to OpenGL ES 2.0. My configure call looks like this:

    ../5.5/Src/configure 
    -opensource 
    -confirm-license 
    -release 
    -eglfs 
    -no-pch 
    -no-xcb 
    -no-opengl 
    -opengl es2 
    -make libs 
    -nomake tests 
    -nomake examples 
    -device imx6 
    -xplatform linux-arm-gnueabi-g++ 
    -sysroot /opt/yogurt/iMX6-PD15.1.0/sysroots/cortexa9hf-vfp-neon-phytec-linux-gnueabi 
    -prefix /usr/lib/Qt-5.5  
    -v
    

    When -no-gcc-sysroot is excluded as above, library paths to sysroot are propagated to DEFAULT_INCDIRS and DEFAULT_LIBDIRS:

    arm-linux-gnueabi-g++ --sysroot=/opt/yogurt/iMX6-PD15.1.0/sysroots/cortexa9hf-vfp-neon-phytec-linux-gnueabi -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
    bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
    Symbolic function binding disabled.
    DEFAULT_INCDIRS="/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/include
    /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/include-fixed
    /usr/arm-linux-gnueabi/include
    /opt/yogurt/iMX6-PD15.1.0/sysroots/cortexa9hf-vfp-neon-phytec-linux-gnueabi/usr/include
    "
    DEFAULT_LIBDIRS="/usr/arm-linux-gnueabi/lib
    /opt/yogurt/iMX6-PD15.1.0/sysroots/cortexa9hf-vfp-neon-phytec-linux-gnueabi/lib
    /opt/yogurt/iMX6-PD15.1.0/sysroots/cortexa9hf-vfp-neon-phytec-linux-gnueabi/usr/lib
    /usr/lib/gcc-cross/arm-linux-gnueabi/4.7
    "
    

    Failing linker step prints the following output:

    arm-linux-gnueabi-g++ -Wl,-O1 -o opengles2 opengles2.o   --sysroot=/opt/yogurt/iMX6-PD15.1.0/sysroots/cortexa9hf-vfp-neon-phytec-linux-gnueabi -lGLESv2 
    /opt/yogurt/iMX6-PD15.1.0/sysroots/cortexa9hf-vfp-neon-phytec-linux-gnueabi/lib/libpthread.so.0: undefined reference to `__default_rt_sa_restorer@GLIBC_PRIVATE'
    /opt/yogurt/iMX6-PD15.1.0/sysroots/cortexa9hf-vfp-neon-phytec-linux-gnueabi/lib/libpthread.so.0: undefined reference to `__default_sa_restorer@GLIBC_PRIVATE'
    /opt/yogurt/iMX6-PD15.1.0/sysroots/cortexa9hf-vfp-neon-phytec-linux-gnueabi/lib/libpthread.so.0: undefined reference to `__libc_vfork@GLIBC_PRIVATE'
    collect2: error: ld returned 1 exit status
    

    With -no-gcc-sysroot, environment variables are missing paths to sysroot and linker prints this output:

    arm-linux-gnueabi-g++ -Wl,-O1 -o opengles2 opengles2.o   -lGLESv2 
    /usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/bin/ld: cannot find -lGLESv2
    

    I have libgles2-mesa-dev package installed on the host OS (don't know if it matters).

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved