Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-03-2015, 09:28   #16
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Bram...
Do you have libegl1-mesa-dev installed?

Pavel
__________________

__________________
nohal is offline   Reply With Quote
Old 02-03-2015, 13:58   #17
Registered User

Join Date: Feb 2015
Location: Swedish westcoast
Boat: Beneteau First 40.7, Skippi 650
Posts: 10
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Hi all. When I run the Make GL according to JM“s suggestion above, I get a screen full of different compiler/linker errors, indicating typical unresolved references from headerfiles. As if I am missing libraries or object files when linking.

Following Pavels lead above, I checked "lib-egl1-mesa-dev". According to the file list for the Debian package, it should look like:
/usr/include/EGL/egl.h
/usr/include/EGL/eglext.h
/usr/include/EGL/eglmesaext.h
/usr/include/EGL/eglplatform.h
/usr/include/KHR/khrplatform.h
/usr/lib/arm-linux-gnueabihf/libEGL.so
/usr/lib/arm-linux-gnueabihf/libwayland-egl.so
/usr/lib/arm-linux-gnueabihf/pkgconfig/egl.pc
/usr/lib/arm-linux-gnueabihf/pkgconfig/wayland-egl.pc
/usr/share/bug/libegl1-mesa-dev/control
/usr/share/bug/libegl1-mesa-dev/script
/usr/share/doc/libegl1-mesa-dev/changelog.Debian.gz
/usr/share/doc/libegl1-mesa-dev/copyright

I only have library and files with "GL", not "EGL" in the name. I have tried to install the EGL package, but obviously without success. Comments, anyone?

Best regards,
Gunnar
__________________

__________________
Gunnar1 is offline   Reply With Quote
Old 02-03-2015, 14:07   #18
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Gunnar...
So after you run
Code:
sudo apt-get install lib-egl1-mesa-dev
the files the package contains are *not* installed? Any error messages?

Pavel
__________________
nohal is offline   Reply With Quote
Old 02-03-2015, 14:26   #19
Registered User

Join Date: Feb 2015
Location: Swedish westcoast
Boat: Beneteau First 40.7, Skippi 650
Posts: 10
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Hi Pavel. that“s right. I get the normal message "Reading package lists...Done", then "tree...0%" and then immeditaley back. Without any additional messages.

Best regards,
Gunnar
__________________
Gunnar1 is offline   Reply With Quote
Old 02-03-2015, 19:48   #20
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Gunnar...
And /usr/lib/arm-linux-gnueabihf/libEGL.so really does not exist?
It is very hard if not impossible to troubleshoot this stuff from the bits without context you post. But if the packaging system is broken, I would probably throw the system away if I didn't understand why.
Anyway, what you should see is the wheezy/armhf version of
Code:
nohal@knut:~$ sudo apt-get install libegl1-mesa-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libegl1-mesa-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.6 kB of archives.
After this operation, 169 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ jessie/main libegl1-mesa-dev amd64 10.3.2-1 [50.6 kB]
Fetched 50.6 kB in 15s (3,189 B/s)                  
Selecting previously unselected package libegl1-mesa-dev:amd64.
(Reading database ... 332275 files and directories currently installed.)
Preparing to unpack .../libegl1-mesa-dev_10.3.2-1_amd64.deb ...
Unpacking libegl1-mesa-dev:amd64 (10.3.2-1) ...
Setting up libegl1-mesa-dev:amd64 (10.3.2-1) ...

