[SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Post Reply
User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

[SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Wed May 23, 2018 7:48 pm

I'm trying to build Qt5 source code now. But no success yet.
Please review my steps and let me know any possible mistakes.

Download the Qt5 (ver5.10) source code

Code: Select all

sudo apt-get build-dep qt5-default git
sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrv
git clone https://code.qt.io/qt/qt5.git
cd qt5
git checkout 5.10
perl init-repository  
Add a mali_hack (Line 90 in Qt 5.10 qtbase/src/platformsupport/eglconvenience/qxlibeglintegration.cpp)

Code: Select all

                 return visualId;
             }
+            //hack
+            return visualId;
+            //end hack
Change "qtbase/mkspecs/linux-g++/qmake.conf" file like this

Code: Select all

# 
# qmake configuration for linux-g++ 
# 

MAKEFILE_GENERATOR = UNIX 
CONFIG += incremental 
QMAKE_INCREMENTAL_STYLE = sublib 

include(../common/linux.conf) 
include(../common/gcc-base-unix.conf) 
include(../common/g++-unix.conf) 

#QMAKE_INCDIR += /usr/include 
#QMAKE_LIBDIR += /usr/lib 

#QMAKE_INCDIR_OPENGL = /usr/include/GL 
#QMAKE_LIBDIR_OPENGL = /usr/lib/arm-linux-gnueabihf/mesa 
QMAKE_INCDIR_EGL = /usr/include/EGL 
QMAKE_LIBDIR_EGL = /usr/lib/arm-linux-gnueabihf/mali-egl
QMAKE_INCDIR_OPENGL_ES2 = /usr/include/GLES2
QMAKE_LIBDIR_OPENGL_ES2 = /usr/lib/arm-linux-gnueabihf/mali-egl
#QMAKE_INCDIR_OPENVG = $QMAKE_INCDIR_EGL
#QMAKE_LIBDIR_OPENVG = /usr/lib/arm-linux-gnueabihf/mali-egl

QMAKE_LIBS_EGL += -lEGL
#QMKAE_LIBS_GL += -lGL
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL -lmali

#QMAKE_LFLAGS += -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf
QMAKE_CFLAGS += -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mtune=cortex-a15.cortex-a7 -mfloat-abi=hard
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
QMAKE_CFLAGS_RELEASE += -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mtune=cortex-a15.cortex-a7 -mfloat-abi=hard
DISTRO_OPTS += "hard-float"
QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CXXFLAGS -O2

QT_INSTALL_PREFIX="/home/odroid/qt5/build" ## Edit this if you have a preference 

# Preferred eglfs backend 
EGLFS_DEVICE_INTEGRATION = eglfs_linuxfb 
load(qt_config)
Make a QMake file.

Code: Select all

cd qtbase
./configure -prefix "/home/odroid/qt5/build" -release -confirm-license -opensource -platform linux-g++ -opengl es2 -no-pch
But I met this error message.

Code: Select all

<srcbase> = /home/odroid/qt5/qtbase 
<outbase> = /home/odroid/qt5/qtbase ource -platform linux-g++ -opengl es2 -no-pch
Creating qmake...
.Done.

This is the Qt Open Source Edition.

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

Running configuration tests...
Done running configuration tests.

Configure summary:

Build type: linux-g++ (arm, CPU features: neon)
Configuration: use_gold_linker compile_examples enable_new_dtags largefile neon shared rpath release c++11 c++14 c++1z concurrent dbus reduce_exports stl
Build options:
  Mode ................................... release
  Optimize release build for size ........ no
  Building shared libraries .............. yes
  Using C++ standard ..................... C++1z
  Using ccache ........................... no
  Using gold linker ...................... yes
  Using new DTAGS ........................ yes
  Using precompiled headers .............. no
  Using LTCG ............................. no
  Target compiler supports:
    NEON ................................. yes
  Build parts ............................ libs examples tools
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... yes
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... yes
  QML debugging .......................... yes
  udev ................................... yes
  Using system zlib ...................... yes
Qt Core:
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ yes
  GLib ................................... yes
  iconv .................................. no
  ICU .................................... yes
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  Using system PCRE2 ..................... no
Qt Network:
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
  OpenSSL 1.1 ............................ yes
  SCTP ................................... no
  Use system proxies ..................... yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ yes
  Fontconfig ............................. yes
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... yes
    PNG .................................. yes
      Using system libpng ................ yes
  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. yes
  libinput ............................... yes
  INTEGRITY HID .......................... no
  mtdev .................................. yes
  tslib .................................. no
  xkbcommon-evdev ........................ yes
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no
  X11:
    Using system-provided XCB libraries .. yes
    EGL on X11 ........................... no
    Xinput2 .............................. yes
    XCB XKB .............................. yes
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... yes
    Native painting (experimental) ....... yes
Qt Widgets:
  GTK+ ................................... yes
  Styles ................................. Fusion Windows
Qt PrintSupport:
  CUPS ................................... yes
Qt Sql:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. yes
  OCI (Oracle) ........................... no
  ODBC ................................... yes
  PostgreSQL ............................. yes
  SQLite2 ................................ no
  SQLite ................................. yes
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... yes

Note: Dropped compiler flags '-pthread' when detecting library 'glib'.

Note: Dropped compiler flags '-pthread' when detecting library 'gtk3'.

ERROR: Feature 'opengles2' was enabled, but the pre-condition 'config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.

ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

Check config.log for details.
But I could find the GPU related files in the proper directory. Other EGL software like glmark2-es2, es2gears and webgl are working fine.

Code: Select all

odroid@odroid:~/qt5/qtbase$ ls -alp /usr/lib/arm-linux-gnueabihf/mali-egl/                                                                                                                                                       
total 20128
drwxr-xr-x   2 root root     4096 Apr 18 03:27 ./
drwxr-xr-x 114 root root    86016 May 23 10:28 ../
-rw-r--r--   1 root root       38 Apr 17 21:00 ld.so.conf
-rwxr-xr-x   1 root root     2752 Apr 17 21:00 libEGL.so
lrwxrwxrwx   1 root root        9 Apr 17 21:00 libEGL.so.1 -> libEGL.so
lrwxrwxrwx   1 root root        9 Apr 17 21:00 libEGL.so.1.4 -> libEGL.so
-rwxr-xr-x   1 root root     2752 Apr 17 21:00 libGLESv1_CM.so
lrwxrwxrwx   1 root root       15 Apr 17 21:00 libGLESv1_CM.so.1 -> libGLESv1_CM.so
lrwxrwxrwx   1 root root       15 Apr 17 21:00 libGLESv1_CM.so.1.1 -> libGLESv1_CM.so
-rwxr-xr-x   1 root root     2752 Apr 17 21:00 libGLESv2.so
lrwxrwxrwx   1 root root       12 Apr 17 21:00 libGLESv2.so.2 -> libGLESv2.so
lrwxrwxrwx   1 root root       12 Apr 17 21:00 libGLESv2.so.2.0 -> libGLESv2.so
-rwxr-xr-x   1 root root     2752 Apr 17 21:00 libOpenCL.so
lrwxrwxrwx   1 root root       12 Apr 17 21:00 libOpenCL.so.1 -> libOpenCL.so
lrwxrwxrwx   1 root root       12 Apr 17 21:00 libOpenCL.so.1.1 -> libOpenCL.so
-rwxr-xr-x   1 root root 20493444 Apr 17 21:00 libmali.so
Can you please let me know what was wrong?
This is my first time to try building the Qt source code. :(

User avatar
meveric
Posts: 10485
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2
Has thanked: 17 times
Been thanked: 131 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by meveric » Wed May 23, 2018 10:45 pm

First I'd suggest not using the "hack" line but instead using the Vendor line: if (vendor && (strstr(vendor, "Vivante") || strstr(vendor, "ARM"))) this much better than always forcing the system to use this return path.

If you check the output of the configure result you can see the following:

Code: Select all

  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
This is normally the case if you do NOT have the mesa headers installed, QT is one of these applications that require both MESA and MALI installed side by side.

Most likely this section will give you quite some trouble as well:

Code: Select all

QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no
  X11:
    Using system-provided XCB libraries .. yes
    EGL on X11 ........................... no
    Xinput2 .............................. yes
    XCB XKB .............................. yes
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... yes
    Native painting (experimental) ....... yes
It defines what backends should be used and what you want is EGL on X11 but by now the MALI code detection is upstream already and it will instead try to go for EGLFS or LinuxFB which means it bypasses X11.
I don't remember what exactly I did, but I had to alter the configure script to make sure mali detection retuns NO as an answer or else it won't use EGL on X11.

Also in most cases programs will use /usr/lib/arm-linux-gnueabihf/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so and /usr/lib/arm-linux-gnueabihf/libEGL.so they don't really care what's in subfolders, unless the links I mentioned point directly to these libraries.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Thu May 24, 2018 8:57 am

I've changed the source code as you suggested. It is much more logical now. :)

mesa-headers exist by deafult in our Ubuntu image.

Code: Select all

odroid@odroid:~$ dpkg -l *mesa*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                   Version                  Architecture             Description
+++-======================================-========================-========================-==================================================================================
ii  libegl-mesa0:armhf                     18.0.0~rc5-1ubuntu1      armhf                    free implementation of the EGL API -- Mesa vendor library
ii  libegl1-mesa:armhf                     18.0.0~rc5-1ubuntu1      armhf                    transitional dummy package
ii  libegl1-mesa-dev:armhf                 18.0.0~rc5-1ubuntu1      armhf                    free implementation of the EGL API -- development files
ii  libgl1-mesa-dev:armhf                  18.0.0~rc5-1ubuntu1      armhf                    free implementation of the OpenGL API -- GLX development files
ii  libgl1-mesa-dri:armhf                  18.0.0~rc5-1ubuntu1      armhf                    free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-glx:armhf                  18.0.0~rc5-1ubuntu1      armhf                    transitional dummy package
un  libgl1-mesa-swx11                      <none>                   <none>                   (no description available)
ii  libglapi-mesa:armhf                    18.0.0~rc5-1ubuntu1      armhf                    free implementation of the GL API -- shared library
un  libgles2-mesa                          <none>                   <none>                   (no description available)
ii  libgles2-mesa-dev:armhf                18.0.0~rc5-1ubuntu1      armhf                    free implementation of the OpenGL|ES 2.x API -- development files
ii  libglu1-mesa:armhf                     9.0.0-2.1build1          armhf                    Mesa OpenGL utility library (GLU)
ii  libglu1-mesa-dev:armhf                 9.0.0-2.1build1          armhf                    Mesa OpenGL utility library -- development files
ii  libglx-mesa0:armhf                     18.0.0~rc5-1ubuntu1      armhf                    free implementation of the OpenGL API -- GLX vendor library
ii  libwayland-egl1-mesa:armhf             18.0.0~rc5-1ubuntu1      armhf                    implementation of the Wayland EGL platform -- runtime
ii  mesa-common-dev:armhf                  18.0.0~rc5-1ubuntu1      armhf                    Developer documentation for Mesa
un  mesa-glide2-dev                        <none>                   <none>                   (no description available)
ii  mesa-utils                             8.4.0-1                  armhf                    Miscellaneous Mesa GL utilities
ii  mesa-utils-extra                       8.4.0-1                  armhf                    Miscellaneous Mesa utilies (opengles, egl)
ii  mesa-va-drivers:armhf                  18.0.0~rc5-1ubuntu1      armhf                    Mesa VA-API video acceleration drivers
ii  mesa-vdpau-drivers:armhf               18.0.0~rc5-1ubuntu1      armhf                    Mesa VDPAU video acceleration drivers
un  mesag-dev                              <none>                   <none>                   (no description available)
un  mesag3                                 <none>                   <none>                   (no description available)
un  mesag3+ggi-dev                         <none>                   <none>                   (no description available)
un  xlibmesa-dev                           <none>                   <none>                   (no description available)
un  xlibmesa-glu-dev                       <none>                   <none>                   (no description available)
un  xlibmesa3                              <none>                   <none>                   (no description available)
I will try to learn how Qtbase configuration detects the OpenGL ES capabilities with the strange mesa dependancies.
But it seems to be very hard to understand for me. :(

User avatar
meveric
Posts: 10485
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2
Has thanked: 17 times
Been thanked: 131 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by meveric » Thu May 24, 2018 3:03 pm

then maybe it's the last sentence I said.
QT compiles tiny example applications and links them against the libraries I mentioned.
Linking = successful -> yes, else no

Code: Select all

# EGL Support
if [ "$CFG_EGL" != "no" ]; then
    if [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then
        echo "EGL support was requested but OpenGL support is disabled."
        echo "Either disable EGL support or enable OpenGL support."
        exit 101
    fi

    if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
        QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
        QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
        QMAKE_CFLAGS_EGL="`$PKG_CONFIG --cflags egl 2>/dev/null` -fpermissive"
        QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
        QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
        QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
    fi       # detect EGL support
    if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
        CFG_EGL=yes
        if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
            CFG_EGL_X=yes
        else
            CFG_EGL_X=no
        fi
    elif [ "$CFG_EGL" = "yes" ]; then
        echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
        [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
        echo " You might need to modify the include and library search paths by editing"
        echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
        exit 1
    else
        CFG_EGL=no
        CFG_EGL_X=no
    fi
fi
First they check with pkg-config if the library exists:

Code: Select all

pkg-config --exist egl
It returns 0 if true or 1 if not
If true, they get different environment variables:
include paths: pkg-config --cflags-only-I egl
libaries required for linking: pkg-config --libs egl
compiler flags: pkg-config --cflags egl

after that they compile example programs with the variables they just gathered:

Code: Select all

      if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
        CFG_EGL=yes
        if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
            CFG_EGL_X=yes
Similar things are done for OpenGL and OpenGL ES.

Also you should make sure you pass the option that you want "es2" as OpenGL -opengl es2:

Code: Select all

elif [ "$CFG_OPENGL" = "es2" ]; then
    #OpenGL ES 2.0

    compileTestWithPkgConfig glesv2 unix/opengles2 "OpenGL ES 2.0" OPENGL_ES2
    if [ $? != "0" ]; then
        echo "The OpenGL ES 2.0 functionality test failed!"
        [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
        echo " You might need to modify the include and library search paths by editing"
        echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
        echo " ${XQMAKESPEC}."
        exit 1
    fi
Or else it will always test for OpenGL first.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

moon.linux
Posts: 1166
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by moon.linux » Thu May 24, 2018 3:34 pm

Hi odroid,

To build qmake

Code: Select all

odroid@odroid:~/qt5/qtbase$ ./configure -v -prefix "/home/odroid/qt5/build" -release -confirm-license -opensource -platform linux-g++ -opengl es2 -no-pch -make libs  &> config_option
As per your suggestion here is the patch for qmake.
attach is the

Code: Select all

config_option
redirect output.
Attachments
config_option.txt
config option
(186.24 KiB) Downloaded 381 times
qtbase.patch.txt
qtbase patch
(2.25 KiB) Downloaded 312 times

User avatar
meveric
Posts: 10485
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2
Has thanked: 17 times
Been thanked: 131 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by meveric » Thu May 24, 2018 3:45 pm

I think your patch is missing an opening bracket on the vendor line.

Also here's an excerpt from your config_options.txt:

Code: Select all

Checking for OpenGL ES 2.0... 
Trying source 0 (type pkgConfig) of library opengl_es2 ...
+ /usr/bin/pkg-config --exists --silence-errors glesv2
+ /usr/bin/pkg-config --modversion glesv2
> 18.0.0-rc5
+ /usr/bin/pkg-config --libs-only-L glesv2
+ /usr/bin/pkg-config --libs-only-l glesv2
> -lGLESv2
+ /usr/bin/pkg-config --cflags glesv2
+ cd /home/odroid/qt5/qtbase/config.tests/opengl_es2 && /home/odroid/qt5/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker warn_off console single_arch" 'LIBS += -lGLESv2' /home/odroid/qt5/qtbase/config.tests/opengl_es2
+ cd /home/odroid/qt5/qtbase/config.tests/opengl_es2 && MAKEFLAGS= /usr/bin/make
> g++ -c -pipe -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mtune=cortex-a15.cortex-a7 -mfloat-abi=hard -O2 -pipe -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mtune=cortex-a15.cortex-a7 -mfloat-abi=hard -O2 -w -fPIC  -I. -I/home/odroid/qt5/qtbase/mkspecs/linux-g++ -o main.o main.cpp
> g++ -Wl,-O1 -fuse-ld=gold -o opengl_es2 main.o   -lGLESv2 
> /usr/bin/arm-linux-gnueabihf-ld.gold: error: cannot open /usr/lib/gcc/arm-linux-gnueabihf/7/../../../arm-linux-gnueabihf/libGLESv2.so: No such file or directory
> main.o:main.cpp:function main: error: undefined reference to 'glUniform1f'
> main.o:main.cpp:function main: error: undefined reference to 'glClear'
> collect2: error: ld returned 1 exit status
> Makefile:67: recipe for target 'opengl_es2' failed
> make: *** [opengl_es2] Error 1
 => source failed verification.
You can see it's trying to link against -lGLESv2 and fails as it says: /usr/lib/gcc/arm-linux-gnueabihf/7/../../../arm-linux-gnueabihf/libGLESv2.so: No such file or directory
so as I said earlier it tries to open: /usr/lib/arm-linux-gnueabihf/libGLESv2.so which apparently is not present or wrongly linked.

After that it tries your mali hack and succeeds, my opinion, rather than hacking the build system, make sure your links for /usr/lib/arm-linux-gnueabihf/libGLESv2.so are correct with that you don't need to alter the code (or at least keep it to a minimum).
Also you can see your EGL fails completely, you have to hack that a little more and link it against mali as well.
EGL on X11 is disabled, which is what you want for desktop Qt5 applications, or else you can only run fullscreen (framebuffer) applications.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Thu May 24, 2018 4:09 pm

I'm trying another approach.
I've downloaded the Qtbase source code from official Ubuntu ppa and edited source code.

Code: Select all

apt source qtbase5-dev
cd qtbase-opensource-src-5.9.5+dfsg
vi src/platformsupport/eglconvenience/qxlibeglintegration.cpp
Then, I started to build with dpkg-build.

Code: Select all

sudo dpkg-buildpackage -b
This time, the configuration looks much better. I didn't change the soft-links of GL-ES libs.
The "rules" file in debian directory seems to be well made by Debian developers.

Code: Select all

Build type: linux-g++ (arm, CPU features: <none>)
Configuration: compile_examples enable_new_dtags largefile precompile_header nostrip shared release c++11 c++14 c++1z concurrent dbus reduce_exports release_tools stl
Build options:
  Mode ................................... release; optimized tools
  Optimize release build for size ........ no
  Building shared libraries .............. yes
  Using C++ standard ..................... C++1z
  Using ccache ........................... no
  Using gold linker ...................... no
  Using new DTAGS ........................ yes
  Using precompiled headers .............. yes
  Using LTCG ............................. no
  Target compiler supports:
    NEON ................................. no
  Build parts ............................ libs examples tools
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... yes
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... yes
  QML debugging .......................... yes
  udev ................................... yes
  Using system zlib ...................... yes
Qt Core:
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ yes
  GLib ................................... yes
  iconv .................................. no
  ICU .................................... yes
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  Using system PCRE2 ..................... no
Qt Network:
  getaddrinfo() .......................... yes
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
  SCTP ................................... no
  Use system proxies ..................... yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ yes
  Fontconfig ............................. yes
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... yes
    PNG .................................. yes
      Using system libpng ................ yes
  EGL .................................... yes
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ yes
    OpenGL ES 3.0 ........................ yes
    OpenGL ES 3.1 ........................ no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. yes
  libinput ............................... yes
  INTEGRITY HID .......................... no
  mtdev .................................. yes
  tslib .................................. no
  xkbcommon-evdev ........................ yes
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... yes
    EGLFS GBM ............................ yes
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGL on X11 ........................... yes
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no
  X11:
    Using system-provided XCB libraries .. yes
    EGL on X11 ........................... yes
    Xinput2 .............................. yes
    XCB XKB .............................. yes
    XLib ................................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... yes
Qt Widgets:
  GTK+ ................................... yes
  Styles ................................. Fusion Windows
Qt PrintSupport:
  CUPS ................................... yes
Qt Sql:
  DB2 (IBM) .............................. no
  InterBase .............................. yes
  MySql .................................. yes
  OCI (Oracle) ........................... no
  ODBC ................................... yes
  PostgreSQL ............................. yes
  SQLite2 ................................ no
  SQLite ................................. yes
    Using system provided SQLite ......... yes
  TDS (Sybase) ........................... yes
Let's see what happens.
I heard the build time should be over several hours.

moon.linux
Posts: 1166
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by moon.linux » Fri May 25, 2018 3:58 am

@meveric Thanks for pointing my mistake.
I fell their is an issue with symbolic link of the libGLESv2.so library in the /usr/lib/arm-linux-gnueabihf/

Code: Select all

odroid@odroid:/usr/lib/arm-linux-gnueabihf$ find /usr/lib -name libGLESv2.so
/usr/lib/arm-linux-gnueabihf/libGLESv2.so
/usr/lib/arm-linux-gnueabihf/mali-egl/libGLESv2.so
/usr/lib/chromium-browser/libGLESv2.so
odroid@odroid:/usr/lib/arm-linux-gnueabihf$ ls -la /usr/lib/arm-linux-gnueabihf/libGLESv2.so
lrwxrwxrwx 1 root root 18 Mar 5 09:45 /usr/lib/arm-linux-gnueabihf/libGLESv2.so -> libGLESv2.so.2.0.0
lrwxrwxrwx 1 root root 18 Mar 5 09:45 /usr/lib/arm-linux-gnueabihf/libGLESv2.so -> libGLESv2.so.2.0.0

To resolve this link issue I deleted the symbolic link and create proper link.

Code: Select all

odroid@odroid:~$ cd /usr/lib/arm-linux-gnueabihf
odroid@odroid:/usr/lib/arm-linux-gnueabihf$  sudo rm libGLESv2.so
odroid@odroid:/usr/lib/arm-linux-gnueabihf$  sudo ln -s libGLESv2.so mali-egl/libGLESv2.so.2.0.0
Now the linking is correct to library

Code: Select all

odroid@odroid:~$  ls -la /usr/lib/gcc/arm-linux-gnueabihf/7/../../../arm-linux-gnueabihf/libGLESv2.so
lrwxrwxrwx 1 root root 27 May 24 18:04 /usr/lib/gcc/arm-linux-gnueabihf/7/../../../arm-linux-gnueabihf/libGLESv2.so -> mali-egl/libGLESv2.so.2.0.0
Now coming to the issue of the configure failed for, it still fails at my end, dont know why.
Attachments
config_test.txt
configure output.
(189.22 KiB) Downloaded 276 times
qtbase.patch.txt
qtbase qmake.conf
(2.24 KiB) Downloaded 264 times

User avatar
meveric
Posts: 10485
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2
Has thanked: 17 times
Been thanked: 131 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by meveric » Fri May 25, 2018 7:28 am

moon.linux wrote:@meveric Thanks for pointing my mistake.
I fell their is an issue with symbolic link of the libGLESv2.so library in the /usr/lib/arm-linux-gnueabihf/
that's what I keep saying :D
moon.linux wrote: To resolve this link issue I deleted the symbolic link and create proper link.

Code: Select all

odroid@odroid:~$ cd /usr/lib/arm-linux-gnueabihf
odroid@odroid:/usr/lib/arm-linux-gnueabihf$  sudo rm libGLESv2.so
odroid@odroid:/usr/lib/arm-linux-gnueabihf$  sudo ln -s libGLESv2.so mali-egl/libGLESv2.so.2.0.0
Well that's not exactly the correct way.
It's ln -s <from> <to> you made a NEW link called mali-egl/libGLESv2.so.2.0.0 which points to libGLESv2.so what you actually want is the other way around.
Also for libGLESv2.so pointing to a libGLESv2.so.2.0.0 in the same folder is not wrong but actually fine, you have to check where libGLESv2.so.2.0.0 is pointing at.
And keep following it until you find the end-point and that needs to link against libmali.so.. something like this:

Code: Select all

ls -l /usr/lib/arm-linux-gnueabihf/libGLESv2*
lrwxrwxrwx 1 root root 14 Mär 14  2017 /usr/lib/arm-linux-gnueabihf/libGLESv2.so -> libGLESv2.so.2
lrwxrwxrwx 1 root root 16 Mär 14  2017 /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2 -> libGLESv2.so.2.0
lrwxrwxrwx 1 root root 18 Mär 14  2017 /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0 -> libGLESv2.so.2.0.0
lrwxrwxrwx 1 root root 13 Mär 14  2017 /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 -> mali-egl/libmali.so
moon.linux wrote:Now coming to the issue of the configure failed for, it still fails at my end, dont know why.
You only fixed GLESv2, but it seems you haven't fixed EGL yet:

Code: Select all

Checking for EGL... 
Trying source 0 (type pkgConfig) of library egl ...
+ /usr/bin/pkg-config --exists --silence-errors egl
+ /usr/bin/pkg-config --modversion egl
> 18.0.0-rc5
+ /usr/bin/pkg-config --libs-only-L egl
+ /usr/bin/pkg-config --libs-only-l egl
> -lEGL
+ /usr/bin/pkg-config --cflags egl
> -I/usr/include/libdrm
+ cd /home/odroid/qt5/qtbase/config.tests/egl && /home/odroid/qt5/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker warn_off console single_arch" 'LIBS += -lEGL' 'QMAKE_CFLAGS += -I/usr/include/libdrm' 'QMAKE_CXXFLAGS += -I/usr/include/libdrm' /home/odroid/qt5/qtbase/config.tests/egl
+ cd /home/odroid/qt5/qtbase/config.tests/egl && MAKEFLAGS= /usr/bin/make
> g++ -c -pipe -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mtune=cortex-a15.cortex-a7 -mfloat-abi=hard -I/usr/include/libdrm -O2 -pipe -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mtune=cortex-a15.cortex-a7 -mfloat-abi=hard -O2 -w -fPIC  -I. -I/home/odroid/qt5/qtbase/mkspecs/linux-g++ -o main.o main.cpp
> g++ -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-O1 -fuse-ld=gold -o egl main.o   -lEGL 
> /usr/bin/arm-linux-gnueabihf-ld.gold: error: cannot open /usr/lib/gcc/arm-linux-gnueabihf/7/../../../arm-linux-gnueabihf/libEGL.so: No such file or directory
> main.o:main.cpp:function main: error: undefined reference to 'eglDestroyContext'
> collect2: error: ld returned 1 exit status
> Makefile:67: recipe for target 'egl' failed
> make: *** [egl] Error 1
 => source failed verification.
Trying source 1 (type makeSpec) of library egl ...
+ cd /home/odroid/qt5/qtbase/config.tests/egl && /home/odroid/qt5/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker warn_off console single_arch" 'LIBS += -lEGL' /home/odroid/qt5/qtbase/config.tests/egl
+ cd /home/odroid/qt5/qtbase/config.tests/egl && MAKEFLAGS= /usr/bin/make clean && MAKEFLAGS= /usr/bin/make
> rm -f main.o
> rm -f *~ core *.core
> g++ -c -pipe -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mtune=cortex-a15.cortex-a7 -mfloat-abi=hard -O2 -pipe -pipe -mcpu=cortex-a15 -mfpu=neon-vfpv4 -mtune=cortex-a15.cortex-a7 -mfloat-abi=hard -O2 -w -fPIC  -I. -I/home/odroid/qt5/qtbase/mkspecs/linux-g++ -o main.o main.cpp
> g++ -Wl,-rpath-link,/usr/lib/arm-linux-gnueabihf -Wl,-O1 -fuse-ld=gold -o egl main.o   -lEGL 
> /usr/bin/arm-linux-gnueabihf-ld.gold: error: cannot open /usr/lib/gcc/arm-linux-gnueabihf/7/../../../arm-linux-gnueabihf/libEGL.so: No such file or directory
> main.o:main.cpp:function main: error: undefined reference to 'eglDestroyContext'
> collect2: error: ld returned 1 exit status
> Makefile:67: recipe for target 'egl' failed
> make: *** [egl] Error 1
 => source failed verification.
test config.gui.libraries.egl FAILED
same as libGLESv2.so the endpoint of libEGL.so should also point to libmali.so :)
HardKernel images had this issue numerous times in the past.
You need to make sure that libGLESv2 libEGL and libGLESv1_CM point agianst libmali.so.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

moon.linux
Posts: 1166
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by moon.linux » Fri May 25, 2018 3:46 pm

Ok I found this qt5 wiki page related to odroid-xu3 https://wiki.qt.io/ODROID-XU3
and I updated the symbolic link as suggested by you and taking a note out of chromium-browser link symbolic.

Code: Select all

sudo ln -s /usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so /usr/lib/arm-linux-gnueabihf/libEGL.so
sudo ln -s /usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so
This changes seem to the trick for configure changes work at my end.
Attachments
config_test.txt
./configure test
(192.55 KiB) Downloaded 279 times

User avatar
meveric
Posts: 10485
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2
Has thanked: 17 times
Been thanked: 131 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by meveric » Fri May 25, 2018 3:49 pm

moon.linux wrote:Ok I found this qt5 wiki page related to odroid-xu3 https://wiki.qt.io/ODROID-XU3
and I updated the symbolic link as suggested by you and taking a note out of chromium-browser link symbolic.

Code: Select all

sudo ln -s /usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so /usr/lib/arm-linux-gnueabihf/libEGL.so
sudo ln -s /usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so
Seems I'm either being ignored or have trouble to express myself.
That is exactly what I said numerous times in this thread already :D
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Fri May 25, 2018 6:42 pm

I could build the Qt 5.9.5 source in Canonical server finally.

Here is a quick and dirty build guide.

Install build-depends and source code.
sudo apt build-dep qt5-default
apt source qtbase5-dev
cd qtbase-opensource-src-5.9.5+dfsg


Edit a file for correct detecting the ARM's Mali GPU.
Line 86 : src/platformsupport/eglconvenience/qxlibeglintegration.cpp
to : if (vendor && (strstr(vendor, "Vivante") || strstr(vendor, "ARM"))) {
from : if (vendor && strstr(vendor, "Vivante")) {

Another file should be edited to avoid a compile error. I wasted several hours to find this simple solution.
src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp
http://code.qt.io/cgit/qt/qtbase.git/co ... 9e6f24521e


Create two symlinks for proper OpenGL-ES detection. This fix will be included in the next update probably.
sudo rm /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0
sudo rm /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0
sudo ln -s /usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0
sudo ln -s /usr/lib/arm-linux-gnueabihf/mali-egl/libmali.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0


Build Qt5
sudo dpkg-buildpackage -b

I met this error when I ran it on a SSH session.
Project ERROR: QtDBus is enabled but session bus is not available. Please check the installation.
When I built it on the Mate desktop terminal instead of the remote ssh access, the build had no issue. It is still not understandable.

After 2~3 hours of boring build time, the "debian packaging" failed due to a missing PGP key.
But all the Qt5 libraries with examples were generated correctly and I could install them with sudo make install command.

Qt-OpenGL example works beautifully. :mrgreen:
Image

I hope I can learn how to make a ".deb" package for easier distribution soon.

User avatar
meveric
Posts: 10485
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2
Has thanked: 17 times
Been thanked: 131 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by meveric » Fri May 25, 2018 7:48 pm

check one folder above the build directory.
The building of .deb files does NOT fail due to missing PGP key, the only thing that will fail is the "signing" so the packages are build but not signed, but that's not really an issue they will work fine nonetheless.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Fri May 25, 2018 8:43 pm

I searched '*.deb' files. But I couldn't find it.
I will check it early next week again.

Update:
You are right. I could find 28 packages in this morning :)

Code: Select all

odroid@odroid:~$ ls *.deb -l
-rw-r--r-- 1 odroid odroid    68408 May 25 22:35 libqt5concurrent5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid  1812376 May 25 22:35 libqt5core5a_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   210808 May 25 22:36 libqt5dbus5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid  2073052 May 25 22:37 libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   591344 May 25 22:37 libqt5network5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid    75964 May 25 22:37 libqt5opengl5-dev_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   150168 May 25 22:37 libqt5opengl5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   202200 May 25 22:37 libqt5printsupport5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid    87528 May 25 22:37 libqt5sql5-ibase_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid    80484 May 25 22:37 libqt5sql5-mysql_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid    87620 May 25 22:38 libqt5sql5-odbc_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid    81404 May 25 22:38 libqt5sql5-psql_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid    77164 May 25 22:38 libqt5sql5-sqlite_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid    75996 May 25 22:38 libqt5sql5-tds_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   138992 May 25 22:38 libqt5sql5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   127236 May 25 22:39 libqt5test5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid  1963036 May 25 22:39 libqt5widgets5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   125972 May 25 22:39 libqt5xml5_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid    60672 May 25 22:39 qt5-default_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   141904 May 25 22:39 qt5-gtk-platformtheme_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   846316 May 25 22:39 qt5-qmake-bin_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   228640 May 25 22:39 qt5-qmake_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   649980 May 25 22:39 qtbase5-dev-tools_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid   948496 May 25 22:39 qtbase5-dev_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid 21315672 May 25 22:39 qtbase5-doc-html_5.9.5+dfsg-0ubuntu1_all.deb
-rw-r--r-- 1 odroid odroid 27741672 May 25 22:40 qtbase5-doc_5.9.5+dfsg-0ubuntu1_all.deb
-rw-r--r-- 1 odroid odroid  3863844 May 25 22:40 qtbase5-examples_5.9.5+dfsg-0ubuntu1_armhf.deb
-rw-r--r-- 1 odroid odroid  1069928 May 25 22:40 qtbase5-private-dev_5.9.5+dfsg-0ubuntu1_armhf.deb
I've uploaded the pre-compiled Qt5 packages into our server.
Try the following steps to install it.

Code: Select all

sudo apt update && sudo apt upgrade
sudo apt install libfbclient2 libodbc1 libpq5 libsybdb5 libgles2-mesa-dev libxext-dev libinput-dev libxkbcommon-dev
wget https://dn.odroid.com/5422/ODROID-XU3/Ubuntu/qt5.9.5_armhf_bionic.tar.gz
tar xvfz qt5.9.5_armhf_bionic.tar.gz
cd qt5.9.5_armhf_bionic/
sudo dpkg -i *.deb
You can run an OpenGL ES 3.0 example powered by Qt5 if the installation has no issue.

Code: Select all

DISPLAY=:0.0 /usr/lib/arm-linux-gnueabihf/qt5/examples/opengl/hellogles3/hellogles3
Image

If it works well, remove the downloaded packages to save disk space.

Code: Select all

cd ..
rm -rf qt5.9.5_armhf_bionic*

User avatar
meveric
Posts: 10485
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2
Has thanked: 17 times
Been thanked: 131 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by meveric » Sun May 27, 2018 9:10 pm

I think only a single packge is required... in fact it's just a single .so file that's why I made the fix package instead of uploading so many packages at once.
If you install libqt5gui5 on it's own it should have the same effect. The rest can come directly from Ubuntu.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

korn16ftl3
Posts: 27
Joined: Sat May 19, 2018 12:37 am
languages_spoken: english
ODROIDs: odroid XU4 and cloudshell
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by korn16ftl3 » Mon May 28, 2018 4:38 am

thanks for this guide i needed to install this to run teamviewer host and run my odroid desktop headless on 18.04 and this made it run rather than keep crashing at launch

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Wed May 30, 2018 10:25 am

@meveric,
Yes, installing "libqt5gui5" seems to be enough.

Code: Select all

sudo apt install libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb
For other users,
Don't forget to hold it to prevent updating with the wrong build in Canonical server.

Code: Select all

sudo apt-mark hold libqt5gui5

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Thu May 31, 2018 9:18 am

Ignore all the complicated installation guide.

Below steps should be enough now for Ubuntu 18.04 users since mdrjr uploaded the packages into the official ppa server.

Code: Select all

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
A new mali-x11 package was updated to fix the broken symlinks too.

ageevp
Posts: 20
Joined: Fri Oct 13, 2017 3:22 pm
languages_spoken: english
ODROIDs: odroid xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by ageevp » Thu May 31, 2018 5:33 pm

VLC. Try to open network stream

[9dc01c60] egl_x11 gl error: cannot select OpenGL API
MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: exynos_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: exynos
[9d52c660] main decoder error: buffer deadlock prevented
[9de00a70] ts demux error: libdvbpsi error (PSI decoder): TS discontinuity (received 5, expected 2) for PID 0

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Thu May 31, 2018 5:50 pm

@ageevp,

Can you run a Qt5 example?
Try this commands after the system upgrade.

Code: Select all

sudo apt-get install qtbase5-examples
/usr/lib/arm-linux-gnueabihf/qt5/examples/opengl/cube/cube
Anyway, the recent VLC does not work due to the transparent video rendering issue on the ARM platforms even you choose the video output option to OpenGL-ES2.

ageevp
Posts: 20
Joined: Fri Oct 13, 2017 3:22 pm
languages_spoken: english
ODROIDs: odroid xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by ageevp » Sun Jun 03, 2018 2:42 am

Yes. There are not any media players but Kodi.
I wonder why buggy VLC included into image?

User avatar
rooted
Posts: 6680
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 141 times
Been thanked: 33 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by rooted » Sun Jun 03, 2018 8:22 am

ageevp wrote:Yes. There are not any media players but Kodi.
I wonder why buggy VLC included into image?
VLC is also a music player.

harry4516
Posts: 50
Joined: Sun Jan 25, 2015 10:35 am
languages_spoken: english, german
ODROIDs: N2, C1, C2, U3, XU3, XU4Q, RPI all versions, BananaPI/PRO, HiKey(-junk). Best of all: N2 !
Location: Bavaria, Germany
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by harry4516 » Sun Jun 03, 2018 9:22 am

I can confirm that my QT5 applications are now working.
Thank you for the fix !

ageevp
Posts: 20
Joined: Fri Oct 13, 2017 3:22 pm
languages_spoken: english
ODROIDs: odroid xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by ageevp » Mon Jun 04, 2018 2:12 pm

Please explain to dummy why kodi video player works well but other no.

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Mon Jun 04, 2018 4:01 pm

Try "ffplay"(a part of ffmpeg) with H.264 video files. It also works well with GPU/VPU drivers in Ubuntu 18.04.

I think VLC decoded data is not compatible with Qt video rendering input format.
I hope other Qt experts can give us deeper failure analysis.

Vitaly
Posts: 3
Joined: Sat Jul 28, 2018 11:36 pm
languages_spoken: russian
ODROIDs: ODROID XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by Vitaly » Sat Jul 28, 2018 11:43 pm

Hello. Tell me how to build Qt with QML, qtquickcontrols, qtquickcontrols2 etc.
Thank you.

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Mon Jul 30, 2018 8:53 am

@Vitaly,
Did you try this?
https://github.com/qt/qtquickcontrols2

Vitaly
Posts: 3
Joined: Sat Jul 28, 2018 11:36 pm
languages_spoken: russian
ODROIDs: ODROID XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by Vitaly » Tue Jul 31, 2018 12:59 am

@odroid, I do not know Linux. Please, tell me how to add qtquickcontrols2 and solve the problem. I'm build Qt5 from https://magazine.odroid.com/article/mal ... ntu-18-04/ and I have problem with QML and app file. I'am create empty qt widget app:
Image
App file untitled1 not running.
Later, I'm build Qt5 from http://minus-build.tistory.com/14 and http://likerisc.ru/odroid/sborka-qt-5-8 ... d-xu3-xu4/. Qt5.11.1 make and install very good, but created applications not running and have an unknown file icon.
When:

Code: Select all

sudo chmod +x untitled2
./untitled2
untitled2 running.
Can you help me solve the problem?

Vitaly
Posts: 3
Joined: Sat Jul 28, 2018 11:36 pm
languages_spoken: russian
ODROIDs: ODROID XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by Vitaly » Tue Jul 31, 2018 6:56 am

Problem solved. Add in .pro file:

Code: Select all

QMAKE_LFLAGS += -no-pie

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Tue Jul 31, 2018 7:02 am

Glad to hear you found a solution.
Thank you for sharing a nice tip. :)

vk4tux
Posts: 210
Joined: Wed Sep 24, 2014 6:59 pm
languages_spoken: english
ODROIDs: none
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by vk4tux » Sun Aug 05, 2018 2:26 pm

odroid wrote:@meveric,
Yes, installing "libqt5gui5" seems to be enough.

Code: Select all

sudo apt install libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb
For other users,
Don't forget to hold it to prevent updating with the wrong build in Canonical server.

Code: Select all

sudo apt-mark hold libqt5gui5
I tried on a new image here today, is source missing as did not install ? I cannot run dolphin, konsole etc with error as per thread title issue ;

E: Unable to locate package libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb
E: Couldn't find any package by glob 'libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb'
E: Couldn't find any package by regex 'libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb'

Thankyou for the help

vk4tux
Posts: 210
Joined: Wed Sep 24, 2014 6:59 pm
languages_spoken: english
ODROIDs: none
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by vk4tux » Sun Aug 05, 2018 4:55 pm

vk4tux wrote:
odroid wrote:@meveric,
Yes, installing "libqt5gui5" seems to be enough.

Code: Select all

sudo apt install libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb
For other users,
Don't forget to hold it to prevent updating with the wrong build in Canonical server.

Code: Select all

sudo apt-mark hold libqt5gui5
I tried on a new image here today, is source missing as did not install ? I cannot run dolphin, konsole etc with error as per thread title issue ;

E: Unable to locate package libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb
E: Couldn't find any package by glob 'libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb'
E: Couldn't find any package by regex 'libqt5gui5_5.9.5+dfsg-0ubuntu1_armhf.deb'

Thankyou for the help




It surprises me that todays image still has this issue, rather than the image having been fixed and re-uploaded in working condition. I will look for something else.

vk4tux
Posts: 210
Joined: Wed Sep 24, 2014 6:59 pm
languages_spoken: english
ODROIDs: none
Has thanked: 0
Been thanked: 0
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by vk4tux » Sun Aug 05, 2018 10:18 pm

Also on 18.04 Mate image i am getting ;

*** buffer overflow detected ***

when running C++ compiled programs that ran fine on XU4 14.04

I: 2018-08-05 13:16:33.988 Default interface is : enx001e0630214f
I: 2018-08-05 13:16:33.988 IP to show: enx001e0630214f:192.168.0.4
*** buffer overflow detected ***: ./MMDVMHost terminated
Aborted
odroid@odroid:~/Downloads/MMDVMHost$


I will try Meverics debian image for hopefully better results.

User avatar
odroid
Site Admin
Posts: 32334
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 139 times
Been thanked: 318 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by odroid » Wed Jun 12, 2019 4:25 pm

Side note.
Today's canonical update breaks the Qt EGL function.

Download our package and install it manually as a temporary workaround.

Code: Select all

wget http://deb.odroid.in/5422-s/pool/main/q/qtbase-opensource-src/libqt5gui5_5.9.5%2bdfsg-0ubuntu2_armhf.deb
sudo dpkg -i libqt5gui5_5.9.5+dfsg-0ubuntu2_armhf.deb
sudo apt-mark hold libqt5gui5

User avatar
AreaScout
Posts: 1066
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Has thanked: 15 times
Been thanked: 47 times
Contact:

Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

Unread post by AreaScout » Sat Jun 15, 2019 12:52 am

    Hi all

    I was building 5.9 for GBM Mali driver, no X11 server running and it works fine, I had to change some source files to get it working !

    @odroid

    If you want the changes to provide a package that runs with X11 and without, let me know ;)



    RG

    User avatar
    odroid
    Site Admin
    Posts: 32334
    Joined: Fri Feb 22, 2013 11:14 pm
    languages_spoken: English
    ODROIDs: ODROID
    Has thanked: 139 times
    Been thanked: 318 times
    Contact:

    Re: [SOLVED] Problem while building the Qt5 on Ubuntu 18.04

    Unread post by odroid » Mon Jun 17, 2019 11:47 am

    Thank you for the video. Very snappy and fast rendering.
    Qt 5.9 for GBM/Mali must be useful for many embedded-like projects.


    Edit: I've just found your new thread. :D
    viewtopic.php?f=98&t=35391

    Post Reply

    Return to “Ubuntu”

    Who is online

    Users browsing this forum: No registered users and 0 guests