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 22-10-2019, 10:10   #1
Registered User

Join Date: Oct 2019
Location: Canada
Boat: Tracker, TargaV18, 19
Posts: 9
Opencpn compiled from source ... how to start

Okay so for various reasons I have been told for what I want to do I need to install OpenCPN by compiling it myself following these instructions
https://opencpn.org/wiki/dokuwiki/do...ompiling_linux

I have succeeded... but how do I get the pretty icon on the desktop... or even run the program once it is installed ...

If I enter opencpn in the ~/OpenCPN/build dir

pi@raspberrypi:~/OpenCPN/build $ opencpn

it does start it but it gives me an error

"Lock file'/home/pi/OpenCPN' has incorrect permissions"

and then after I click OK I get an info pop up stating "it seems you have no tide/current harmonic data installed"

I know i need to compile install my plugins still but I wanted to get past these 3 challenges first.
Can anyone in the know point me in the right direction please. My searches have come up empty.

Kind regards
Peter
rastam4n is offline   Reply With Quote
Old 22-10-2019, 15:05   #2
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Opencpn compiled from source ... how to start

Peter,

If you ran this:

sudo make install

then OpenCPN should appear in the menu of programs. Or you can open a shell prompt and type opencpn. Don’t do that in the build folder though.
transmitterdan is offline   Reply With Quote
Old 22-10-2019, 15:42   #3
Registered User

Join Date: Oct 2019
Location: Canada
Boat: Tracker, TargaV18, 19
Posts: 9
Re: Opencpn compiled from source ... how to start

Thanks Dan

I did run sudo make install ... but I have been executing opencpn in the build dir. I will try outside the dir and see what happens

Interestingly OpenCPN was not added to the program Menu... but I there were no errors during build so I am not sure what to do about that. I suppose I could make it auto run at boot but it would be nice to have the ability to start it from the desktop as well... thoughts?
rastam4n is offline   Reply With Quote
Old 22-10-2019, 15:50   #4
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Opencpn compiled from source ... how to start

What Linux distro are you running?
transmitterdan is offline   Reply With Quote
Old 22-10-2019, 16:16   #5
Registered User

Join Date: Oct 2019
Location: Canada
Boat: Tracker, TargaV18, 19
Posts: 9
Re: Opencpn compiled from source ... how to start

I'm using Raspbian Buster latest release on Rpi4 ... so Ubuntu i guess?

I did start with the Raspbian instructions first then when the suggested I moved to the linux instructions
rastam4n is offline   Reply With Quote
Old 22-10-2019, 19:00   #6
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Opencpn compiled from source ... how to start

Quote:
Originally Posted by rastam4n View Post
I'm using Raspbian Buster latest release on Rpi4 ... so Ubuntu i guess?

I did start with the Raspbian instructions first then when the suggested I moved to the linux instructions
On Raspian stretch on Rpi 3 OpenCPN installs under the "Education" menu under the Raspberry start icon. That is also popular on other Debian variants such as Ubuntu. I don't know why it ends up there.
transmitterdan is offline   Reply With Quote
Old 23-10-2019, 00:56   #7
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Opencpn compiled from source ... how to start

Quote:
Originally Posted by transmitterdan View Post
On Raspian stretch on Rpi 3 OpenCPN installs under the "Education" menu under the Raspberry start icon. That is also popular on other Debian variants such as Ubuntu. I don't know why it ends up there.
It's from the OpenCPN code. The "opencpn.desktop" file in the "data" directory.
During "make install" this file is copied to /usr/share/applications .
The opencpn.desktop file looks like this

Code:
[Desktop Entry]
Version=1.0
Name=OpenCPN
Comment=Open source chart plotter / navigator
Exec=opencpn
Icon=opencpn
StartupNotify=true
Terminal=false
Type=Application
Categories=Education;Science;Geography;
Keywords=GPS;Navigation;Chart
The logic behind this comes from the freedesktop.org standard.
OpenCPN, does not fit well into the set of predefined Categories!

