Cruisers Forum
 


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 01-08-2014, 22:57   #301
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by sparticle View Post
Hif that is the case.

Does anyone have a Rpi running OpenCPN in OpenGL mode. I cannot get this to work, (Do I need to build a different version to the one the git gives me?) I just get a blank OpenCPN screen if I enable OpenGL, I do get menus so can turn OpenGL off and then see my charts again. It seems that there may be a way to get this working.

Can someone share a recipe/instructions for the less technically inclined that will enable OpenGL mode please.

Specs:
Spart
I got mine working but I was using vnc... but just yesterday I finally got some lcd displays so I have one which I can plug into the raspberry pi. The instructions I put in my last post, scroll up.
seandepagnier is offline   Reply With Quote
Old 02-08-2014, 03:35   #302
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by nohal View Post
Spart...
You really must use the latest code from the master branch, it's performance is incomparably higher on low spec hardware and it is where any further optimizations do and will happen.

Pavel
I thought that is what I had done, I only just compiled it.

Can you post the commands I would need to compile the 'right' version please.

WOuld the new version simply install over the old one or would I need to remove the old one and start again. If so, would a sudo apt-get purge OpenCPN work?

Many thanks for replying, I do feel that the Rpi OpenCPN is 'close' to being
usable and the perfect Marine Computer. BY swapping the USB and SD Card for a RaspBMC install it is also the perfect entertainment platform for the boat as well.

Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 03:42   #303
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by boat_alexandra View Post
I got mine working but I was using vnc... but just yesterday I finally got some lcd displays so I have one which I can plug into the raspberry pi. The instructions I put in my last post, scroll up.
Looking at those instructions it looks like you have installed Cubian not Raspian to start with. Is this right? Also there seems to be some special instructions related to the pi but I can't find them. Sorry a bit of a beginner when it comes to compiling software etc.

Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 04:23   #304
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

