Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Errors compiling for Tinkerboard



  • Hi everybody,
    I need to compile Qt libs v.5.7.1 for Tinkerboard.
    Host machine: Ubuntu 18.04
    Tinker:

    root@tinkerboard:/home/amtk/MyKeyboard/bin# uname -a
    Linux tinkerboard 4.4.71+ #1 SMP Thu Feb 22 18:23:31 CST 2018 armv7l GNU/Linux
    root@tinkerboard:/home/amtk/MyKeyboard/bin#
    root@tinkerboard:/home/amtk/MyKeyboard/bin# lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description:    Debian GNU/Linux 9.3 (stretch)
    Release:        9.3
    Codename:       stretch
    

    I'm following this post https://www.qt.io/blog/2017/05/03/qt-git-tinkerboard-wayland and I downloaded the cross-compiler and rsync-ed some folder from the device.

    When I run the configure script I see that qmake tool is compiled correctly but, when the script starts to check for various modules, it does not find some header files (that are present under sysroot/.. for example mysql.h, sql.h, ..) but, first of all, it stops checking for libGLES libraries.
    In particular the output is:

    checking for OpenGL ES 2.0... 
    /home/mora/Desktop/tinker/toolchain/bin/arm-linux-gnueabihf-g++ -c -pipe -mtune=cortex-a17 -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard --sysroot=/home/mora/Desktop/tinker/sysroot -O2 -Wall -W -fPIC  -I. -I../../../mkspecs/devices/linux-tinkerboard-g++ -o opengles2.o opengles2.cpp
    /home/mora/Desktop/tinker/toolchain/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard -Wl,-O1 -o opengles2 opengles2.o   --sysroot=/home/mora/Desktop/tinker/sysroot -L/home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf -lGLESv2 -lEGL 
    /home/mora/Downloads/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/bin/ld: warning: librt.so.1, needed by /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so, not found (try using -rpath or -rpath-link)
    /home/mora/Downloads/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libpthread.so.0, needed by /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so, not found (try using -rpath or -rpath-link)
    /home/mora/Downloads/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libdl.so.2, needed by /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so, not found (try using -rpath or -rpath-link)
    /home/mora/Downloads/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libdrm.so.2, needed by /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so, not found (try using -rpath or -rpath-link)
    /home/mora/Downloads/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libX11.so.6, needed by /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so, not found (try using -rpath or -rpath-link)
    /home/mora/Downloads/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libX11-xcb.so.1, needed by /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so, not found (try using -rpath or -rpath-link)
    /home/mora/Downloads/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libxcb.so.1, needed by /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so, not found (try using -rpath or -rpath-link)
    /home/mora/Downloads/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.4.1/../../../../arm-linux-gnueabihf/bin/ld: warning: libxcb-dri2.so.0, needed by /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so, not found (try using -rpath or -rpath-link)
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'xcb_query_extension'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'drmAuthMagic'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'pthread_setspecific@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'XNoOp'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'xcb_dri2_connect_reply'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `dlerror@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_get_geometry'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `pthread_key_create@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_dri2_create_drawable_checked'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `pthread_join@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `sem_timedwait@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_get_window_attributes'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `sem_post@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `drmGetBusid'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `sem_trywait@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_get_geometry_reply'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_request_check'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `pthread_rwlock_unlock@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `dlclose@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `pthread_sigmask@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `XGetVisualInfo'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `pthread_getspecific@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `sem_init@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_dri2_authenticate'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `sem_wait@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_dri2_swap_buffers_reply'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_dri2_swap_buffers'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_query_extension_reply'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_dri2_authenticate_reply'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `drmFreeVersion'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `pthread_mutexattr_init@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_dri2_connect'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `sem_destroy@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'xcb_dri2_get_buffers_buffers'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `dlopen@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'pthread_rwlock_destroy@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'xcb_dri2_get_buffers'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'XFree'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'pthread_mutexattr_settype@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'xcb_dri2_connect_device_name_length'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'xcb_get_window_attributes_reply'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'XGetXCBConnection'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'XOpenDisplay'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'drmFree'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'XGetErrorText'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'xcb_dri2_get_buffers_reply'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `pthread_mutexattr_destroy@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `XGetGeometry'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `dlsym@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `XFlush'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_dri2_connect_device_name'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `drmClose'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `drmSetInterfaceVersion'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `pthread_create@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `drmGetVersion'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `xcb_dri2_destroy_drawable_checked'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'pthread_key_delete@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'pthread_rwlock_init@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `XCloseDisplay'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to `XSync'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'clock_gettime@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'pthread_rwlock_wrlock@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'drmGetMagic'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'pthread_rwlock_rdlock@GLIBC_2.4'
    /home/mora/Desktop/tinker/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so: undefined reference to 'XListPixmapFormats'
    collect2: error: ld returned 1 exit status
    Makefile:92: recipe for target 'opengles2' failed
    make: *** [opengles2] Error 1
    OpenGL ES 2.0 disabled.
    The OpenGL ES 2.0 functionality test failed!
    
    

    I checked the files under the sysroot folder looking for the opengl libraries and especially for librt (the first problem in the list):

    mora@ubuntu-virtualbox:~/Desktop/tinker/qtbase$ ls -l ../sysroot/usr/lib/arm-linux-gnueabihf/libG*
    lrwxrwxrwx 1 mora mora     10 gen 16  2017 ../sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so -> libmali.so
    lrwxrwxrwx 1 mora mora     28 gen 16  2017 ../sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 -> libmali-midgard-r9p0-r0p0.so
    lrwxrwxrwx 1 mora mora     28 gen 16  2017 ../sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 -> libmali-midgard-r9p0-r0p0.so
    lrwxrwxrwx 1 mora mora     16 set 18  2016 ../sysroot/usr/lib/arm-linux-gnueabihf/libGLEW.so.2.0 -> libGLEW.so.2.0.0
    -rw-r--r-- 1 mora mora 468916 set 18  2016 ../sysroot/usr/lib/arm-linux-gnueabihf/libGLEW.so.2.0.0
    lrwxrwxrwx 1 mora mora     14 mar 21  2017 ../sysroot/usr/lib/arm-linux-gnueabihf/libGL.so.1 -> libGL.so.1.2.0
    -rw-r--r-- 1 mora mora 301792 mar 21  2017 ../sysroot/usr/lib/arm-linux-gnueabihf/libGL.so.1.2.0
    lrwxrwxrwx 1 mora mora     15 set 13  2015 ../sysroot/usr/lib/arm-linux-gnueabihf/libGLU.so.1 -> libGLU.so.1.3.1
    -rw-r--r-- 1 mora mora 272216 set 13  2015 ../sysroot/usr/lib/arm-linux-gnueabihf/libGLU.so.1.3.1
    ...
    ...
    mora@ubuntu-virtualbox:~/Desktop/tinker/qtbase$ ls -l ../sysroot/usr/lib/arm-linux-gnueabihf/librt*
    -rw-r--r-- 1 mora mora 54468 giu 15  2017 ../sysroot/usr/lib/arm-linux-gnueabihf/librt.a
    -rw-r--r-- 1 mora mora 80012 apr 27  2016 ../sysroot/usr/lib/arm-linux-gnueabihf/librtmp.so.1
    lrwxrwxrwx 1 mora mora    43 set 27 17:44 ../sysroot/usr/lib/arm-linux-gnueabihf/librt.so -> ../../../lib/arm-linux-gnueabihf/librt.so.1
    ..
    ..
    mora@ubuntu-virtualbox:~/Desktop/tinker/qtbase$ ls -l ../sysroot/lib/arm-linux-gnueabihf/librt*
    -rw-r--r-- 1 mora mora 22540 giu 15  2017 ../sysroot/lib/arm-linux-gnueabihf/librt-2.24.so
    lrwxrwxrwx 1 mora mora    13 giu 15  2017 ../sysroot/lib/arm-linux-gnueabihf/librt.so.1 -> librt-2.24.so
    

    How can i solve, please?
    Regards!



  • Hi, did you fix this issue?


Log in to reply