Thomas
cagney is offline   Reply With Quote
Old 23-10-2019, 03:48   #8
Registered User
 
pinguino's Avatar

Join Date: May 2009
Location: SE Spain
Boat: Jeanneau SO 32I
Posts: 125
Re: Opencpn compiled from source ... how to start

That bug you're messing with, I reported it a while back. I don't know why it happens, but I know how to solve it.

Just move or rename the folder where the source code after the install, off course, is and that's it.

By the way, tidal and current data and contour map data are not incorporated by default into the opencpn installation when you compile with the default configuration. The solution to this is to remove the old opencpn installation from repositories:
sudo apt remove opencpn

Then you delete the attachments

sudo apt autoremove

Then you install your compiled package or make install, if you haven't already done so. And now you reinstall what's missing:

sudo apt install opencpn-tcdata opencpn-gshhs-full

This way you will have it working correctly and without risk that some update of the system deletes some file of base maps or tides.

By the way, to use opencpn with the fully functional sound it is essential to compile it with other parameters. The installation of opencpn for Raspberry pi from the official repositories does not work properly in relation to sound. The sound is choppy and distorted.

cmake -DOCPN_ENABLE_PORTAUDIO=OFF -DOCPN_ENABLE_SNDFILE=OFF -DOCPN_ENABLE_SYSTEM_CMD_SOUND=ON ..

I already reported it here also in its day but I was told that it only gave problems with the test button but that it worked normally in normal use. That's not true. If you don't build with the right parameters for Raspberry pi.... It does not work well.
pinguino is offline   Reply With Quote
Old 23-10-2019, 07:49   #9
Registered User

Join Date: Oct 2019
Location: Canada
Boat: Tracker, TargaV18, 19
Posts: 9
Re: Opencpn compiled from source ... how to start

Quote:
Originally Posted by pinguino View Post
That bug you're messing with, I reported it a while back. I don't know why it happens, but I know how to solve it.

Just move or rename the folder where the source code after the install, off course, is and that's it.
Thanks pinguino - great infomation!