This is what happens when I follow the instructions:
pi@raspberrypi ~ $ sudo apt-get install mesa-utils build-essential git cmake libx11-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
cmake is already the newest version.
git is already the newest version.
git set to manually installed.
libx11-dev is already the newest version.
libx11-dev set to manually installed.
The following extra packages will be installed:
libglew1.7
Suggested packages:
glew-utils
The following NEW packages will be installed:
libglew1.7 mesa-utils
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 182 kB of archives.
After this operation, 673 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 Index of /raspbian wheezy/main libglew1.7 armhf 1.7.0-3 [154 kB]
Get:2 Index of /raspbian wheezy/main mesa-utils armhf 8.0.1-2 [28.5 kB]
Fetched 182 kB in 1s (119 kB/s)
Selecting previously unselected package libglew1.7:armhf.
(Reading database ... 76048 files and directories currently installed.)
Unpacking libglew1.7:armhf (from .../libglew1.7_1.7.0-3_armhf.deb) ...
Selecting previously unselected package mesa-utils.
Unpacking mesa-utils (from .../mesa-utils_8.0.1-2_armhf.deb) ...
Processing triggers for man-db ...
Setting up libglew1.7:armhf (1.7.0-3) ...
Setting up mesa-utils (8.0.1-2) ...
pi@raspberrypi ~ $ git clone https://github.com/seandepagnier/glshim.git
Cloning into 'glshim'...
remote: Counting objects: 3465, done.
remote: Compressing objects: 100% (1445/1445), done.
remote: Total 3465 (delta 1957), reused 3465 (delta 1957)
Receiving objects: 100% (3465/3465), 3.04 MiB | 211 KiB/s, done.
Resolving deltas: 100% (1957/1957), done.
pi@raspberrypi ~ $ cd glshim
pi@raspberrypi ~/glshim $ cmake . -DBCMHOST=1
-- The C compiler identification is GNU 4.6.3
-- The CXX compiler identification is GNU 4.6.3
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - 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-- Generating done
-- Build files have been written to: /home/pi/glshim
pi@raspberrypi ~/glshim $ make GL
Scanning dependencies of target GL
[ 5%] Building C object src/CMakeFiles/GL.dir/gl/wrap/gles.c.o
[ 11%] Building C object src/CMakeFiles/GL.dir/gl/wrap/gles2.c.o
[ 16%] Building C object src/CMakeFiles/GL.dir/gl/wrap/gl.c.o
[ 22%] Building C object src/CMakeFiles/GL.dir/gl/wrap/glstub.c.o
[ 27%] Building C object src/CMakeFiles/GL.dir/gl/line.c.o
[ 33%] Building C object src/CMakeFiles/GL.dir/gl/eval.c.o
[ 38%] Building C object src/CMakeFiles/GL.dir/gl/texture.c.o
[ 44%] Building C object src/CMakeFiles/GL.dir/gl/array.c.o
[ 50%] Building C object src/CMakeFiles/GL.dir/gl/light.c.o
[ 55%] Building C object src/CMakeFiles/GL.dir/gl/pixel.c.o
[ 61%] Building C object src/CMakeFiles/GL.dir/gl/texgen.c.o
[ 66%] Building C object src/CMakeFiles/GL.dir/gl/stack.c.o
[ 72%] Building C object src/CMakeFiles/GL.dir/gl/gl.c.o
[ 77%] Building C object src/CMakeFiles/GL.dir/gl/raster.c.o
[ 83%] Building C object src/CMakeFiles/GL.dir/gl/list.c.o
[ 88%] Building C object src/CMakeFiles/GL.dir/gl/math/eval.c.o
[ 94%] 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:46,
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:300:4: warning: implicit declaration of function ‘clock_gettime’ [-Wimplicit-function-declaration]
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:300:22: error: ‘CLOCK_REALTIME’ undeclared (first use in this function)
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:300:22: note: each undeclared identifier is reported only once for each function it appears in
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:310: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:388: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:46,
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:735:4: warning: implicit declaration of function ‘strdup’ [-Wimplicit-function-declaration]
/opt/vc/include/interface/vcos/pthreads/vcos_platform.h:735: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 never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_mem.h:93:15: warning: inline function ‘vcos_get_free_mem’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined [enabled by default]
/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 never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:102:6: warning: inline function ‘vcos_timer_cancel’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:95:6: warning: inline function ‘vcos_timer_set’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_timer.h:80:15: warning: inline function ‘vcos_timer_create’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_mem.h:93:15: warning: inline function ‘vcos_get_free_mem’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:269:6: warning: inline function ‘vcos_thread_resume’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:262:5: warning: inline function ‘vcos_thread_running’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:251:15: warning: inline function ‘vcos_change_preemption’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:234:6: warning: inline function ‘vcos_thread_relinquish’ declared but never defined [enabled by default]
/opt/vc/include/interface/vcos/vcos_thread.h:186:15: warning: inline function ‘vcos_thread_get_affinity’ declared but never defined [enabled by default]
-- Configuring donemake[3]: *** [src/CMakeFiles/GL.dir/glx/lookup.c.o] Error 1
make[2]: *** [src/CMakeFiles/GL.dir/all] Error 2
make[1]: *** [src/CMakeFiles/GL.dir/rule] Error 2
make: *** [GL] Error 2
pi@raspberrypi ~/glshim $

I am assuming this is not good news, so have stopped at this point. Any help appreciated.

Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 04:48   #305
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

It doesn't matter what distribution. Cubian is debian on cubie boards, rasbian is on raspberry pi. I'm pretty sure I am using raspbian. Just follow the instructions and make sure to read the README for glshim because it is slightly different, and post any problems or questions we can probably answer here.
seandepagnier is offline   Reply With Quote
Old 02-08-2014, 04:59   #306
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by boat_alexandra View Post
It doesn't matter what distribution. Cubian is debian on cubie boards, rasbian is on raspberry pi. I'm pretty sure I am using raspbian. Just follow the instructions and make sure to read the README for glshim because it is slightly different, and post any problems or questions we can probably answer here.
See above for issues that I have had following the instructions.

One other question I am following the instructions as the normal pi user the last command make install seems to need sudo make install to make it work. Is this correct?

Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 07:46   #307
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

Maybe you could just comment out the line with CLOCK_REALTIME I've never seen that error before.
seandepagnier is offline   Reply With Quote
Old 02-08-2014, 08:45   #308
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by boat_alexandra View Post
Maybe you could just comment out the line with CLOCK_REALTIME I've never seen that error before.
OK, commenting out the 2 lines around the if statement as below:

