Octave on XU4

Moderators: mdrjr, odroid

Octave on XU4

Unread postby ardexess » Tue Jul 10, 2018 9:30 pm

Hello,

Recently I tried to run Octave software on ODROID XU4 device. I have installed it using sudo apt install command without eny errors. When I try to use some graphical commands (like uicontrol) I get following errors:
Code: Select all
MESA-LOADER: failed to retrieve device information
lbGL error: unable to load driver: exynos_dri.so
lbGL error: driver pointer missing
lbGL error: failed to load driver: exynos

I have done some research where I found out that problem is probably related to MESA and MALI drivers.

Moreover Octave doesn't run in GUI mode, which in my opinion is caused by the same reason as aforementioned problem. Octave run non-graphical commands just well in console mode.

ODROID XU4 is running UBUNTU 16.04.3-4.14 (20171212) release from wiki.odroid.com.
When I was trying to get over that I found out that command:
Code: Select all
glmark2-es2

gives following output:
Code: Select all
glmark2-es2: command not found

I really appreciate any help on solving this problem.
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

Unread postby odroid » Tue Jul 10, 2018 9:50 pm

"sudo apt install glmark2-es2" to test the Mali GPU driver functionality.

BTW, try the latest Ubuntu 18.04 image if you don't mind.
If Octave uses Qt5 library, you have to use the Ubuntu 18.04 image which has a built-in customized Qt5 package to enable the Mali GPU.
https://wiki.odroid.com/odroid-xu4/os_i ... 4/20180501

Also check this thread too.
viewtopic.php?f=95&t=31478
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby meveric » Tue Jul 10, 2018 10:03 pm

ardexess wrote:ODROID XU4 is running UBUNTU 16.04.3-4.14 (20171212) release from wiki.odroid.com.

The version of Octave used in Ubuntu 16.04 still uses QT4 which requires OpenGL, ODROIDs do not support OpenGL only OpenGL ES.
The version of Octave used In Ubuntu 18.04 uses QT5 and you might have a chance that it's running on OpenGL ES cause of this.
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
meveric
 
Posts: 8895
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

Re: Octave on XU4

Unread postby odroid » Wed Jul 11, 2018 1:45 pm

Yes, it works on Ubuntu 18.04. :)

Image
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby ardexess » Wed Jul 11, 2018 9:07 pm

Thanks a lot for Your help. As You have suggested Octave (4.2.2) started in GUI mode under UBUNTU 18.04(20180501). However uicontrol still does not work.
As far as i know these graphic functions work only with qt and FLTK graphics toolkits. The only available graphic toolkit I got in Octave is GNUPLOT:
Code: Select all
>> available_graphics_toolkits
ans =
{
  [1,1] = gnuplot
}

So now I have to figure out how to get these toolkits installed in Octave.
Cheers
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

Unread postby odroid » Wed Jul 11, 2018 9:14 pm

I think Octave seems to utilize a Java engine here and there.
Try to use the Java 8 from Oracle instead of the default OpenJDK.
Code: Select all
sudo add-apt-repository ppa:webupd8team/java                             
sudo apt-get update                                                     
sudo apt-get install oracle-java8-installer
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby ardexess » Fri Jul 13, 2018 6:36 pm

It doesn't work for me :/
Did it work for You?
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

Unread postby odroid » Fri Jul 13, 2018 6:47 pm

No.
This is my first time to run Octave.
I don't know how to enable/use the uicontrol.

According to their wiki page, it seems to runs on "Qt" graphics toolkit.
https://wiki.octave.org/Uicontrols
But I have no idea what "graphics toolkit" means.

I have the same issue.
Code: Select all
octave:1> available_graphics_toolkits
ans =
{
  [1,1] = gnuplot
}


