Qt development on A20

Started by toxivirus_jon, February 13, 2014, 11:20:49 AM

Previous topic - Next topic

srxa

#30
@ikozic
It is not strange, DRM or Direct Rendering Manager Device , together with DRI2 is for X11 server, and for XCB plugin, for eglfs only MALI device driver is enough. I think you need also UMP device driver for eglfs, but it is already loaded by kernel, or it is called in some script in my and yours image.

ikozic

@srxa
Aha, got it. Great, thanks for clearing that out.

Yeah, UMP is automatically loaded with Mali. So far (knock on wood :) ), almost everything is functional for my project - quite buggy though, so I'll need a week or two to get everything polished.

I'll just repeat one more time, since I can't seem to learn myself - BEWARE of /dev/disp - too much dysfunctional crappy code there, and it's extremely buggy.

Cosik

Hi,

@srxa
I tried to cross compile qtbase in Qt5.2.1 with your description, but I always get failed. Maybe from beging.

I don't compile new drivers for my A20-LIME, I've just download last debian image and there is no problem with loading drivers:
modprobe mali
modprobe drm
modprobe mali_drm


Also I have downloaded gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux from https://releases.linaro.org/13.09/components/toolchain/binaries.

Configuration past without any problem with command:
..everywhere-opensource-src-5.2.1/qtbase # ./configure -device linux-a20olimex-g++ -device-option CROSS_COMPILE=/home/cosik/r_and_d/A20-lime/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf- -sysroot /mnt/a20 -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5olim2 -no-pch -nomake examples -nomake tests -no-xcb -eglfs -v

And after then, when I call make command, I get something like this at the end:
/mnt/a20/usr/lib/arm-linux-gnueabihf/libm.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:853: polecenia dla obiektu '../../lib/libQt5Core.so.5.2.1' nie powiodły się
make[2]: *** [../../lib/libQt5Core.so.5.2.1] Błąd 1
make[2]: Opuszczenie katalogu '/home/cosik/r_and_d/A20-lime/qt-everywhere-opensource-src-5.2.1/qtbase/src/corelib'
Makefile:135: polecenia dla obiektu 'sub-corelib-make_first' nie powiodły się
make[1]: *** [sub-corelib-make_first] Błąd 2
make[1]: Opuszczenie katalogu '/home/cosik/r_and_d/A20-lime/qt-everywhere-opensource-src-5.2.1/qtbase/src'
Makefile:41: polecenia dla obiektu 'sub-src-make_first' nie powiodły się
make: *** [sub-src-make_first] Błąd 2


Any suggestions and tips?

Cosik

#33
Hi,

I noticed that I have problems with compile Qt with option -eglfs.

Any one have any idea what to do?

[Edit]
Problem solved, I found solution in this instruction:
http://wickwire2099.blogspot.pt/2014/02/qt5-on-cubieboard-a10a20.html

claudio

#34
Hi all!  ;)
I have an Olinuxino-micro a20 with the last Debian image by Olimex, ssvb kernel and Mali libraries installed.

Now i'm trying to install QT5 on my Olinuxino-micro a20.
I installed "ia32-libs" on my host (Ubuntu 12.04 64bit), mounted my sd card (rootfs partition) in /mnt/a20/, cloned "cross-compile-tools" repo and ran the fixQualifiedLibraryPaths script. As toolchain i'm using "gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux" (but i tryed also with 4.9 version). Then i downloaded qtsource 5.3.1, created the "linux-a20olimex-g++" folder and changed the qmake.conf and qeglfshooks_stub.cpp files, that are the same as the guide coz i have the same paths.

Now i have some problems with the ./configure, this is my command:
./configure -opengl es2 -device linux-a20olimex-g++ -device-option CROSS_COMPILE=/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf- -sysroot /mnt/a20/ -opensource -confirm-license -optimized-qmake -release -make libs -prefix /usr/local/qt5olim2 -no-pch -nomake examples -nomake tests -no-xcb -eglfs -v


Result:

This is the Qt Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) versions 3.

You have already accepted the terms of the Open Source license.

/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ --sysroot=/mnt/a20/ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
#error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
  ^
