November 30, 2010

daichen daichen
Lab Rat
5 posts

How to Cross compiling Qt/X11 for beagleboard?

 

Hi all,
I have got a beagleboard, I use angstrom for linux platform, I want to port QT 4.6.2 ×11 for this board, and I followed http://labs.qt.nokia.com/2009/09/10/cross-compiling-qtx11/
But I encountered the configuration problems, I can’t configure the makefile.

my environment:
Ubuntu 10.04
Scratchbox2 2.0-lta101
I downloaded the toolchain form http://www.angstrom-distribution.org/toolchains/angstrom-2010.4-test-20100422-i686-linux-armv7a-linux-gnueabi-toolchain-qte-4.6.2.tar.bz2
the qt source file form http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.2.tar.gz

I untar the toolchain to /usr/local/angstrom, the sourced the toolchain environment file.

Then, followed the http://labs.qt.nokia.com/2009/09/10/cross-compiling-qtx11/ steps.

use “bitbake beagleboard_demo_image” built the angstrom image, then untar it to a folder, and sb2 init there.

When I try to configure the makefile, I encountered these error.

my configure command is sb2 ./configure -arch arm -xplatform qws/linux-arm-g++ -force-pkg-config -v

Please help me :)

10 replies

November 30, 2010

daichen daichen
Lab Rat
5 posts

error message

    1. /home/dc/qt-everywhere-opensource-src-4.6.2$ sb2 ./configure -arch arm -xplatform qws/linux-arm-g++ -force-pkg-config -v
    2. Which edition of Qt do you want to use ?
    3.  
    4. Type 'c' if you want to use the Commercial Edition.
    5. Type 'o' if you want to use the Open Source Edition.
    6.  
    7. o
    8.  
    9. Determining system architecture... (Linux:2.6.32-26-generic:arm)
    10.     ARM (arm)
    11.     'arm' is supported
    12. System architecture: 'arm'
    13.  
    14. You have asked to use pkg-config and are cross-compiling.
    15. Please make sure you have a correctly set-up pkg-config
    16. environment!
    17.  
    18. WARNING: recursive calls to sb2 are not supported (session already exists)
    19. WARNING: going to execute 'g++ -x c++-header precomp_header.h' in this session
    20. Precompiled-headers support enabled.
    21. /home/dc/qt-everywhere-opensource-src-4.6.2/config.tests/unix/fvisibility.test: line 18: sb2 g++: command not found
    22. Symbol visibility control disabled.
    23.  
    24. This is the Qt for Linux/X11 Open Source Edition.
    25.  
    26. You are licensed to use this software under the terms of
    27. the Lesser GNU General Public License (LGPL) versions 2.1.
    28. You are also licensed to use this software under the terms of
    29. the GNU General Public License (GPL) versions 3.
    30.  
    31. Type '3' to view the GNU General Public License version 3.
    32. Type 'L' to view the Lesser GNU General Public License version 2.1.
    33. Type 'yes' to accept this license offer.
    34. Type 'no' to decline this license offer.
    35.  
    36. Do you accept the terms of either license? yes

November 30, 2010