There is no "qt" option. :(
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby odroid » Fri Jul 13, 2018 6:58 pm

It seems to be worth to try to build the Octave from source code on XU4.
http://wiki.octave.org/Octave_for_Debia ... rom_source
But it may take a couple of days probably.
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby ardexess » Fri Jul 13, 2018 7:09 pm

I have found following note on the octave release notes:
Octave now uses OpenGL graphics with Qt widgets by default. If OpenGL
libraries are not available when Octave is built, gnuplot is used.

According to the sentence system must have OpenGL to implement qt toolkit in the octave. So far as I know Odroid dedicated versions of UBUNTU use OpenGL ES. Maybe thats the problem. And maybe its possible somehow to utilize this OpenGL ES during build of Octave? That's just my loose observation, I'm not an expert in Unix systems. I will try with ppa:octave/stable.
Anyway thanks for collaboration.
Cheers
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

Unread postby odroid » Fri Jul 13, 2018 7:19 pm

I think there is a solution to enable Qt5 toolkit while building the source code. I will try it early next week if I have a spare time.
https://savannah.gnu.org/bugs/?53529#comment5
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby ardexess » Fri Jul 13, 2018 11:21 pm

I have build 4.4.0 from source with preinstalled all Qt 5 packages. Still not working (only gnuplot available). No more ideas for today
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

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

Did you create a couple of symlinks for Qt5Help in the proper directory /usr/lib/arm-linux-gnueabihf/?
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby ardexess » Sat Jul 14, 2018 8:28 pm

No. How to do it?
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

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

I don't know well.
According to the link I gave you in previous post,
Two symlinks were required in my case.
Code: Select all
sudo ln -s  /usr/lib/x86_64-linux-gnu/libQt5Help.so.5.5.1 /usr/lib/x86_64-linux-gnu/libQt5Help.so
sudo ln -s /usr/lib/libqt5scintilla2.so.12.0.1 /usr/lib/libqscintilla2-qt5.so


Since the guide was written for x86 64bit platform, you need to change it for ARM HF platform.
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby odroid » Mon Jul 16, 2018 2:30 pm

After installing a missing package, I could see an enabled Qt5 option in "configure" output.
sudo apt install qttools5-dev-tools
I am building Octave 4.4.0 now.

Update: Build was successful. It looks better now. :D
Code: Select all
>> available_graphics_toolkits
ans =
{
  [1,1] = fltk
  [1,2] = gnuplot
}


But I have no idea how to test fltk toolkit.
We might need to investigate why qt doesn't exist in the list too.
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby ardexess » Mon Jul 16, 2018 7:55 pm

Woow, nice. These graphic should work under fltk toolkit too. May You type:
Code: Select all
graphics_toolkit("fltk")

to chose fltk, and then if
Code: Select all
uicontrol

command works?

Edit:
I got an error, while having qttools5-dev-tools installed:
Code: Select all
sudo ln -s  /usr/lib/x86_64-linux-gnu/libQt5Help.so.5.5.1 /usr/lib/x86_64-linux-gnu/libQt5Help.so
ln: failed to create symbolic link '/usr/lib/x86_64-linux-gnu/libQt5Help.so': No such file or directory
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

Unread postby odroid » Mon Jul 16, 2018 9:46 pm

Don't make the symlinks. I didn't touch the libQt5Help stuff.
Below steps were enough to build it again.
Code: Select all
sudo apt update
sudo apt upgrade
sudo apt install qttools5-dev-tools
.configure
make -j3
sudo make install
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby ardexess » Tue Jul 17, 2018 9:54 pm

Still can't get to what You have achieved. I have started from reinstalling UBUNTU 18.08, updates from software updater, installing packages for octave compilation (including qttools5-dev-tools), downloading source code (version 4.4.0). After all these I got octave without GUI mode :lol: :lol: :lol: :
octave: GUI features missing or disabled in this build

Still no FLTK toolkit available.

I think there is something I'm missing. Moreover configuration gives me following output:
Code: Select all
...
Warning: OpenGL libs (GL and GLU) not found. OpenGL graphics will be disabled.
Warning: Qt libraries not found; disabling Qt GUI
Warning: FLTK config script not found. FLTK toolkit will be disabled...
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

Unread postby odroid » Wed Jul 18, 2018 8:09 am

Can you run "es2gears" or "glmark2-es2" now?
Did you install most of the necessary dependencies with this command?
Code: Select all
sudo apt build-dep octave
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby ardexess » Wed Jul 18, 2018 7:48 pm

Yes these commands works. After installation of build-dep octave dependiences, configuraiton results looks much better (No FLTK error). However making and installing octave on previously installed octave (without theses dependiences) didn't work.
I'm trying now again from clean system.

EDIT:
Still not working :shock:
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

Unread postby odroid » Thu Jul 19, 2018 8:44 am

Let's check one by one.

Update the system after clean installing OS image.
Code: Select all
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo reboot


After rebooting, check OpenGL-ES functionality with a Qt example.
Code: Select all
sudo apt-get install qtbase5-examples
/usr/lib/arm-linux-gnueabihf/qt5/examples/opengl/hellogl2/hellogl2


Build Octave 4.4
Code: Select all
sudo apt-get build-dep octave
sudo apt install qttools5-dev-tools
mkdir octave
cd octave/
wget https://ftp.gnu.org/gnu/octave/octave-4.4.0.tar.gz
tar xfz octave-4.4.0.tar.gz
cd octave-4.4.0/
./configure
make
sudo make install


Try that and let me know the result.
You have to check the Octave version in UI menu Help -> About Octave. It must be 4.4.0.
User avatar
odroid
Site Admin
 
Posts: 28292
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Octave on XU4

Unread postby ardexess » Thu Jul 19, 2018 10:13 pm

Hello there, I have done everything as You said. Qt example works, however octave didn't even build with GUI:
Code: Select all
octave:1> available_graphics_toolkits
ans =
{
  [1,1] = gnuplot
}

octave:2> exit
odroid@odroid:~/octave/octave-4.4.0$ octave --force-gui
octave: GUI features missing or disabled in this build
ardexess
 
Posts: 10
Joined: Thu Apr 26, 2018 7:20 pm
languages_spoken: english

Re: Octave on XU4

Unread postby odroid » Fri Jul 20, 2018 8:50 am

Something could be wrong in my record.
I will freshly install OS image and try it again early next week since I have some urgent projects now.
User avatar
odroid
Site Admin
 
Posts: 28292
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