Ok... so just to be clear do you mean rename/move OpenCPN folder (created when I ran git clone git://github.com/OpenCPN/OpenCPN.git) or the OpenCPN/build folder or neither and then which folder?
rastam4n is offline   Reply With Quote
Old 23-10-2019, 08:29   #10
Registered User
 
pinguino's Avatar

Join Date: May 2009
Location: SE Spain
Boat: Jeanneau SO 32I
Posts: 125
Re: Opencpn compiled from source ... how to start

Quote:
Originally Posted by rastam4n View Post
Thanks pinguino - great infomation!

Ok... so just to be clear do you mean rename/move OpenCPN folder (created when I ran git clone git://github.com/OpenCPN/OpenCPN.git) or the OpenCPN/build folder or neither and then which folder?
Rename the main folder OpenCpn and try it.
pinguino is offline   Reply With Quote
Old 23-10-2019, 09:33   #11
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Opencpn compiled from source ... how to start

You don’t have to rename any folders. Someone is confused.
transmitterdan is offline   Reply With Quote
Old 23-10-2019, 10:35   #12
Registered User
 
pinguino's Avatar

Join Date: May 2009
Location: SE Spain
Boat: Jeanneau SO 32I
Posts: 125
Re: Opencpn compiled from source ... how to start

Quote:
Originally Posted by transmitterdan View Post
You don’t have to rename any folders. Someone is confused.
Maybe not for everyone but certainly for some if necessary. It's been almost two years since I built the opencpn code since the first alpha of the MBTiles appeared. Both in Ubuntu and Raspbian the build worked well. But shortly after releasing the official version 5 something happened with the code that started to throw that error message. It was from one day to the next.

Everything works fine and build correctly but unless you delete or rename the folder that git creates or that is decompressed with the source code the message appears both starting from the entry created by make install in the list of programs and running directly ./opencpn from the same folder build.

If you look carefully, the error message says that the lock file in the /home/pi/OpenCpn folder - the folder where the code that git downloads is located - has the wrong permissions.

I haven't been able to find out which is the damn "lock" file. I tried to apply all superuser permissions to the whole folder and its subfolders and it doesn't work. But by renaming it it seems that opencpn doesn't find the bloody folder and therefore doesn't know if the damn lock file is there or not or if it has the right permissions... or that I know. So it doesn't even pull the error message.

It's nonsense, but it's been happening to me for months now and not just me. To others too. Evidently there are those who don't but a good handful of us do. And since it started to happen always happens and I build opencpn almost a hundred times different, always with the same problem.

Now I know that after make install or create the package and install it after deleting the folder with the code, the problem disappears. But until I found out I broke my head.
pinguino is offline   Reply With Quote
Old 23-10-2019, 13:06   #13
Registered User
 
transmitterdan's Avatar

Join Date: Oct 2011
Boat: Valiant 42
Posts: 6,008
Re: Opencpn compiled from source ... how to start

Don’t run OpenCPN in the build folder unless you use the command line option -p for portable.

The error message you see is because you don’t use -p I would guess.

But if you “sudo make install” then you should never run from the build folder. Run from the user’s normal log in folder. Or run from the Linux start menu.

The message you see is about the lock file that prevents running multiple copies. If you don’t type opencpn in the build folder then you can safely say OK to this message. There is nothing wrong with OpenCPN that causes this message. It’s an operator mistake.

If you use the start menu to run then all should be ok. In that case if you see the lock file message just say ok and go ahead. It isn’t a fatal error. Try not to run two copies at once unless you know how portable mode works.
transmitterdan is offline   Reply With Quote
Old 23-10-2019, 22:54   #14
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: Opencpn compiled from source ... how to start

Any reason not to just install it?
Latest openplotter is very much alpha with bits not working yet but apparently the opencpn installer works on pi4, and the wonderful signalk..

https://github.com/openplotter/openplotter-settings
conachair is offline   Reply With Quote
Old 24-10-2019, 10:50   #15
Registered User

Join Date: Oct 2019
Location: Canada
Boat: Tracker, TargaV18, 19
Posts: 9
Re: Opencpn compiled from source ... how to start

Quote:
Originally Posted by conachair View Post
Any reason not to just install it?
Latest openplotter is very much alpha with bits not working yet but apparently the opencpn installer works on pi4, and the wonderful signalk..

https://github.com/openplotter/openplotter-settings
Sure, I have OP1.2 in my boat on a RPI3b it works okay but I use pypilot for AP and the opcn plugin that comes with OP is an old version and there is no deb package available for the newest version which fixes several bugs... so I usually build it from source and make install ... with OP2 I get errors when I do this so Sean sent me to the instructions to build OPCN from source... anyhow I have figured out that I misunderstood his instructions, he meant for me to just install the dependencies and then try and make install pypilot_pi and that has worked...
But now you all got me interested in figuring this out so I installed ubuntu on a laptop and tried to build opencpn again. I get that same errors about the lock file no matter if I start it outside of the OpenCPN folder or if I use the desktop link. I guess its nothing to worry about but still. It is obviously an error that should not be there? Also it is reporting the same error regarding the tides etc... the packages
sudo apt install opencpn-tcdata opencpn-gshhs-full

cannot be located... guess they are specific to Rpi? What should I do to get them for ubuntu?
rastam4n is offline   Reply With Quote
Reply

Tags
enc, opencpn

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Where to share our compiled missing plugins for Ubuntu based distros? vmalep OpenCPN 13 28-05-2019 11:55
Woes launching compiled version 4.8 on Raspberry Pi 3 rjoe OpenCPN 2 31-10-2017 03:40
Request that Android OpenCPN.apk Open Source version be put up in the OpenCPN.org Dow yachtmanforfun OpenCPN 18 20-09-2015 06:00
Has anyone compiled a guide to Caribbean marinas based on quality of wifi? restorm Liveaboard's Forum 3 26-01-2013 11:11

Advertise Here


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


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.