Error compiling OpenHantek on 18.04 (worked on 16.04)

Moderators: odroid, mdrjr

Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby linuxfan » Fri Jul 13, 2018 2:51 am

I use the software OpenHantek, and it compiled and worked great on my ODROID-C2 on Ubuntu Mate 16.04. However, I now set up my ODROID-C2 for Ubuntu Mate 18.04, and the software won't compile anymore. Judging by the error message, I'm not sure if the error maybe lies in 18.04 and ARM64 files:

Code: Select all
odroid@odroid:~/sources/openhantek-master/build$ cmake ../
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/lib/aarch64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfig.cmake:27 (message):
  The imported target "Qt5::Gui" references the file

     "/usr/lib/aarch64-linux-gnu/libEGL.so"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib/aarch64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib/aarch64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:32 (_qt5_Gui_check_file_exists)
  /usr/lib/aarch64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:54 (_qt5gui_find_extra_libs)
  /usr/lib/aarch64-linux-gnu/cmake/Qt5Gui/Qt5GuiConfig.cmake:184 (include)
  /usr/lib/aarch64-linux-gnu/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:101 (find_package)
  openhantek/CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/odroid/sources/openhantek-master/build/CMakeFiles/CMakeOutput.log".


Previously, I installed the required packages mentioned here: https://github.com/OpenHantek/openhante ... d.md#linux
It looks it is still the same procedure as it was in 16.04.
This is the output log of the installation which finished without errors:

Code: Select all
root@odroid:/home/odroid# apt install g++ cmake qttools5-dev qttools5-dev-tools libfftw3-dev binutils-dev libusb-1.0-0-dev libqt5opengl5-dev mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++ is already the newest version (4:7.3.0-3ubuntu2).
The following additional packages will be installed:
  cmake-data libbrotli1 libdrm-dev libdrm-tegra0 libegl1-mesa-dev libfftw3-bin
  libfftw3-long3 libglu1-mesa-dev libglvnd-core-dev libglvnd-dev libjsoncpp1
  libopengl0 libpthread-stubs0-dev libqt5concurrent5 libqt5designer5
  libqt5designercomponents5 libqt5help5 libqt5opengl5 libqt5positioning5
  libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5quickwidgets5
  libqt5sensors5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5webchannel5
  libqt5webkit5 libqt5xml5 librhash0 libusb-1.0-doc libuv1 libwayland-bin
  libwayland-dev libwoff1 libx11-dev libx11-doc libx11-xcb-dev libxau-dev
  libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev
  libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev
  libxcb-xfixes0-dev libxcb1-dev libxdamage-dev libxdmcp-dev libxext-dev
  libxfixes-dev libxshmfence-dev libxxf86vm-dev qt5-assistant qt5-qmake
  qt5-qmake-bin qtbase5-dev qtbase5-dev-tools x11proto-core-dev
  x11proto-damage-dev x11proto-dev x11proto-dri2-dev x11proto-fixes-dev
  x11proto-gl-dev x11proto-xext-dev x11proto-xf86vidmode-dev
  xorg-sgml-doctools xtrans-dev
Suggested packages:
  cmake-doc ninja-build libfftw3-doc qt5-qmltooling-plugins libxcb-doc
  libxext-doc qt5-doc default-libmysqlclient-dev firebird-dev libpq-dev
  libsqlite3-dev unixodbc-dev
The following NEW packages will be installed:
  binutils-dev cmake cmake-data libbrotli1 libdrm-dev libdrm-tegra0
  libegl1-mesa-dev libfftw3-bin libfftw3-dev libfftw3-long3 libgl1-mesa-dev
  libgles2-mesa-dev libglu1-mesa-dev libglvnd-core-dev libglvnd-dev
  libjsoncpp1 libopengl0 libpthread-stubs0-dev libqt5concurrent5
  libqt5designer5 libqt5designercomponents5 libqt5help5 libqt5opengl5
  libqt5opengl5-dev libqt5positioning5 libqt5printsupport5 libqt5qml5
  libqt5quick5 libqt5quickwidgets5 libqt5sensors5 libqt5sql5 libqt5sql5-sqlite
  libqt5test5 libqt5webchannel5 libqt5webkit5 libqt5xml5 librhash0
  libusb-1.0-0-dev libusb-1.0-doc libuv1 libwayland-bin libwayland-dev
  libwoff1 libx11-dev libx11-doc libx11-xcb-dev libxau-dev libxcb-dri2-0-dev
  libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev
  libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev
  libxcb1-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev
  libxshmfence-dev libxxf86vm-dev mesa-common-dev qt5-assistant qt5-qmake
  qt5-qmake-bin qtbase5-dev qtbase5-dev-tools qttools5-dev qttools5-dev-tools
  x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev
  x11proto-fixes-dev x11proto-gl-dev x11proto-xext-dev
  x11proto-xf86vidmode-dev xorg-sgml-doctools xtrans-dev
0 upgraded, 81 newly installed, 0 to remove and 0 not upgraded.
Need to get 34.5 MB of archives.
After this operation, 171 MB of additional disk space will be used.
Do you want to continue? [Y/n]


If you say the compiling error has nothing to do with Ubuntu Mate 18.04 for ODROID-C2's files, I'll go bother the OpenHantek developers. Apologies if it turns out to be this way. I had to start somewhere and the error mentions files in the system are maybe corrupt.
linuxfan
 
