May 12, 2012

enaud84 enaud84
Lab Rat
34 posts

Configure QT library error when I cross compile


Hi all,
I’m compiling the QT with phonon and phonon-backend for my embedded board:
I type:

  1. ./configure -embedded arm -xplatform qws/linux-arm-g++ -qt-mouse-tslib -L/home/user/ev-sdk/rootfs/arm-a8-fs/usr/lib -L/home/user/Desktop/qt-everywhere-opensource-src-4.8.1/lib -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include/freetype2/freetype/config -prefix /opt/qt_eng -little-endian -no-gif -no-libtiff -no-libmng -no-openssl -no-opengl -no-mmx -no-3dnow -no-sse -no-sse2 -no-largefile -no-sm -svg -v -no-feature-cursor -fast -opensource -release -no-multimedia -no-cups -no-nis  -no-exceptions -nomake examples -nomake demos -no-sql-sqlite -no-g++-exceptions -phonon -phonon-backend -DQT_NO_QWS_CURSOR -DQT_THREAD_SUPPORT

with qmake.conf in /home/user/Desktop/qt-everywhere-opensource-src-4.8.1/mkspecs/qws/linux-arm-g++:

  1. #
  2. # qmake configuration for building with arm-linux-g++ #
  5. include(../../common/gcc-base.conf)
  6. include(../../common/gcc-base-unix.conf)
  7. include(../../common/g++.conf)
  8. include(../../common/linux.conf)
  9. include(../../common/qws.conf)
  11. QMAKE_CFLAGS_RELEASE     = -O3 -march=armv7-a -mtune=cortex-a8
  12. -mfpu=neon -mfloat-abi=softfp
  14. DEFINES +=
  16. # modifications to g++.conf
  17. QMAKE_CC                = sb2 -t imx53 gcc
  18. QMAKE_CXX               = sb2 -t imx53 g++
  19. QMAKE_LINK              = sb2 -t imx53 g++
  20. QMAKE_LINK_SHLIB        = sb2 -t imx53 g++
  22. # modifications to linux.conf
  23. QMAKE_AR                = sb2 -t imx53 ar cqs
  24. QMAKE_OBJCOPY           = sb2 -t imx53 objcopy
  25. QMAKE_STRIP             = sb2 -t imx53 strip
  27. load(qt_config)

If i remove

  1. -phonon -phonon-backend
from option the compilation is successful
If i put
  1. -phonon -phonon-backend
I have this error:

  1. .
  2. .
  3. .
  4. D-Bus auto-detection... ()
  5. Project WARNING: Your mkspec is including 'common/g++.conf', but the mkspecs have been refactored
  6.  To fix this include 'common/gcc-base-.conf and 'common/g++-.conf' instead
  7. sb2 -t imx53 g++ -c -pipe -pipe -pipe -pipe -pipe -pipe -O2 -O2 -O2 -O2 -O2 -O2 -Wall -W -Wall -W -Wall -W -Wall -W -Wall -W -Wall -W  -I../../../mkspecs/qws/linux-arm-g++ -I. -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include/freetype2/freetype/config -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -o dbus.o dbus.cpp
  8. dbus.cpp:43:23: error: dbus/dbus.h: No such file or directory
  9. dbus.cpp:46:2: error: #error Needs at least dbus version 1
  10. dbus.cpp: In function 'int main(int, char**)':
  11. dbus.cpp:51: error: 'dbus_shutdown' was not declared in this scope
  12. make: *** [dbus.o] Error 1
  13. D-Bus disabled.
  14. Glib auto-detection... ()
  15. Project WARNING: Your mkspec is including 'common/g++.conf', but the mkspecs have been refactored
  16. To fix this include 'common/gcc-base-.conf and 'common/g++-.conf' instead
  17. sb2 -t imx53 g++ -c -pipe -pipe -pipe -pipe -pipe -pipe -O2 -O2 -O2 -O2 -O2 -O2 -Wall -W -Wall -W -Wall -W -Wall -W -Wall -W -Wall -W  -I../../../mkspecs/qws/linux-arm-g++ -I. -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include/freetype2/freetype/config -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -o glib.o glib.cpp
  18. glib.cpp: In function 'int main(int, char**)':
  19. glib.cpp:55: warning: 'pollfd' is used uninitialized in this function
  20. sb2 -t imx53 g++ -Wl,-O1 -o glib glib.o     -L/home/user/ev-sdk/rootfs/arm-a8-fs/usr/lib -L/home/user/Desktop/qt-everywhere-opensource-src-4.8.1/lib
  21. *glib.o: In function `main':
  22. glib.cpp:(.text+0x10): undefined reference to `g_thread_init'
  23. glib.cpp:(.text+0x14): undefined reference to `g_main_context_default'
  24. glib.cpp:(.text+0x20): undefined reference to `g_source_new'
  25. glib.cpp:(.text+0x28): undefined reference to `g_source_add_poll'
  26. glib.cpp:(.text+0x38): undefined reference to `g_threads_got_initialized'
  27. collect2: ld returned 1 exit status
  28. make: *** [glib] Error 1*
  29. Glib disabled.
  30. Phonon support cannot be enabled due to functionality tests!
  31.  Turn on verbose messaging (-v) to ./configure to see the final report.
  32.  If you believe this message is in error you may use the continue
  33.  switch (-continue) to ./configure to continue.

I lost the last two days to understand why giving error … :(

Someone could help me?


1 reply

May 13, 2012

enaud84 enaud84
Lab Rat
34 posts


  ‹‹ Using different tool chain than the one used to build Qt      [Solved] QtTest project Linker errors on VS2010 ››

You must log in to post a reply. Not a member yet? Register here!