VCOS_STATUS_T vcos_semaphore_wait_timeout(VCOS_SEMAPHORE_T *sem, VCOS_UNSIGNED timeout) {
struct timespec ts;
int ret;
/** if (clock_gettime(CLOCK_REALTIME, &ts) == -1)
return VCOS_EINVAL;
*/

ts.tv_sec += timeout/1000;
ts.tv_nsec += (timeout%1000)*1000*1000;
if (ts.tv_nsec > 1000000000) {
ts.tv_sec++;
ts.tv_nsec -= 1000000000;
}

while (1) {
ret = sem_timedwait( sem, &ts );
if (ret == 0) {
return VCOS_SUCCESS;
} else {
if (errno == EINTR) {
continue;
} else if (errno == ETIMEDOUT) {
return VCOS_EAGAIN;
} else {
vcos_assert(0);
return VCOS_EINVAL;
}
}
}
}


sudo make GL resulted in a lot of warnings but no errors and completed.

Linking C shared library ../lib/libGL.so.1
[100%] Built target GL

I then followed the rest of the instructions and all seemed to build fine. I am using sudo make install rather than make install...does this matter?

However when I run OpenCPN I just get a grey window area where the chart should be when I switch to opengl mode. The texture compression cache option is greyed out and the use accelerated panning is greyed out. I rebuilt the chart database and restarted but still have the grey window area where the charts should be.

I do see a menu bar and can access the settings menu. But no OpenGL accelerated graphics.

Happy to do any other testing as I am really focused on getting this working.

EDIT: Just recompiling now from scratch from the top to check I didn't make any bloopers. I will post results in about an hour or so.

Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 09:22   #309
Registered User

Join Date: Aug 2014
Posts: 7
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by boat_alexandra View Post
It doesn't matter what distribution. Cubian is debian on cubie boards, rasbian is on raspberry pi. I'm pretty sure I am using raspbian. Just follow the instructions and make sure to read the README for glshim because it is slightly different, and post any problems or questions we can probably answer here.
Hello boat_alexandra, and others readers,
Thank you for your work and supporting all the newbies
I'm using Cubietruck hardware. I restart the whole process this morning from a fresh install to sum-up what I've done. So here is the full and accurate recipe to have OpenCPN with hardware acceleration enabled on a CubieTruck :

- download the cubian desktop image Cubian-desktop-r1-a20-ct.img
- write it to an SD card with my Win32 computer, and boot the Cubietruck on it.
- I updated the system with the following :
$sudo apt-get update
$sudo apt-get install cubian-update
$sudo cubian-update –v
$sudo reboot

- then, I follow the instructions described in the OpenCPN page :
sudo apt-get install mesa-utils build-essential git cmake libx11-dev
At this stage, I tried glxgears : 45 fps. So, no hardware acceleration for OpenGL. I tried sunxi_disp_test, I saw the triangle figure, and the renderer is "Mali-400 MP". So, in this case, there is hardware acceleration.
I understand, that I need now the glShim to make OpenGL working with OpenGL ES. So, I continue with the OpenCPN instructions :

- download your version of glShim :
$ git clone https://github.com/seandepagnier/glshim.git
$ cd glshim
$ cmake .
$ make GL
Build is successful.

But now, I don't understand the 2 following instructions :
$ sudo cp glshim/lib/libGL.so.1 /usr/local/lib/
$ sudo cp -r glshim/include/GLES/ /usr/local/include/

On my filesystem (fresh install), there is no libGL.so.1 in /usr/local/lib/. So I typed the following to know where is located the library used by glxgears :
$ ldd /usr/bin/glxgears
libGLEW.so.1.7 => /usr/lib/arm-linux-gnueabihf/libGLEW.so.1.7 (0xb6f60000)
libGLU.so.1 => /usr/lib/arm-linux-gnueabihf/libGLU.so.1 (0xb6f17000)
libGL.so.1 => /usr/lib/arm-linux-gnueabihf/libGL.so.1 (0xb6ecc000)
So, instead of :
$ sudo cp glshim/lib/libGL.so.1 /usr/local/lib/
I think it should be :
$ sudo cp glshim/lib/libGL.so.1 /usr/lib/arm-linux-gnueabihf/
and then :
$ sudo cp -r glshim/include/GLES/ /usr/local/include/
I think this last instruction about includes is for further compilations (this destination directory is empty on my fresh install).