Posts: 16
Joined: Fri Sep 01, 2017 5:56 pm
languages_spoken: english german
ODROIDs: ODROID-C2

Re: Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby odroid » Fri Jul 13, 2018 10:02 am

From Ubuntu 18.04 image, we included slightly modified Qt5 library to utilize Mali GPU hardware acceleration by default.

Try a Qt5 OpenGL-ES2 example with following commands. You will see a 3D Cube which can be rolling with your mouse.
Code: Select all
sudo apt update
sudo apt dist-upgrade
sudo apt install qtbase5-examples
/usr/lib/arm-linux-gnueabihf/qt5/examples/opengl/cube/cube


If it works, you have to find "libEGL.so" file in "/usr/lib/aarch64-linux-gnu" directory.
User avatar
odroid
Site Admin
 
Posts: 29075
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby linuxfan » Fri Jul 13, 2018 7:35 pm

There is no "/usr/lib/arm-linux-gnueabihf" in my file tree. I replaced it with /usr/lib/aarch64-linux-gnu and started the cube. It does not work. The cube window only displays part of my desktop background and nothing else. This is the console output:
Code: Select all
/usr/lib/aarch64-linux-gnu/qt5/examples/opengl/cube/cube
QEGLPlatformContext: Failed to create context: 3005
QEGLPlatformContext: Failed to create context: 3005
QOpenGLWidget: Failed to create context
QEGLPlatformContext: Failed to create context: 3005
QOpenGLWidget: Failed to create context
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
QEGLPlatformContext: Failed to create context: 3005
QOpenGLWidget: Failed to create context
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
QEGLPlatformContext: Failed to create context: 3005
QOpenGLWidget: Failed to create context
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed
composeAndFlush: makeCurrent() failed


The file /usr/lib/aarch64-linux-gnu/libEGL.so is displayed in red in the standard Mate console. I'm not sure what that means, it's been a while since I read about links and how they work. I assume it's a dead link.
linuxfan
 
Posts: 16
Joined: Fri Sep 01, 2017 5:56 pm
languages_spoken: english german
ODROIDs: ODROID-C2

Re: Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby odroid » Sat Jul 14, 2018 10:07 am

What happens if you run "es2gears"?
User avatar
odroid
Site Admin
 
Posts: 29075
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby linuxfan » Sat Jul 14, 2018 9:18 pm

This is the output of es2gears:
Code: Select all
odroid@odroid:~$ es2gears
EGL_VERSION = 1.4 Linux-r6p1-01rel0
EGLUT: failed to create context
linuxfan
 
Posts: 16
Joined: Fri Sep 01, 2017 5:56 pm
languages_spoken: english german
ODROIDs: ODROID-C2

Re: Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby odroid » Sat Jul 14, 2018 9:36 pm

Try to reinstall the GPU driver and run es2gear again.
Code: Select all
sudo apt install mali-x11 --reinstall
User avatar
odroid
Site Admin
 
Posts: 29075
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby linuxfan » Sat Jul 14, 2018 9:48 pm

I reinstalled mali-x11, and now es2gears works. I can see rotating screws:
Code: Select all
odroid@odroid:~$ es2gears
EGL_VERSION = 1.4 Linux-r6p1-01rel0
vertex shader info:
fragment shader info:
info:
299 frames in 5.0 seconds = 59.800 FPS
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 510 requests (510 known processed) with 0 events remaining.

The final error message probably comes from closing the es2gears window by using the "x" button.
linuxfan
 
Posts: 16
Joined: Fri Sep 01, 2017 5:56 pm
languages_spoken: english german
ODROIDs: ODROID-C2

Re: Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby odroid » Sat Jul 14, 2018 9:55 pm

Right. the last error message could be ignored.

Try Qt5 OpenGL-ES2 sample : /usr/lib/aarch64-linux-gnu/qt5/examples/opengl/cube/cube
User avatar
odroid
Site Admin
 
Posts: 29075
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby linuxfan » Sat Jul 14, 2018 9:59 pm

The cube works, too, and OpenHantek did finally compile. But it won't start now. Maybe I need to reboot first.

Code: Select all
odroid@odroid:~/sources/OpenHantek-openhantek-9935f0a/build/openhantek$ ./OpenHantek
Cannot find EGLConfig, returning null config
QEGLPlatformContext: Failed to create context: 3005
Cannot find EGLConfig, returning null config
Unable to find an X11 visual which matches EGL config 0
Segmentation fault


Edit: Reboot did not help. Not sure if this specific error is an OpenHantek or Ubuntu problem though.
Edit 2: I found the solution in our forum: viewtopic.php?f=153&t=30331&p=217127&hilit=openhantek#p217127
Code: Select all
OpenHantek --useGLES


Thanks for the help. By the way, why was my mali-x11 installatin corrupted in the first place? I do not remember installing anything else except Firefox and the OpenHantek requirements mention above via APT.
linuxfan
 
Posts: 16
Joined: Fri Sep 01, 2017 5:56 pm
languages_spoken: english german
ODROIDs: ODROID-C2

Re: Error compiling OpenHantek on 18.04 (worked on 16.04)

Unread postby odroid » Sat Jul 14, 2018 10:19 pm

Glad to know you found a solution.

One recent Canonical's EGL update package seemed to break the Mali GPU drivers/libraries.
So we added a quick fix guide to the Tips section in release note.
https://wiki.odroid.com/odroid-c2/os_im ... own_issues
User avatar
odroid
Site Admin
 
Posts: 29075
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 0 guests