Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 10-11-2015, 13:50   #1
Registered User

Join Date: Apr 2013
Location: Anacortes
Boat: Red Admiral, 1979 Holman Pye 36
Posts: 71
Compiling OpenCPN with Raspberry Pi2

Hi all,

I've been searching through existing threads and the OpenCPN website for answers to these issues to no avail.

1. Does OpenGL hardware support work on the Pi2? Whenever I click that option the charts go blank even after rebuilding the chart database.

There was some talk of such things being possible such as:

"The OpenGL to OpenGLes translation is already built in to OpenCPN (GLshim), if I understand correctly it is also used by OpenCPN on Android."

So I tried the instructions I found at Building and installing on Cubieboard 2 with HW acceleration | Official OpenCPN Homepage for the Cubieboard to see if I could get GLshim installed.

But that seems to have led me down a dark path and the OpenCPN build no longer succeeds which seems strange because it has succeeded before using the instructions on the Pi Chart website. Why they would be different is a mystery to me unless just building and installing GLshim somehow causes the OpenCPN build to behave differently.

The error is apparently in "Linking CXX executable opencpn" and is as follows:

/usr/bin/ld: cannot find -lEGL

Any help or clues would be greatly appreciated. I've been at this for hours, days even.

I've installed and run RPIGears and get between 387 and 403 FPS.

Thanks
Steve
korrigan is offline   Reply With Quote
Old 10-11-2015, 14:47   #2
Registered User

Join Date: Apr 2013
Location: Anacortes
Boat: Red Admiral, 1979 Holman Pye 36
Posts: 71
Re: Compiling OpenCPN with Raspberry Pi2

Quote:
Originally Posted by korrigan View Post
Hi all,

I've been searching through existing threads and the OpenCPN website for answers to these issues to no avail.

1. Does OpenGL hardware support work on the Pi2? Whenever I click that option the charts go blank even after rebuilding the chart database.

There was some talk of such things being possible such as:

"The OpenGL to OpenGLes translation is already built in to OpenCPN (GLshim), if I understand correctly it is also used by OpenCPN on Android."

So I tried the instructions I found at Building and installing on Cubieboard 2 with HW acceleration | Official OpenCPN Homepage for the Cubieboard to see if I could get GLshim installed.

But that seems to have led me down a dark path and the OpenCPN build no longer succeeds which seems strange because it has succeeded before using the instructions on the Pi Chart website. Why they would be different is a mystery to me unless just building and installing GLshim somehow causes the OpenCPN build to behave differently.

The error is apparently in "Linking CXX executable opencpn" and is as follows:

/usr/bin/ld: cannot find -lEGL

Any help or clues would be greatly appreciated. I've been at this for hours, days even.

I've installed and run RPIGears and get between 387 and 403 FPS.

Thanks
Steve

It appears I've answered my own question about the link problem by digging through another thread that I hadn't seen.

In case someone else comes upon this I did the following:

sudo apt-get install libegl1-mesa-div
korrigan is offline   Reply With Quote
Old 10-11-2015, 18:07   #3
Registered User
 
NahanniV's Avatar

Join Date: Mar 2011
Location: Nova Scotia Canada
Boat: Wharram Tiki 46
Posts: 1,321
Re: Compiling OpenCPN with Raspberry Pi2

See this thread:

http://www.cruisersforum.com/forums/...-149806-3.html

Post #33 and after.

It is a work in progress.

Cheers,
JM.
NahanniV is offline   Reply With Quote
Old 10-11-2015, 19:54   #4
Registered User

Join Date: Apr 2013
Location: Anacortes
Boat: Red Admiral, 1979 Holman Pye 36
Posts: 71
Re: Compiling OpenCPN with Raspberry Pi2

Thanks. I've gathered that people are working on it and a lot of people are interested.

I wish I could help but this is way beyond my abilities with software.

For now the Pi 2 is working well without OpenGL after getting past the link error. I did have a scary failure after clicking that box but was able to recover by editing the config file. Whew!.... I couldn't stand going through another build

I'm going to take the Pi to the boat this weekend and plug in instruments and the AIS unit. I'm expecting those should just work, fingers crossed.

Ultimately I'd like to try the radar plugin but just getting this far is enough for now.

My next project is getting LinuxRMS Gateway working. I'll start with just this laptop before trying to tackle it on the Pi.

Eventually I'll get my autopilot going as well. That's essentially finished except for not having an actual hydraulic unit to wrap up the final details with. Until my existing pilot fails completely I'll just have to keep using it, but I'm pretty sure my code is better and it fits on an Arduino and doesn't cost thousands of dollars and go obsolete in five years.

Anyway, thanks to everyone working on OpenCPN it's really one of the best things ever.
korrigan is offline   Reply With Quote
Old 10-11-2015, 21:26   #5
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,418
Re: Compiling OpenCPN with Raspberry Pi2

There are two possible drivers for the rpi2. The free driver apparently works (dave tried it) but it's slow. The closed driver I got working with a special hack to glshim, and it's quite usable but about half as fast as it should be on the hardware.

So ultimately the best option would be to improve the free driver, but I don't have the time for this. Otherwise, I need to finalize a few things with the FBO, and possibly do the android style zooming and panning to improve performance then the rpi will probably run as fast as most android tablets.
seandepagnier is offline   Reply With Quote
Old 11-11-2015, 08:09   #6
Registered User

Join Date: Apr 2013
Location: Anacortes
Boat: Red Admiral, 1979 Holman Pye 36
Posts: 71
Re: Compiling OpenCPN with Raspberry Pi2

Hi Boat_Alexandra,

Can you tell me if this is necessary to make the radar plugin work?

Based on what I've read here the results from gears seem to indicate OpenGL or GLES is working. Is that enough to get started integrating the radar plugin?

A buddy of mine is getting an HD radome based on my advice to use OpenCPN and I'm on the hook to get it working. I'd like to try it on the Pi in addition to his laptop.

Have you posted the 'hack' on any of the other threads? Some are so long it's tough to know. As it is the Pi2 is running acceptably fast so even if the hack made it just a bit faster or enabled the use of the radar plugin that would be great.

Thanks for your efforts.
korrigan is offline   Reply With Quote
Old 11-11-2015, 22:24   #7
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,418
Re: Compiling OpenCPN with Raspberry Pi2

The hack makes it 2-4x faster.

The radar could in theory work without opengl, in fact I implemented that but it couldn't merge because of many other changes. It would be very slow though, but not so bad maybe at a low update rate, and if the radar isn't overlayed over the chart.
seandepagnier is offline   Reply With Quote
Reply

Tags
enc, opencpn


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 13:58
OpenCPN on Raspberry Pi2 yaphone OpenCPN 363 12-08-2016 12:56
Has anyone gotten any Plugins working on Raspberry Pi2 Uncle Augie OpenCPN 5 27-06-2015 06:19
Raspberry Pi2 ratsea OpenCPN 5 26-02-2015 08:41
Back to failure with raspberry pi and compiling jimseng OpenCPN 14 10-08-2012 07:28

Advertise Here


All times are GMT -7. The time now is 17:50.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.