daichen daichen
Lab Rat
5 posts

  1. Creating qmake. Please wait...
  2. rm: cannot remove `mkspecs/default': Is a directory
  3. ln: creating symbolic link `mkspecs/default/linux-arm-g++': File exists
  4. make: Nothing to be done for `first'.
  5. floatmath auto-detection... ()
  6. mmap: No such device or address
  7. make: *** No targets specified and no makefile found.  Stop.
  8. floatmath disabled.
  9. mmx auto-detection... ()
  10. mmap: No such device or address
  11. make: *** No targets specified and no makefile found.  Stop.
  12. mmx disabled.
  13. 3dnow auto-detection... ()
  14. mmap: No such device or address
  15. make: *** No targets specified and no makefile found.  Stop.
  16. 3dnow disabled.
  17. sse auto-detection... ()
  18. mmap: No such device or address
  19. make: *** No targets specified and no makefile found.  Stop.
  20. sse disabled.
  21. sse2 auto-detection... ()
  22. mmap: No such device or address
  23. make: *** No targets specified and no makefile found.  Stop.
  24. sse2 disabled.
  25. neon auto-detection... ()
  26. mmap: No such device or address
  27. make: *** No targets specified and no makefile found.  Stop.
  28. neon disabled.
  29. zlib auto-detection... ()
  30. mmap: No such device or address
  31. make: *** No targets specified and no makefile found.  Stop.
  32. zlib disabled.
  33. libjpeg auto-detection... ()
  34. mmap: No such device or address
  35. make: *** No targets specified and no makefile found.  Stop.
  36. libjpeg disabled.
  37. libtiff auto-detection... ()
  38. mmap: No such device or address
  39. make: *** No targets specified and no makefile found.  Stop.
  40. libtiff disabled.
  41. libmng auto-detection... ()
  42. mmap: No such device or address
  43. make: *** No targets specified and no makefile found.  Stop.
  44. libmng disabled.
  45. libpng auto-detection... ()
  46. mmap: No such device or address
  47. make: *** No targets specified and no makefile found.  Stop.
  48. libpng disabled.
  49. DB2 auto-detection... ()
  50. mmap: No such device or address
  51. make: *** No targets specified and no makefile found.  Stop.
  52. DB2 disabled.
  53. InterBase auto-detection... ()
  54. mmap: No such device or address
  55. make: *** No targets specified and no makefile found.  Stop.
  56. InterBase disabled.
  57. MySQL (thread-safe) auto-detection... ()
  58. mmap: No such device or address
  59. make: *** No targets specified and no makefile found.  Stop.
  60. MySQL (thread-safe) disabled.
  61. MySQL (thread-unsafe) auto-detection... ()
  62. mmap: No such device or address
  63. make: *** No targets specified and no makefile found.  Stop.
  64. MySQL (thread-unsafe) disabled.
  65. OCI auto-detection... ()
  66. mmap: No such device or address
  67. make: *** No targets specified and no makefile found.  Stop.
  68. OCI disabled.
  69. ODBC auto-detection... ()
  70. mmap: No such device or address
  71. make: *** No targets specified and no makefile found.  Stop.
  72. ODBC disabled.
  73. iODBC auto-detection... ()
  74. mmap: No such device or address
  75. make: *** No targets specified and no makefile found.  Stop.
  76. iODBC disabled.
  77. PostgreSQL auto-detection... ()
  78. mmap: No such device or address
  79. make: *** No targets specified and no makefile found.  Stop.
  80. PostgreSQL disabled.
  81. SQLite2 auto-detection... ()
  82. mmap: No such device or address
  83. make: *** No targets specified and no makefile found.  Stop.
  84. SQLite2 disabled.
  85. unknown SQL driver: sqlite_symbian
  86. TDS auto-detection... ()
  87. mmap: No such device or address
  88. make: *** No targets specified and no makefile found.  Stop.
  89. TDS disabled.
  90. NIS auto-detection... ()
  91. mmap: No such device or address
  92. make: *** No targets specified and no makefile found.  Stop.
  93. NIS disabled.
  94. Cups auto-detection... ()
  95. mmap: No such device or address
  96. make: *** No targets specified and no makefile found.  Stop.
  97. Cups disabled.
  98. POSIX iconv auto-detection... ()
  99. mmap: No such device or address
  100. make: *** No targets specified and no makefile found.  Stop.
  101. POSIX iconv disabled.
  102. GNU libiconv auto-detection... ()
  103. mmap: No such device or address
  104. make: *** No targets specified and no makefile found.  Stop.
  105. GNU libiconv disabled.
  106. D-Bus auto-detection... ()
  107. mmap: No such device or address
  108. make: *** No targets specified and no makefile found.  Stop.
  109. D-Bus disabled.
  110. EGL (EGL/egl.h) auto-detection... ()
  111. mmap: No such device or address
  112. make: *** No targets specified and no makefile found.  Stop.
  113. EGL (EGL/egl.h) disabled.
  114. EGL (GLES/egl.h) auto-detection... ()
  115. mmap: No such device or address
  116. make: *** No targets specified and no makefile found.  Stop.
  117. EGL (GLES/egl.h) disabled.
  118. Glib auto-detection... ()
  119. mmap: No such device or address
  120. make: *** No targets specified and no makefile found.  Stop.
  121. Glib disabled.
  122. Detecting broken X11 headers... (/home/dc/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-arm-g++ yes /home/dc/qt-everywhere-opensource-src-4.6.2 /home/dc/qt-everywhere-opensource-src-4.6.2)
  123. X11 headers look good.
  124. XLib auto-detection... ()
  125. mmap: No such device or address
  126. make: *** No targets specified and no makefile found.  Stop.
  127. XLib disabled.
  128. Basic XLib functionality test failed!
  129. You might need to modify the include and library search paths by editing
  130. QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/dc/qt-everywhere-opensource-src-4.6.2/mkspecs/qws/linux-arm-g++.

If I don’t add sb2 in front of configure, it will error as

  1. /lib/ld-linux.so.3: No such file or directory

November 30, 2010

daichen daichen
Lab Rat
5 posts

the toolchain environment is

  1. export SDK_PATH=/usr/local/angstrom/arm
  2. export TARGET_SYS=arm-angstrom-linux-gnueabi
  3. export PATH=$SDK_PATH/bin:$PATH
  4. export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH
  5. export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS
  6. export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS
  7. export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS/usr/lib/pkgconfig
  8. export CONFIG_SITE=$SDK_PATH/site-config
  9. alias opkg="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH//etc/opkg-sdk.conf -o $SDK_PATH"
  10. alias opkg-target="LD_LIBRARY_PATH=$SDK_PATH/lib $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS/etc/opkg.conf -o $SDK_PATH/$TARGET_SYS"
  11. export OE_QMAKE_CC=arm-angstrom-linux-gnueabi-gcc
  12. export OE_QMAKE_CXX=arm-angstrom-linux-gnueabi-g++
  13. export OE_QMAKE_LINK=arm-angstrom-linux-gnueabi-g++
  14. export OE_QMAKE_LIBDIR_QT=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/lib
  15. export OE_QMAKE_INCDIR_QT=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/include/qtopia
  16. export OE_QMAKE_MOC=/usr/local/angstrom/arm/bin/moc4
  17. export OE_QMAKE_UIC=/usr/local/angstrom/arm/bin/uic4
  18. export OE_QMAKE_UIC3=/usr/local/angstrom/arm/bin/uic34
  19. export OE_QMAKE_RCC=/usr/local/angstrom/arm/bin/rcc4
  20. export OE_QMAKE_QDBUSCPP2XML=/usr/local/angstrom/arm/bin/qdbuscpp2xml4
  21. export OE_QMAKE_QDBUSXML2CPP=/usr/local/angstrom/arm/bin/qdbusxml2cpp4
  22. export OE_QMAKE_QT_CONFIG=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/share/qtopia/mkspecs/qconfig.pri
  23. export QMAKESPEC=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi//usr/share/qtopia/mkspecs/linux-g++

November 30, 2010

daichen daichen
Lab Rat
5 posts

qmake.conf is

  1. #
  2. # qmake configuration for linux-g++  
  3. #  
  4.  
  5. MAKEFILE_GENERATOR      = UNIX  
  6. TEMPLATE                = app  
  7. CONFIG                  += qt warn_on release incremental link_prl  
  8. QT                      += core gui  
  9. QMAKE_INCREMENTAL_STYLE = sublib  
  10.  
  11. include(../common/g++.conf)  
  12. include(../common/linux.conf)  
  13. # modifications to g++.conf  
  14.  
  15. QMAKE_CC                = sb2 gcc  
  16. QMAKE_CXX               = sb2 g++  
  17. QMAKE_LINK              = sb2 g++  
  18. QMAKE_LINK_SHLIB        = sb2 g++  
  19.  
  20. # modifications to linux.conf  
  21. QMAKE_AR                = sb2 ar cqs  
  22. QMAKE_OBJCOPY           = sb2 objcopy  
  23. QMAKE_STRIP             = sb2 strip  
  24. load(qt_config)  

and i add vm.mmap_min_addr = 0 to /etc/sysctl.conf

December 2, 2010

Luca Luca
Ant Farmer
590 posts

Hi, I’m trying to do the same.
But I’m using Angstrom image and SDK from http://narcissus.angstrom-distribution.org/ .

Have you solved your problem?

December 3, 2010

daichen daichen
Lab Rat
5 posts

yes, i set the wrong toolchain environment, should not use angstrom environment

June 16, 2011

ShihaoLiu ShihaoLiu
Lab Rat
2 posts

Hi: I’m using Angstrom image and SDK from http://narcissus.angstrom-distribution.org/ . But I don’t know how to use the SDK, could you give me some advice?

Thanks a lot.

Shihao Liu

March 6, 2012

spazvt spazvt
Lab Rat
17 posts

I’m also using Angstrom and SDK from Narcissus to get QT running on a BeagleBoard-xM. I followed Luca’s instructions at https://qt-project.org/wiki/Qt_on_the_BeagleBoard, although every time I use a complicated choice of options, the Narcissus page never completes building the package. So instead I started with a basic console-only version fo Angstrom and used ‘opkg install <pkg>’ to install most of the packages that Narcissus said it was putting together. From Narcissus I did get the SDK package, though, and extracted that to /usr/local/angstrom/arm. Now, I’ve got an X11 environment with network connectivity and displaying to an LCD monitor. However, I haven’t been able to build a Hello World Qt project because my QMAKESPEC isn’t setup correctly, which is where I need help.

Normally, it looks like all the .conf files are in /usr/share/qt4/mkspecs/. I’m using G++, so my …/mkspecs/linux-g++/qmake.conf points to …/mkspecs/common/linux.conf and …/mkspecs/common/g++.conf.
However, in the Angstrom-2012.03-narcissus-beagleboard-i686-random-2c3363a0-image-sdk.tar.gz package I got from Narcissus, /usr/local/angstrom/arm/ contains on an ‘environment-setup’ file and no mkspecs directory. In ‘environment-setup’ QMAKESPEC isn’t defined. So when I source ‘environment-setup’ and then run qmake2, I get the error “QMAKESPEC has not been set, so configuration cannot be decuced.”

I also tried copying my Ubuntu copy of /usr/share/qt4/mkspecs/ to the Angstrom SD card at /usr/local/angstrom/arm/mkspecs/ and then added a QMAKESPEC definition in /usr/local/angstrom/arm/environment-setup to point to my new /usr/share/qt4/mkspecs/linux-g++. qmake2 seemed to be successful, but when I make the project, I get the error “g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/OE/angstrom-2008/build/tmp-angstrom_2008_l/sysroots/x86_64-linux/qt4/include/QtCore -I/OE/angstrom-2008/buld/tmp-angstrom_2008/build/tmp-angstrom_2008_l/sysroots/x86_64-linux/qt4/include -I. -o main.o main.cpp”

and after that, the rest of the errors are that it can’t find the QApplication and QPushButton headers…

So my question is …
1) Should I have added an “export QMAKESPEC=…” line to /usr/local/angstrom/arm/environment-setup and if so, where should it point to?
2) Was the Angstrom Qt SDK supposed to include the mkspecs folder?

Since I’m just learning Qt and don’t know these files yet, I guess my next option is to setup an OpenEmbedded build environment and try to build Qt from scratch.

Jeremy

March 6, 2012

spazvt spazvt
Lab Rat
17 posts

Also, Luca’s instructions say to install the Qt src wherever you want. Is there another environment variable that’s supposed to point to where the source code is?

November 15, 2012

dreamerindia dreamerindia
Ant Farmer
61 posts

hi i got similar problem
i tried to compile the QT with following command by following “http://forums.digi.com/support/forum/viewthread_thread,6858#20693”

./configure -confirm-license -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/QtEmbedded-4.4.3 -hostprefix /usr/local/DigiEL-5.6/x-tools/arm-cortex_a8-linux-gnueabi -qt-sql-sqlite -depths 15,16 -qt-kbd-usb -qt-mouse-tslib

and i got this error

Basic XLib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/qmax/Desktop/QT_Latest/qt-x11-opensource-src-4.5.3/mkspecs/qws/linux-arm-g++.

I tried the following
Try 1:

sudo apt-get build-dep qt4-qmake (installed)

Ref:http://www.qtforum.org/article/27401/debian-xlib-test-failed-after-configure.html

Try 2:

sudo apt-get build-dep libxext-dev

Ref:http://www.qtforum.org/article/27886/installing-qt4-problem-basic-xlib-functionality-test-failed.html

Try 3:

sudo apt-get install libx11-dev libxau-dev libxaw7-dev libxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev sudo apt-get install libxext-dev libxfixes-dev libxfont-dev libxft-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev sudo apt-get install libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev sudo apt-get install libglib2.0-dev sudo apt-get install libssl-dev sudo apt-get install libgtk2.0-dev sudo apt-get install libcups2-dev sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev sudo apt-get install libgstreamer0.10-dev

Ref:http://qt-project.org/wiki/Compile_Qt_4.7_on_Ubuntu_10.10

Try 4:

sudo apt-get install ^libxcb.* libx11-xcb-dev libglu1-mesa-dev libxrender-dev -y

Ref:http://qt-project.org/forums/viewthread/15858

But nothing works…still same error…..

 Signature 

~Ravivarman~

 
  ‹‹ Qt bluetooth on Symbian      conditional compiling depending on target ››

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