Symbolic function binding disabled.
DEFAULT_INCDIRS="/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/arm-linux-gnueabihf/include/c++/4.8.2
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/arm-linux-gnueabihf/include/c++/4.8.2/arm-linux-gnueabihf
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/arm-linux-gnueabihf/include/c++/4.8.2/backward
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/lib/gcc/arm-linux-gnueabihf/4.8.2/include
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/lib/gcc/arm-linux-gnueabihf/4.8.2/include-fixed
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/arm-linux-gnueabihf/include
/mnt/a20/usr/include
/mnt/a20/usr/include/arm-linux-gnueabihf
"
DEFAULT_LIBDIRS="/mnt/a20/usr/lib
/mnt/a20/usr/lib/arm-linux-gnueabihf
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/lib/gcc/arm-linux-gnueabihf/4.8.2
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/lib/gcc/arm-linux-gnueabihf
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/lib/gcc
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/arm-linux-gnueabihf/lib
/mnt/a20/lib/arm-linux-gnueabihf
/mnt/a20/lib
"
Creating qmake...
g++ -c -o qlibraryinfo.o -pipe -ffunction-sections -O2 -g  -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/qmake -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/qmake/library -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/qmake/generators -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/qmake/generators/unix -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/qmake/generators/win32 -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/qmake/generators/mac -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/qmake/generators/integrity -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/include -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/include/QtCore -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/include/QtCore/5.3.2 -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/include/QtCore/5.3.2/QtCore -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/src/corelib/global -DHAVE_QCONFIG_CPP -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/linux-g++ -I/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/tools/shared -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY /home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/src/corelib/global/qlibraryinfo.cpp
g++ -o "/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/bin/qmake" project.o option.o property.o main.o ioutils.o proitems.o qmakevfs.o qmakeglobals.o qmakeparser.o qmakeevaluator.o qmakebuiltins.o makefile.o unixmake2.o unixmake.o mingw_make.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o gbuild.o cesdkhandler.o qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o qmalloc.o qglobal.o qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o qjson.o qjsondocument.o qjsonparser.o qjsonarray.o qjsonobject.o qjsonvalue.o qfilesystemengine_unix.o qfilesystemiterator_unix.o qfsfileengine_unix.o qlocale_unix.o  -Wl,--gc-sections
Running configuration tests...
Note: PKG_CONFIG_LIBDIR automatically set to /mnt/a20//usr/lib/pkgconfig:/mnt/a20//usr/share/pkgconfig:/mnt/a20//usr/lib/arm-linux-gnueabihf/pkgconfig
Note: PKG_CONFIG_SYSROOT_DIR automatically set to /mnt/a20/
Determining architecture... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -g -Wall -W -fPIE  -I../../mkspecs/devices/linux-a20olimex-g++ -I. -o arch.o arch.cpp
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++  -o arch arch.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/
    Found architecture in binary
CFG_ARCH="arm"
CFG_CPUFEATURES=" neon"
Determining architecture... ()
g++ -c -pipe -g -Wall -W -fPIE  -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp
g++  -o arch arch.o   
    Found architecture in binary
CFG_HOST_ARCH="x86_64"
CFG_HOST_CPUFEATURES=" mmx sse sse2"
System architecture: 'arm'
Host architecture: 'x86_64'
C++11 auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -std=c++0x -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o c++11.o c++11.cpp
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -Wl,-O1 -o c++11 c++11.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/
C++11 enabled.
floatmath auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o floatmath.o floatmath.cpp
floatmath.cpp:44:5: warning: unused parameter 'argc' [-Wunused-parameter]
int main(int argc, char **argv)
     ^
floatmath.cpp:44:5: warning: unused parameter 'argv' [-Wunused-parameter]
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -Wl,-O1 -o floatmath floatmath.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/
floatmath enabled.
sse2 auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -msse2 -g -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o sse2.o sse2.cpp
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse2'
make: *** [sse2.o] Errore 1
sse2 disabled.
zlib auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o zlib.o zlib.cpp
zlib.cpp: In function 'int main(int, char**)':
zlib.cpp:46:15: warning: variable 'stream' set but not used [-Wunused-but-set-variable]
     z_streamp stream;
               ^
zlib.cpp:48:17: warning: variable 'ver' set but not used [-Wunused-but-set-variable]
     const char *ver = zlibVersion();
                 ^
