Qt app on Debian is missing libs

Hi,

I want to build Qt app that have to run with the 4D-Touch screen cape from 4D system.

uname -a : Linux arm 3.8.13-bone28 #1 SMP Sun Oct 13 00:07:57 CEST 2013 armv7l GNU/Linux

  • I’ve then changed the instructions from another tutorial to use the Debian LInaro toolchain with a Qmake.conf :

qmake configuration for building with arm-linux-g++

include(…/…/common/linux.conf)

include(…/…/common/gcc-base-unix.conf)

include(…/…/common/g+±unix.conf)

include(…/…/common/qws.conf)

modifications to g++.conf

#Toolchain

#Compiler Flags to take advantage of the ARM architecture

QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard

QMAKE_CXXFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard

QMAKE_CC = /home/david/BBb/Debian_eewiki.net/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/arm-linux-gnueabihf-gcc

QMAKE_CXX = /home/david/BBb/Debian_eewiki.net/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/arm-linux-gnueabihf-g++

QMAKE_LINK = /home/david/BBb/Debian_eewiki.net/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/arm-linux-gnueabihf-g++

QMAKE_LINK_SHLIB = /home/david/BBb/Debian_eewiki.net/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/arm-linux-gnueabihf-g++

modifications to linux.conf

QMAKE_AR = /home/david/BBb/Debian_eewiki.net/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/arm-linux-gnueabihf-ar cqs

QMAKE_OBJCOPY = /home/david/BBb/Debian_eewiki.net/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/arm-linux-gnueabihf-objcopy

QMAKE_STRIP = /home/david/BBb/Debian_eewiki.net/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/arm-linux-gnueabihf-strip

load(qt_config)

Please note that I’ve also to change the softfloat option to hard.

  • Then I"ve copied the lib to the target

scp -r /opt/qt/lib root@192.168.0.32:"/opt/qt"

  • Finally, I’ve installed Qtcreator and set it to use the Linaro Toolchain and gdb

but the executable complains :

./TestBeagle_console: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.17’ not found (required by /opt/qt/lib/libQtCore.so.4)

Whereas I’ve followed the Qt instructions for Env paths :

LD_LIBRARY_PATH=/opt/qt/lib:/lib/arm-linux-gnueabihf

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/qt/lib:/lib/arm-linux-gnueabihf

ldd says :

./TestBeagle_console: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.17’ not found (required by /opt/qt/lib/libQtCore.so.4)

libQtNetwork.so.4 => /opt/qt/lib/libQtNetwork.so.4 (0xb6e2c000)
libQtCore.so.4 => /opt/qt/lib/libQtCore.so.4 (0xb6b92000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6b77000)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0xb6ac8000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6a5d000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6a39000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6953000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6948000)
/lib/ld-linux-armhf.so.3 (0xb6f01000)

what did I missed please ?

You "assumed" you could build something with a bleeding edge gcc/cross
compiler and run it directly on Debian "Stable" aka wheezy..

Wheezy only has 2.13-38 of libc.so.6, no way is anything built with
"GLIBC_2.17" going to work..

Just build your application/qt/etc on the "target" and stop cross
compiling stuff.

Regards,

ooow : so either I want to build a graphical Qt app

  • I have to install Qtcreator etc on the beagleboneBlack : I’m not sure this is the best solution
  • I have to go Angstrom: which seems to have issues with qt, ie : qt4-embedded --force-depends => iconv errors

and run it directly on Debian “Stable” aka wheezy…

why not installing back another one than wheezy which will have the good libs ?

You can install Qt on the x86, write an application, debug it etc. Then upload source files to a target and compile there

That’s a good idea Maxim, nevertheless after installed libqt4-dev on BBB and after compiled
successfully a “Hello world” Console, I’ve tried a GUI app (qmake + make) which outputs :

  • cannot connect to X server

My app is called with

Myapp -qws

I’m wondering what is missing now

Libraries installed dont have the qws feature compiled in I guess. Probably you need to compile Qt yourself

http://wiki.mentorel.com/doku.php/qt-embedded

I dont know if qt 4.8 support mtdev

As I know , only from qt 5 , will support mtdev

What I am sure is from buildroot git tree , you can build qt 5.0 , and actually , You can modify for build 5.1.1 (I have done this on iMX6 )

Maybe you can have a try

Can you share instructions how to build qt5 for beaglebone? 3D acceleration would be a nice bonus

Thanks for your answer, as I also own an i.Mx53 QSB I know that things are easier than with BeagleboneBlack, ie : I successfully done Yocto, bare compilations, etc.
Therefore, if you could show some instructions to set up Buildroot for Beaglebone Black it would be nice.

Ok , this is For current buildroot patch ,

9f7e8f120dfeddd8b49eb4d232253cc3f9ac8efa

And I dont have a beaglebone board .
Just compiled sucess . with qt 5.1.1
For some time , I will try to addd wayland support .
maybe I should setup a project on github ,just maybe .

beaglebone_qt5.patch (5.23 KB)

Interesting. I saw the commit from Yann Morin but as my experience about Buildroot is near 0, I will bounce with your idea and will try to rebuild my previous Debian with qt 5.1.1 : with some luck the lib dependency will be satisfied.

Ok, here is the draft version

https://github.com/liyaoshi/BBB_QT5_WAYLAND

hope it be useful

Regards