I then tried to run glxgears, to check if OpenGL can now run with HW acceleration. The result :
cubie@Cubian:~$ glxgears
libGL: built on Aug 2 2014 14:32:50
302 frames in 5.0 seconds = 60.325 FPS
297 frames in 5.0 seconds = 59.226 FPS
297 frames in 5.0 seconds = 59.224 FPS
^C
cubie@Cubian:~$
So, 60 is a bit better than 45, but far from 100 and more... I asked glxinfo to check :
OpenGL vendor string: ARM
OpenGL renderer string: Mali-400 MP
OpenGL version string: 1.4 glshim wrapper
Nice, it seems to work. Let's continue with the OpenCPN instructions :

$ sudo apt-get install libgtk2.0-dev gettext git-core cmake gpsd gpsd-clients libgps-dev build-essential wx-common libwxgtk2.8-dev libglu1-mesa-dev libgtk2.0-dev wx2.8-headers libbz2-dev libtinyxml-dev libportaudio2 portaudio19-dev

At this stage, glxgears still 60 fps, and glxinfo still on Mali-400 MP. So, it looks good. Let's continue :
$ git clone https://github.com/ssvb/glues.git
$ cd glues
$ cmake .
$ make
Then, the same issue with this cp instruction :
$ sudo cp libGLU.so.1 /usr/local/lib
There is no libGLU.so.1 file in /usr/local/lib. According to my previous ldd /usr/bin/glxgears, it should be :
$ sudo cp libGLU.so.1 /usr/lib/arm-linux-gnueabihf/
That's what I've done.

Then, I tried glxgears again : 60 fps, and glxinfo is still ok with MALI400. Great, let's continue, with the OpenCPN compile and install :
$ git clone git://github.com/OpenCPN/OpenCPN.git
$ cd OpenCPN/
$ mkdir build
$ cd build
$ cmake ../
The correct libs are found during the CMake process :
-- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libGL.so
-- Found OpenGL...
-- Lib: /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
-- Include: /usr/include
-- Found OpenGLESv1

it smell good... Go on :
$ make
$ sudo make install
$ opencpn

Enabled opengl in the settings. Siwtch off opencpn, and edit the file located in your home directory : .opencpn/opencpn.conf to add
DebugOpenGL=1
just the line after
[Settings]
save the file and quit. Then restart opencpn, and check the log file opencpn.log, you should find this :
16:00:30 UTC: OpenGL-> Renderer String: Mali-400 MP
16:00:30 UTC: OpenGL-> Texture rectangle format: de1
16:00:30 UTC: OpenGL-> Vertexbuffer Objects unavailable
16:00:30 UTC: OpenGL-> Framebuffer Objects unavailable
16:00:30 UTC: OpenGL-> Using Stencil buffer clipping
16:00:30 UTC: OpenGL-> Using Scissor Clipping
16:00:30 UTC: OpenGL-> Using oes etc1 compression
16:00:30 UTC: OpenGL-> Compressed tile size: 128kb (6:1)

So it looks that it works. I need now to try with charts, but what I see for now is not as fluent as a desktop computer. Of course, current consumption and price have to be taken into acocunt to make a full comparison !
I'm also waiting for my SSD drive to put everything on it and check if it increases the performances.

...and thank you to boat_alexandra for your good job.
BlackNav is offline   Reply With Quote
Old 02-08-2014, 09:23   #310
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

It sounds like opencpn is not using the right library. I don't know why but many people fail at this, so don't feel bad.

Did you make symlinks for glshim or set LD_LIBRARY_PATH correctly? Can you run glxgears with acceleration. It should get very fast of more than 300 per second. You should be able to run glxinfo as well and even bloboats. If these do not work, you cannot expect opencpn. What says opencpn.log?
seandepagnier is offline   Reply With Quote
Old 02-08-2014, 09:38   #311
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by boat_alexandra View Post
It sounds like opencpn is not using the right library. I don't know why but many people fail at this, so don't feel bad.