nohal@knut:~$ ls -la /usr/lib/*/libEGL.so
lrwxrwxrwx 1 root root 15 Oct 27 05:44 /usr/lib/x86_64-linux-gnu/libEGL.so -> libEGL.so.1.0.0
Pavel
__________________
nohal is offline   Reply With Quote
Old 03-03-2015, 10:46   #21
Registered User

Join Date: Feb 2015
Location: Swedish westcoast
Boat: Beneteau First 40.7, Skippi 650
Posts: 10
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Hi Pavel. Yes, I had the same thought. So I started from scratch:


1. Formatted the SD card

2. Downloaded a recent Raspbian image and copied it to the SD card

3. Boot Raspberry and configure the Raspberry with the new OS image

4. Did the “sudo apt-get update” and “sudo apt-get upgrade” of the OS


I now have a fresh Raspi up and running.

5. sudo apt-get install libegl1-mesa-dev
This time OK. I have the expected folder structure created and populated.

6. git clone https://github.com/seandepagnier/glshim.git

7. Fetch the OpenCPN build and install it from Pi Chart.

8. Install cmake:sudo apt-get install cmake


9. cd glshim
cmake . -DBCMHOST=1
OK.

10. Run make GL

Not OK. After a few OK-messages, I get the following:

pi@raspberrypi2 ~/glshim $ make GL
[ 5%] Building C object src/CMakeFiles/GL.dir/glx/lookup.c.o
In file included from /opt/vc/include/interface/vcos/vcos.h:116:0,
from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
from /opt/vc/include/bcm_host.h:50,
from /home/pi/glshim/src/glx/glx.h:2,
from /home/pi/glshim/src/glx/lookup.c:1:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ā€˜vcos_semaphore_wait_timeoutā€™:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:297:4: warning: implicit declaration of function ā€˜clock_gettimeā€™ [-Wimplicit-function-declaration]
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:297:22: error: ā€˜CLOCK_REALTIMEā€™ undeclared (first use in this function)
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:297:22: note: each undeclared identifier is reported only once for each function it appears in
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:307:7: warning: implicit declaration of function ā€˜sem_timedwaitā€™ [-Wimplicit-function-declaration]
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ā€˜vcos_sleepā€™:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:385:4: warning: implicit declaration of function ā€˜nanosleepā€™ [-Wimplicit-function-declaration]
In file included from /opt/vc/include/interface/vcos/vcos.h:116:0,
from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
from /opt/vc/include/bcm_host.h:50,
from /home/pi/glshim/src/glx/glx.h:2,
from /home/pi/glshim/src/glx/lookup.c:1:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function ā€˜vcos_strdupā€™:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:732:4: warning: implicit declaration of function ā€˜strdupā€™ [-Wimplicit-function-declaration]
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:732:4: warning: return makes pointer from integer without a cast [enabled by default]
/home/pi/glshim/src/glx/lookup.c: At top level:
/opt/vc/include/interface/vcos/vcos_timer.h:112:6: warning: inline function ā€˜vcos_timer_deleteā€™ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:109:6: warning: inline function ā€˜vcos_timer_resetā€™ declared but
.
.
.
.
src/CMakeFiles/GL.dir/build.make:422: recipe for target 'src/CMakeFiles/GL.dir/glx/lookup.c.o' failed
make[3]: *** [src/CMakeFiles/GL.dir/glx/lookup.c.o] Error 1
CMakeFiles/Makefile2:82: recipe for target 'src/CMakeFiles/GL.dir/all' failed
make[2]: *** [src/CMakeFiles/GL.dir/all] Error 2
CMakeFiles/Makefile2:94: recipe for target 'src/CMakeFiles/GL.dir/rule' failed
make[1]: *** [src/CMakeFiles/GL.dir/rule] Error 2
Makefile:106: recipe for target 'GL' failed
make: *** [GL] Error 2
pi@raspberrypi2

(there seems to be strange characters in the printout. That is however from me copying from my Raspi, via the text editor and my NAS to the windows laptop I use for this dialogue).

If the root cause isn“t obvious for someone of you out there, I guess I leave it for now. I am confident that the OCPN-team will implement the graphics hardware support for the Raspberry. As I see it the really big advantage of executing the application under
Linux in the first place, is to be able to run it on a computer like the Raspi (or anyone of the other similar). They are small, cheap, low power consumption. Perfect for more or less dedicated tasks like the OpenCPN application with it“s plug-ins. To utilize the
graphics CPU for chart handling goes without saying. If this isn“t implemented, you can just as well take any 10 year old PC and run OCPN on. Higher power consumption, more clumsy and not so easy to have in a rugged, fixed installation but they have enough performance and they almost allways already have some kind of Windows onboard.

I will of course continue to follow this forum with the highest interest!

Best regards,
Gunnar
__________________
Gunnar1 is offline   Reply With Quote
Old 03-03-2015, 13:38   #22
Registered User

Join Date: Feb 2015
Location: Swedish westcoast
Boat: Beneteau First 40.7, Skippi 650
Posts: 10
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Hi Pavel. Yes, I had the same thought. So I started from scratch:


1. Formatted the SD card
2. Downloaded a recent Raspbian image and copied it to the SD card
3. Boot Raspberry and configure the Raspberry with the new OS image
4. Did the “sudo apt-get update” and “sudo apt-get upgrade” of the OS

I now have a fresh Raspi up and running.

5. sudo apt-get install libegl1-mesa-dev
This time OK. I have the expected folder structure created and populated.

6. Fetch the OpenCPN build and install it according to instructions at Pi Chart.

7. sudo apt-get install cmake

8. git clone https://github.com/seandepagnier/glshim.git

9. cd glshim
cmake . -DBCMHOST=1
OK.

10. make GL
Not OK. After a few OK-messages, I get the following:

pi@raspberrypi2 ~/glshim $ make GL
[ 5%] Building C object src/CMakeFiles/GL.dir/glx/lookup.c.o
In file included from /opt/vc/include/interface/vcos/vcos.h:116:0,
from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:33,
from /opt/vc/include/bcm_host.h:50,
from /home/pi/glshim/src/glx/glx.h:2,
from /home/pi/glshim/src/glx/lookup.c:1:
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h: In function vcos_semaphore_wait_timeout:
.
.
.
src/CMakeFiles/GL.dir/build.make:422: recipe for target 'src/CMakeFiles/GL.dir/glx/lookup.c.o' failed
make[3]: *** [src/CMakeFiles/GL.dir/glx/lookup.c.o] Error 1
CMakeFiles/Makefile2:82: recipe for target 'src/CMakeFiles/GL.dir/all' failed
make[2]: *** [src/CMakeFiles/GL.dir/all] Error 2
CMakeFiles/Makefile2:94: recipe for target 'src/CMakeFiles/GL.dir/rule' failed
make[1]: *** [src/CMakeFiles/GL.dir/rule] Error 2
Makefile:106: recipe for target 'GL' failed
make: *** [GL] Error 2
pi@raspberrypi2


If the root cause isn“t obvious for someone of you out there, I guess I leave it for now. I am confident that the OCPN-team will
implement the graphics hardware support for the Raspberry. As I see it the really big advantage of executing the application under
Linux in the first place, is to be able to run it on a computer like the Raspi (or anyone of the other similar). They are small, cheap,
low power consumption. Perfect for rugged, fixed installations with more or less dedicated tasks like the OpenCPN application with it“s plug-ins.
To utilize the graphics GPU for chart handling goes without saying. If this isn“t implemented, you can just as well take any 10 year old PC and run OCPN on.
More clumsy, higher power consumption, not so easy to have a rugged, fixed installation but they have enough performance and they almost
allways already have some kind of Windows onboard.

I will of course continue to follow this forum with the highest interest!

Best regards,
Gunnar
__________________
Gunnar1 is offline   Reply With Quote
Old 03-03-2015, 14:22   #23
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Gunnar...
Now it looks like you don't even have linux-libc-dev installed (CLOCK_REALTIME is defined in /usr/include/linux/time.h)

Pavel
__________________
nohal is offline   Reply With Quote
Old 03-03-2015, 14:38   #24
Registered User

Join Date: Feb 2015
Location: Swedish westcoast
Boat: Beneteau First 40.7, Skippi 650
Posts: 10
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

But I do have it.
Gunnar
__________________
Gunnar1 is offline   Reply With Quote
Old 04-03-2015, 12:45   #25
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Quote:
Originally Posted by nohal View Post
Gunnar...
Now it looks like you don't even have linux-libc-dev installed (CLOCK_REALTIME is defined in /usr/include/linux/time.h)

Pavel
Pavel.
On my RB Pi 2 I get the same error as Gunnar. (And - Yes I've the /usr/include/linux/time.h in place as well.)
I've followed Sean's instructions for builds. My build echoes are in the attached file. (Skip the .pdf extension.)
If you've the mind and time for help it's really appreciated.

Thanks Håkan
Attached Files
File Type: pdf glshim_build.txt.pdf (5.8 KB, 58 views)
__________________
Hakan is offline   Reply With Quote
Old 05-03-2015, 02:51   #26
Registered User

Join Date: Feb 2015
Location: Swedish westcoast
Boat: Beneteau First 40.7, Skippi 650
Posts: 10
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Hej Håkan. I get the impression that there is a faulty file or folder reference in the make setup.

Best regards,
Gunnar
__________________
Gunnar1 is offline   Reply With Quote
Old 08-03-2015, 15:06   #27
Registered User

Join Date: Oct 2014
Location: Netherlands
Boat: Halmatic 30
Posts: 403
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Quote:
Originally Posted by nohal View Post
Bram...
Do you have libegl1-mesa-dev installed?

Pavel
OK Pavel,

thanks for this advice. I installed this and after installing there were no error messages.

Followed the instructions an replaced the 2 files. Everything seemed to work.

Then I tried GLXgears, worked. Only a bit slower then before.

Then looked at the effects with OpenCPN. Worked. Seems to be a little faster.

In between was a Lubuntu safety update.

Starting the system again. GLXgears is no longer running. OpenCPN does not want to start. Both give error messages:

LibEGL warning: GLX/DRI2 is not supported
LibEGL warning: DRI2 failed to authenticate
LibGL: warning , gles is NULL

I can try to do it again. But there must be a reason for this behavior.

Regards,

Bram
__________________
verkerkbr is offline   Reply With Quote
Old 09-03-2015, 02:36   #28
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

On Raspberry Pi2 and OCPN Version 4.1.0 fetched and Build 2015-02-20;
When running OpenCPN from command prompt I get the following reply:
Code:
pi@raspberrypi ~ $ /usr/local/bin/opencpn

(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-can-change-accels after class was initialised
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popup-delay after class was initialised 
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was initialised 
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-button-images after class was initialised
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-scrolled-window-placement after class was initialised
(opencpn:3798): Gdk-CRITICAL **: IA__gdk_colormap_new: assertion 'GDK_IS_VISUAL (visual)' failed
(opencpn:3798): Gtk-CRITICAL **: IA__gtk_widget_set_colormap: assertion 'GDK_IS_COLORMAP (colormap)' failed
(opencpn:3798): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
libGL: built on Mar  5 2015 08:36:07
libEGL warning: DRI2: failed to authenticate
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-label-select-on-focus after class was initialised
libGL: warning, gles is NULL
libGL: warning, gles is NULL
libGL: warning, gles is NULL
Segmentation fault
pi@raspberrypi ~ $
Any interpretation and advises from you experienced Linuxer is appreciated, please.
Thanks Håkan
__________________
Hakan is offline   Reply With Quote
Old 09-03-2015, 03:47   #29
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Quote:
Originally Posted by verkerkbr View Post
OK Pavel,

thanks for this advice. I installed this and after installing there were no error messages.

Followed the instructions an replaced the 2 files. Everything seemed to work.

Then I tried GLXgears, worked. Only a bit slower then before.

Then looked at the effects with OpenCPN. Worked. Seems to be a little faster.

In between was a Lubuntu safety update.
What exactly did the safety update do?



Quote:
Originally Posted by Hakan View Post
On Raspberry Pi2 and OCPN Version 4.1.0 fetched and Build 2015-02-20;
When running OpenCPN from command prompt I get the following reply:
Code:
pi@raspberrypi ~ $ /usr/local/bin/opencpn

(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-can-change-accels after class was initialised
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popup-delay after class was initialised 
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was initialised 
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-button-images after class was initialised
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-scrolled-window-placement after class was initialised
(opencpn:3798): Gdk-CRITICAL **: IA__gdk_colormap_new: assertion 'GDK_IS_VISUAL (visual)' failed
(opencpn:3798): Gtk-CRITICAL **: IA__gtk_widget_set_colormap: assertion 'GDK_IS_COLORMAP (colormap)' failed
(opencpn:3798): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
libGL: built on Mar  5 2015 08:36:07
libEGL warning: DRI2: failed to authenticate
(opencpn:3798): GLib-GObject-WARNING **: Attempt to add property GtkSettings::gtk-label-select-on-focus after class was initialised
libGL: warning, gles is NULL
libGL: warning, gles is NULL
libGL: warning, gles is NULL
Segmentation fault
pi@raspberrypi ~ $
Any interpretation and advises from you experienced Linuxer is appreciated, please.
Thanks Håkan

Can you run glxgears? Can you run opencpn as root?

I think glshim is built into opencpn now, but it is only activated for android builds? Maybe we should unlock this so it can be used for linux builds as well if opengles is detected.
__________________
boat_alexandra is offline   Reply With Quote
Old 09-03-2015, 21:26   #30
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Re: Has anyone managed to get hardware supported OpenGL on Rasperry Pi2 to work?

Sean...

I recommend that you try to use the glshim that is in the 4.1 master tree now. I hacked it a bit to solve some troubles with passing doubles as function arguments. Compiler error, or I dunno what else. Also hacked the CMake build rules, just to get it going. I think a more generalized approach to GLES and glshim should be implemented in the OCPN CMake rules. But I have only the one platform to work with now.

So take a look if it appeals, and send some patches.

You can use the glu tesselator as well. Seems like decent code, and I sure need it for android. So might as well try it for all arm.

I don't have any RPI hardware running, so cannot help here specifically with this thread.

Also, note that I disabled GL display list processing. Its broken in glshim, but should be an easy fix. But time......

Good Luck
Dave
__________________

__________________
bdbcat is offline   Reply With Quote
Reply

Tags
hardware

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN on Raspberry PI2 starnakel OpenCPN 284 16-03-2017 14:58
How to calculate the load capacity supported a catamaran and a sailboat? lasiemartins Construction, Maintenance & Refit 23 22-01-2017 12:44
Windows Phone - OpenCPN file type not supported zstine OpenCPN 4 01-04-2014 09:36
Anyone managed to do PSK31 with the new P4dragon modem from SCS? svlamorocha Marine Electronics 0 23-11-2013 10:44
has anyone managed to connect GPS2IP on windows? Mattsav OpenCPN 4 25-03-2013 15:37



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 01:21.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.