zlib.cpp:51:9: warning: variable 'res' set but not used [-Wunused-but-set-variable]
     int res = compress2(0, 0, 0, 0, 1);
         ^
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -Wl,-O1 -o zlib zlib.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/ -lz
zlib enabled.
mtdev auto-detection... ()
Project ERROR: mtdev development package not found
mtdev disabled.
libjpeg auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o libjpeg.o libjpeg.cpp
libjpeg.cpp:45:21: fatal error: jpeglib.h: File o directory non esistente
#include <jpeglib.h>
                     ^
...
...

compilation terminated.
make: *** [glib.o] Errore 1
Glib disabled.
ICU auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o icu.o icu.cpp
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -Wl,-O1 -o icu icu.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/ -licui18n -licuuc -licudata
ICU enabled.
PulseAudio auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o pulseaudio.o pulseaudio.cpp
pulseaudio.cpp:42:30: fatal error: pulse/pulseaudio.h: File o directory non esistente
#include <pulse/pulseaudio.h>
                              ^
compilation terminated.
make: *** [pulseaudio.o] Errore 1
PulseAudio disabled.
OpenGL ES 2.x auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -I/mnt/a20/usr/include/GLES2 -o opengles2.o opengles2.cpp
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -Wl,-O1 -o opengles2 opengles2.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/ -L/mnt/a20/usr/lib -lGLESv2 -lEGL
OpenGL ES 2.x enabled.
FontConfig auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o fontconfig.o fontconfig.cpp
fontconfig.cpp:42:22: fatal error: ft2build.h: File o directory non esistente
#include <ft2build.h>
                      ^
compilation terminated.
make: *** [fontconfig.o] Errore 1
FontConfig disabled.
libudev auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o libudev.o libudev.cpp
libudev.cpp:42:21: fatal error: libudev.h: File o directory non esistente
#include <libudev.h>
                     ^
compilation terminated.
make: *** [libudev.o] Errore 1
libudev disabled.
evdev auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o evdev.o evdev.cpp
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -Wl,-O1 -o evdev evdev.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/
evdev enabled.
XLib auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o xlib.o xlib.cpp
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -Wl,-O1 -o xlib xlib.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/ -lXext -lX11 -lm
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lXext
collect2: error: ld returned 1 exit status
make: *** [xlib] Errore 1
XLib disabled.
Xrender auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o xrender.o xrender.cpp
xrender.cpp:43:36: fatal error: X11/extensions/Xrender.h: File o directory non esistente
#include <X11/extensions/Xrender.h>
                                    ^
compilation terminated.
make: *** [xrender.o] Errore 1
Xrender disabled.
XInput2 auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o xinput2.o xinput2.cpp
xinput2.cpp:43:36: fatal error: X11/extensions/XInput2.h: File o directory non esistente
#include <X11/extensions/XInput2.h>
                                    ^