Did you make symlinks for glshim or set LD_LIBRARY_PATH correctly? Can you run glxgears with acceleration. It should get very fast of more than 300 per second. You should be able to run glxinfo as well and even bloboats. If these do not work, you cannot expect opencpn. What says opencpn.log?
Still compiling! I used the instructions you pointed at, except for using sudo make install at the end of the opencpn section.

There are no instructions for making symlinks or setting paths in the information!

Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 09:45   #312
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

You might be able to speed up builds by cross compiling or using distcc... I did this, but don't forget to add -march=armv6 to cflags
seandepagnier is offline   Reply With Quote
Old 02-08-2014, 10:28   #313
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by boat_alexandra View Post
You might be able to speed up builds by cross compiling or using distcc... I did this, but don't forget to add -march=armv6 to cflags
I think i'll wait for the pi to compile....enough things to try and work out, and looking at various cross compiling articles it might be a step too far for me

OK this is what happens, here is the output from the cmake, it seems to find opengl and opengl es!

pi@raspberrypi ~/opencpn/OpenCPN/build $ cmake ../
-- *** Build Architecture is armhf
-- *** Staging to build opencpn 3.3.1931 ***
-- Found OpenGL...
-- Lib: /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
-- Include: /usr/include
-- Found OpenGLESv1
-- Found wxWidgets...
-- -L/usr/lib/arm-linux-gnueabihf;-pthread;;;-L/usr/lib/arm-linux-gnueabihf;;;-lwx_baseu-2.8;-lwx_gtk2u_core-2.8;-lwx_baseu_net-2.8;-lwx_baseu_xml-2.8;-lwx_gtk2u_html-2.8;-lwx_gtk2u_adv-2.8;-lwx_gtk2u_aui-2.8;-lwx_gtk2u_gl-2.8
--
-- *** Staging to build opencpn ***
-- Build type: Release
-- *** Will install to /usr/local ***
-- Found GTK2
-- Found Portaudio: /usr/lib/arm-linux-gnueabihf/libportaudio.so
-- Portaudio Found
-- Building with tinyxml includes
-- S57 ENC support: enabled
-- Garmin Host Mode support: enabled
--
-- *** Staging to build PlugIns ***
-- *** Staging to build grib_pi ***
--
-- *** Staging to build dashboard_pi ***
-- Writing spec file...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/opencpn/OpenCPN/build



No difference in opencpn when I run it and select OpenGL.

When I run glxgears I get:

error: Couldn't get an RGB, Double Buffered visual

So it looks like there is no OpenGL working in Rasbian.

I have followed the instructions to the letter twice now and rebooted in between. What am I missing? Everything compiled glshim and glues OK after the hack you suggested.

No idea what to do next!

Cheers
Spart
sparticle is offline   Reply With Quote
Old 02-08-2014, 11:20   #314
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

I should post on the instructions, if you can't get glxgears working, forget out opencpn.

Ok. Try this:

LD_LIBRARY_PATH=/usr/local/lib glxgears

Assuming you copied libGL.so.1 there

If that doesn't work, try:

cd /usr/local/lib
mv libGL.so.1 libGL.so

and try glxgears again
seandepagnier is offline   Reply With Quote
Old 02-08-2014, 11:47   #315
Registered User

Join Date: Jul 2014
Posts: 158
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by boat_alexandra View Post
I should post on the instructions, if you can't get glxgears working, forget out opencpn.

Ok. Try this:

LD_LIBRARY_PATH=/usr/local/lib glxgears

Assuming you copied libGL.so.1 there

If that doesn't work, try:

cd /usr/local/lib
mv libGL.so.1 libGL.so

and try glxgears again
Ok did that. The first command works.

glxgears opens a window but no gears appear and I get:

ERROR: EGL Error detected: EGL_BAD_DISPLAY: (0x3008)
Just keeps scrolling.



Cheers
Spart
sparticle is offline   Reply With Quote
Reply

Tags
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
Open CPN and Google Earth bgrimwade OpenCPN 19 09-12-2011 15:32
OpenCPN Version 2.5 Release bdbcat OpenCPN 86 02-09-2011 18:14
OpenCPN Stops Running BobLarkin OpenCPN 2 30-08-2011 23:38
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 04:31

Advertise Here


All times are GMT -7. The time now is 02:25.


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.