Hello!
I trying to compile Qt 5.0.0 for my am3517 kit.
I follow this instructions: http://gpupowered.org/node/16, but change some paths in qmake.conf for my system.
my qt-everywhere-opensource-src-5.0.0/qtbase/mkspec/linux-arm-gnueabi-ti-g++ file is:
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental gdb_dwarf_index
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
ROOTFS_PATH=/home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi
SGX_SDK_ROOT = /home/grebenev/Graphics_SDK_4_06_00_02
# Change the required paths here
QMAKE_INCDIR = $${ROOTFS_PATH}/usr/include $${ROOTFS_PATH}/usr/include/glib-2.0 $${ROOTFS_PATH}/usr/lib/glib-2.0/include/ $${ROOTFS_PATH}/usr/include/libxml2/ $${ROOTFS_PATH}/usr/include/freetype2 $${ROOTFS_PATH}/usr/include/dbus-1.0 $${ROOTFS_PATH}/usr/include/dbus-1.0/dbus
QMAKE_LIBDIR += $${ROOTFS_PATH}/usr/lib
QMAKE_INCDIR_OPENGL_ES2 = $${SGX_SDK_ROOT}/include/OGLES2
QMAKE_LIBDIR_OPENGL_ES2 = $${SGX_SDK_ROOT}/gfx_rel_es5.x
QMAKE_INCDIR_EGL = $${QMAKE_INCDIR_OPENGL_ES2}
QMAKE_LIBDIR_EGL = $${QMAKE_LIBDIR_OPENGL_ES2}
QMAKE_LIBDIR += $${QMAKE_LIBDIR_OPENGL_ES2}
# libs
QMAKE_LIBS = -lxml2 -lz -lts -lasound -lfreetype -lexpat \
-lfontconfig -lpng -lpthread -Wl,-rpath-link=$${ROOTFS_PATH}/usr/lib/arm-linux-gnueabi -Wl,-rpath-link=$${ROOTFS_PATH}/usr/lib
QMAKE_LIBS_OPENGL_ES2= -lEGL -lIMGegl -lsrv_um -lGLESv2 -lGLES_CM -lusc
QMAKE_LIBS_EGL= $${QMAKE_LIBS_OPENGL_ES2}
QMAKE_LIBS_THREAD = -lpthread
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CC = arm-arago-linux-gnueabi-gcc
QMAKE_CXX = arm-arago-linux-gnueabi-g++
QMAKE_LINK = $${QMAKE_CXX}
QMAKE_LINK_SHLIB = $${QMAKE_CXX}
QMAKE_AR = arm-arago-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-arago-linux-gnueabi-objcopy
QMAKE_STRIP = arm-arago-linux-gnueabi-strip
# dbus-1.0
QMAKE_INCDIR += /home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/dbus-1.0
QMAKE_INCDIR += /home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/lib/dbus-1.0/include
# glib-2.0
QMAKE_INCDIR += /home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/glib-2.0
QMAKE_INCDIR += /home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/lib/glib-2.0/include
# gstreamer-0.10
QMAKE_INCDIR += /home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/gstreamer-0.10
# libxml2
QMAKE_INCDIR += /home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/libxml2
# freetype2
QMAKE_INCDIR += /home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/include/freetype2
QMAKE_LIBDIR += /home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/lib
#QMAKE_LFLAGS += "-Wl,-rpath-link=/home/grebenev/ti-sdk-am3517-evm-05.05.00.00/linux-devkit/arm-arago-linux-gnueabi/usr/lib -dbus-1 -lglib-2.0 -lgthread-2.0 -lpulse -lpulse-mainloop-glib"
load(qt_config)
I use this configure params (in qt-everywhere-opensource-src-5.0.0/qtbase):
./configure -release -make libs -xplatform linux-arm-gnueabi-ti-g++ -opengl es2 -confirm-license -opensource -no-xcb -make examples -verbose -no-pch
output:
Building on: linux-g++-64
Building for: linux-arm-gnueabi-ti-g++
Architecture: arm, features:
Host architecture: x86_64, features: mmx sse sse2
Platform notes:
- Also available for Linux: linux-kcc linux-icc linux-cxx
qmake vars .......... styles += mac fusion windows QMAKE_CFLAGS_FONTCONFIG = QMAKE_LIBS_FONTCONFIG = -lfreetype -lfontconfig DEFINES += QT_NO_XCB PRECOMPILED_DIR = .pch/release-shared OBJECTS_DIR = .obj/release-shared MOC_DIR = .moc/release-shared RCC_DIR = .rcc/release-shared UI_DIR = .uic/release-shared sql-drivers = sql-plugins = sqlite qmake switches .........
Build .................. libs examples
Configuration .......... cross_compile qpa largefile neon pcre minimal-config small-config medium-config large-config full-config no-pkg-config fontconfig libudev evdev xlib xrender linuxfb c++11 accessibility egl eglfs openvg opengl opengles2 shared qpa reduce_exports reduce_relocations clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg system-png png system-freetype system-zlib nis cups iconv openssl rpath alsa concurrent audio-backend v8 release
Debug .................. no
C++11 support .......... yes
pkg-config ............. no
QtDBus module .......... no
QtConcurrent code ...... yes
QtGui module ........... yes
QtWidgets module ....... yes
JavaScriptCore JIT ..... To be decided by JavaScriptCore
QML debugging .......... yes
PCH support ............ no
iWMMXt support ......... no
NEON support ........... yes
IPv6 ifname support .... yes
getaddrinfo support .... yes
getifaddrs support ..... yes
Accessibility .......... yes
NIS support ............ yes
CUPS support ........... yes
Iconv support .......... yes
Glib support ........... no
GStreamer support ...... no
PulseAudio support ..... no
Large File support ..... yes
GIF support ............ plugin
JPEG support ........... plugin (system)
PNG support ............ yes (system)
zlib support ........... system
Session management ..... auto
libudev support ........ yes
Use system proxies ..... no
OpenGL support ......... yes (OpenGL ES 2.x)
OpenVG support ......... yes
XShape support ......... auto
XVideo support ......... auto
XSync support .......... auto
Xinerama support ....... runtime
Xcursor support ........ runtime
Xfixes support ......... runtime
Xrandr support ......... runtime
Xi support ............. runtime
Xi2 support ............ auto
MIT-SHM support ........ auto
FontConfig support ..... yes
XKB Support ............ auto
GTK theme support ...... no
SQLite support ......... plugin (qt)
OpenSSL support ........ yes (run-time)
Alsa support ........... yes
libICU support ......... no
PCRE support ........... qt
Xcb support ............ no
Xrender support ........ yes
EGLFS support .......... yes
DirectFB support ....... no
LinuxFB support ........ yes
KMS support ............ no
Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /usr/local/Qt-5.0.0
To reconfigure, run 'make confclean' and 'configure'.
After "make" & "sudo make install", i copy /usr/local/Qt-5.0.0 folder into targetfs.
In target command line:
root@am3517-evm:~# cd /usr/local/Qt-5.0.0/examples/opengl/hellogl_es2/
root@am3517-evm:/usr/local/Qt-5.0.0/examples/opengl/hellogl_es2# ./hellogl_es2
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
Failed to load platform plugin "xcb". Available platforms are:
eglfs
linuxfb
minimal
minimalegl
Aborted
root@am3517-evm:/usr/local/Qt-5.0.0/examples/opengl/hellogl_es2# ./hellogl_es2 -qpa -platform eglfs
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
Failed to load platform plugin "eglfs". Available platforms are:
eglfs
linuxfb
minimal
minimalegl
Aborted
How avoid this errors?
P.S: Qt 4.8.5 works perfectly:
root@am3517-evm:/usr/local/Trolltech/QtEmbedded-4.8.5-arm/examples/opengl/hellogl_es2# ./hellogl_es2 -qws -display powervr
[ 6845.523345] omap_device: omap_i2c.1: new worst case deactivate latency 0: 114379882
Found SGX/MBX driver, enabling FullClearOnEveryFrame
Found v1.4 driver, enabling brokenTexSubImage
Found non-Nokia v1.4 driver, enabling brokenFBOReadBack