compilation terminated.
make: *** [xinput2.o] Errore 1
XInput2 disabled.
LinuxFB auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -o linuxfb.o linuxfb.cpp
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -Wl,-O1 -o linuxfb linuxfb.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/
LinuxFB enabled.
KMS auto-detection... ()
Project ERROR: libudev development package not found
KMS disabled.
EGL auto-detection... ()
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -Wall -W -fPIE  -I../../../mkspecs/devices/linux-a20olimex-g++ -I. -I/mnt/a20/usr/include/EGL -o egl.o egl.cpp
egl.cpp: In function 'int main(int, char**)':
egl.cpp:46:12: warning: unused variable 'x' [-Wunused-variable]
     EGLint x = 0;
            ^
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -Wl,-O1 -o egl egl.o   -lrt -lpthread -ldl --sysroot=/mnt/a20/ -L/mnt/a20/usr/lib -lEGL
/mnt/a20/usr/lib/libEGL.so: undefined reference to `_mali_clz_lut'
collect2: error: ld returned 1 exit status
make: *** [egl] Errore 1
EGL disabled.
The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces.
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in /home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/devices/linux-a20olimex-g++.



I deleted some text above because of the 20000 chars limitation.
Can you give me some hints?

One last thing: following another guide (for cubieboard) when i had to prepare my board with libraries i've only installed these:
sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby
can be this the problem?

Thank you in advance, Claudio.


JohnS

As it complains about jpeglib.h you look to need some tool(s)/etc for jpeg

John

claudio

Quote from: JohnS on October 23, 2014, 07:48:04 PM
As it complains about jpeglib.h you look to need some tool(s)/etc for jpeg

John

Thank you for your tip  ;), btw i don't think that's the main problem. I'll wait for new hints.

Cosik

Hi claudio,

Did you correctly compiled mali binaries? I had some similar problems to yours.

I also writing some tutorial how to compile Qt5 step by step from beginning, but status of this is pending.

claudio

Quote from: Cosik on October 26, 2014, 09:15:16 PM
Hi claudio,

Did you correctly compiled mali binaries? I had some similar problems to yours.

I also writing some tutorial how to compile Qt5 step by step from beginning, but status of this is pending.

Hi, ye i correctly compiled mali libraries and the test runs with no errors. Also ./configure works now, but i still have problems running the make command. Everytime i try to compile there is a new error, then i fix the error and when i try there is a new one. 

Cosik

But what kind of errors? It's necessary to know what errors you get.

claudio

My last error was this:
make[3]: uscita dalla directory "/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/src/widgets"
cd opengl/ && ( test -e Makefile || /home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/bin/qmake /home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/src/opengl/opengl.pro -o Makefile ) && make -f Makefile
make[3]: ingresso nella directory "/home/claudio/TirocinioSort/QTSource/qt-everywhere-opensource-src-5.3.2/qtbase/src/opengl"
/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard --sysroot=/mnt/a20/ -O2 -O3 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_USING_NAMESPACE -DQT_BUILD_OPENGL_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../../mkspecs/devices/linux-a20olimex-g++ -I. -I../../include -I../../include/QtOpenGL -I../../include/QtOpenGL/5.3.2 -I../../include/QtOpenGL/5.3.2/QtOpenGL -isystem /mnt/a20/usr/include/EGL -isystem /mnt/a20/usr/include/GLES2 -I../../include/QtWidgets/5.3.2 -I../../include/QtWidgets/5.3.2/QtWidgets -I../../include/QtWidgets -I../../include/QtGui/5.3.2 -I../../include/QtGui/5.3.2/QtGui -I../../include/QtGui -I../../include/QtCore/5.3.2 -I../../include/QtCore/5.3.2/QtCore -I../../include/QtCore -I.moc -o .obj/qgl.o qgl.cpp
In file included from /mnt/a20/usr/include/EGL/eglplatform.h:89:0,
                 from /mnt/a20/usr/include/EGL/egl.h:36,
                 from eglconvenience/qeglplatformcontext_p.h:47,
                 from eglconvenience/qeglplatformcontext.cpp:42:
../../include/QtCore/../../src/corelib/kernel/qvariant.h:132:9: error: expected identifier before 'int'
         Bool = QMetaType::Bool,
         ^
../../include/QtCore/../../src/corelib/kernel/qvariant.h:132:9: error: expected '}' before 'int'
In file included from ../../include/QtCore/qvariant.h:1:0,
                 from ../../include/QtCore/../../src/corelib/tools/qlocale.h:45,
                 from ../../include/QtCore/qlocale.h:1,
                 from ../../include/QtCore/../../src/corelib/io/qtextstream.h:48,
                 from ../../include/QtCore/qtextstream.h:1,
                 from ../../include/QtCore/../../src/corelib/io/qdebug.h:50,
                 from ../../include/QtCore/qdebug.h:1,
                 from ../../include/QtCore/QDebug:1,
                 from eglconvenience/qeglplatformcontext.cpp:47:
../../include/QtCore/../../src/corelib/kernel/qvariant.h:132:14: error: expected unqualified-id before '=' token
         Bool = QMetaType::Bool,
              ^
../../include/QtCore/../../src/corelib/kernel/qvariant.h:197:21: error: expected unqualified-id before ')' token
     inline QVariant();
                     ^
../../include/QtCore/../../src/corelib/kernel/qvariant.h:198:16: error: expected constructor, destructor, or type conversion before ';' token
     ~QVariant();
                ^


I found a workaround that says to put "#undef Bool" after includes into "qvariant.h" so now i'm trying again with make. But everytime i "fix" an error there is one new.

Cosik

Ok, I probably know where is problem. You configure Qt with frame buffer or X11?

How did you build mali binary drivers?

I had similar problems when I configure wrong mali drivers.

claudio

For Mali i did:

git clone https://github.com/linux-sunxi/sunxi-mali.git
cd sunxi-mali
git submodule init
git submodule update
make config ABI=armhf VERSION=r3p2-01rel2 EGL_TYPE=framebuffer
make install


Then i tested them:
cd test
make
modprobe mali
modprobe drm
modprobe mali_drm
./test


And it was all ok, with the triangle and all parameters good.

Then qt: i ran this configure:
./configure \
-opengl es2 \
-device linux-a20olimex-g++ \
-device-option CROSS_COMPILE=/home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf- \
-sysroot /mnt/a20/ \
-opensource \
-confirm-license \
-optimized-qmake \
-release \
-make libs \
-prefix /opt/qt5.3.2olim2 \
-no-pch \
-nomake examples \
-nomake tests \
-no-xcb \
-eglfs \
-v


My Qmake is:
#
# qmake configuration for the A20_OlinuxinO boards
# http://www.olimex.com/

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)

load(device_config)

QT_QPA_DEFAULT_PLATFORM = eglfs
#EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_a20.cpp
# modifications to g++.conf
QMAKE_CC                = $${CROSS_COMPILE}gcc
QMAKE_CXX               = $${CROSS_COMPILE}g++
QMAKE_LINK              = $${QMAKE_CXX}
QMAKE_LINK_SHLIB        = $${QMAKE_CXX}

# modifications to linux.conf
QMAKE_AR                = $${CROSS_COMPILE}ar cqs
QMAKE_OBJCOPY           = $${CROSS_COMPILE}objcopy
QMAKE_NM                = $${CROSS_COMPILE}nm -P
QMAKE_STRIP             = $${CROSS_COMPILE}strip

COMPILER_FLAGS          = -march=armv7-a -mtune=cortex-a7 -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard

#modifications to gcc-base.conf
QMAKE_CFLAGS           += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS         += $${COMPILER_FLAGS}
QMAKE_CXXFLAGS_RELEASE += -O3

QMAKE_LIBS             += -lrt -lpthread -ldl

# Extra stuff (OpenGL, DirectFB, ...)
QMAKE_INCDIR_EGL        = /mnt/a20/usr/include/EGL
QMAKE_LIBDIR_EGL        = /mnt/a20/usr/lib
QMAKE_INCDIR_OPENGL_ES2 = /mnt/a20/usr/include/GLES2
QMAKE_LIBDIR_OPENGL_ES2 = /mnt/a20/usr/lib
#QMAKE_INCDIR_OPENVG     = $${QMAKE_INCDIR_EGL}
#QMAKE_LIBDIR_OPENVG     = $${QMAKE_LIBDIR_EGL}

QMAKE_LIBS_EGL          = -lEGL -lGLESv2
QMAKE_LIBS_OPENGL_ES2   = -lGLESv2 $${QMAKE_LIBS_EGL}
#QMAKE_LIBS_OPENVG       = -lOpenVG $${QMAKE_LIBS_EGL}

# Sanity check
deviceSanityCheckCompiler()

load(qt_config)


I used "QMAKE_LIBS_EGL = -lEGL -lGLESv2" because the first time i ran "configure" it gave me this error: "undefined reference to `_mali_clz_lut' " and i found this discussion: "http://talk.radxa.com/topic/139/libegl-so-undefined-reference-to-_mali_clz_lut/10"



Cosik

Ok, some more stupid question:

1. Did you link libraries with cross-compile-tools and arm-linux-gnueabihf-g++?

2. Did you clean directory before each build/configuration?

3. Did you install mali drivers as root?

claudio

1) yes
git clone git://gitorious.org/cross-compile-tools/cross-compile-tools.git
cd cross-compile-tools
sudo ./fixQualifiedLibraryPaths /mnt/a20/ /home/claudio/TirocinioSort/Toolchain/gcc-linaro-arm-linux-gnueabihf-4.8-2013.09_linux/bin/arm-linux-gnueabihf-g++


2)i think no

3)yes, btw i think tomorrow i'll try to re-do my Debian image from beginning.

I ask you one thing, i'm using official Debian image from Olimex (the release 7 that you can find here: https://www.olimex.com/wiki/A20-OLinuXino-MICRO#Linux)
Next i need ssvb kernel for mali support:

git clone -b 20140116-mali-r3p2-01rel2 https://github.com/ssvb/linux-sunxi.git linux-sunxi
cd linux-sunxi
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun7i_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j5 uImage modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install


is this right? i'm really desperate coz i tried so many things...
Thank you for your help