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 25-06-2019, 07:17   #76
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,753
Images: 2
Re: Twocan - a new Plugin

Lennart, I just realized that I fixed the path problem on this main version.


https://github.com/rgleason/TwoCanPlugIn/commits/master
You'll see that travis is compiling with the green check mark and I made a commit to fix the path problem.

Try buiilding this one..


Also please give me the step by step description of how you are doing this for a linux opencpn plugiin. I would very much like to know how you are doing it in linux!! -trying to learn this process!
rgleason is offline   Reply With Quote
Old 25-06-2019, 07:26   #77
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: Twocan - a new Plugin

Rick,

I first tried to compile stand-alone and got this (badly translated into english):

CMakeFiles/twocan_pi.dir/build.make:89:recepie for target ”CMakeFiles/twocan_pi.dir/src/twocandevice.cpp.o” failed
make[2]: *** [CMakeFiles/twocan_pi.dir/src/twocandevice.cpp.o] Error 1
make[2]: Leaving catalogue ”/usr/local/src/twocan_pi/build”
CMakeFiles/Makefile2:166: recepie for target ”CMakeFiles/twocan_pi.dir/all” failed
make[1]: *** [CMakeFiles/twocan_pi.dir/all] Error 2
make[1]: Leaving catalogue ”/usr/local/src/twocan_pi/build”
Makefile:141: recepie for target ”all” failed
make: *** [all] Error 2

so I just thought that i'd give it a shot within the opencpn/plugin tree.

The opencpn release is a master I downloaded about tree weeks ago and that time it compiled just fine stand-alone. This time it did not.
Being a system guy, not a programmer, I'm just confused.

This is all done on a virtual machine I use for nothing but compiling opencpn and it just completely crashed on me. Have to reinstall and download it all again.


I will be back with more info tomorrow


/LennartG
LennartG is offline   Reply With Quote
Old 25-06-2019, 07:32   #78
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,753
Images: 2
Re: Twocan - a new Plugin

Ok, so you are using the git twocanplugins/twocanplugins repository, I think.
rgleason is offline   Reply With Quote
Old 25-06-2019, 08:17   #79
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: Twocan - a new Plugin

Correct, I was not even aware that there was a second tree. Find it even a bit confusing.
LennartG is offline   Reply With Quote
Old 25-06-2019, 08:31   #80
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,753
Images: 2
Re: Twocan - a new Plugin

Quote:
Originally Posted by LennartG View Post
Correct, I was not even aware that there was a second tree. Find it even a bit confusing.

It may be, but that is how Git works. I have a "forked" version. The main tree is normally where the final versions get stored. We make Pull Requests from the 'fork' that get merged or not into the main repository.


And yes, sometimes we all have a problem know which repos is best. Independent people will go make their own changes and not push back to the main repos etc.
rgleason is offline   Reply With Quote
Old 25-06-2019, 09:00   #81
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: Twocan - a new Plugin

Rick,

I've seen that before, just did not connect.
You wanted to know about how Linux may be used, well here are my notes, quickly sorted and translated. This is my setup on a virtual machine:

Install Ubuntu server 16.04 in 64 bit version, this to be able to get a minimal system. Install and configure just the minimum options, then remove mdadm and pulseaudio and clean up with:

sudo apt-get remove --purge mdadm pulseaudio
sudo apt-get autoremove

Install X-server, xfce and lightdm (should be there but appears to be incomplete) plus a few additional tools using:

sudo apt-get install xserver-xorg xserver-xorg-core xfonts-base xinit \
x11-xserver-utils xfwm4 xfce4-panel xfce4-settings xfce4-session \
xfce4-terminal xfdesktop4 xfce4-taskmanager tango-icon-theme \
gnome-icon-theme-full libgtk2.0-bin xlightdm lightdm-gtk-greeter \
xfce4-screenshooter-plugin

Reboot and accept the GUI default options. Then add required additional tools using:

sudo apt-get install gvfs gvfs-backends udisks2 thunar file-roller \
xarchiver mousepad firefox xcalib moserial can-utils libmtp-runtime \
alsa-base alsa-utils linux-sound-base libsndfile-dev

Time for the tools, use:

sudo apt-get install build-essential cmake gettext git-core wget libc6-dev \
libgps-dev wx-common libwxgtk3.0-dev libwxgtk-webview3.0-dev libglu1-mesa-dev \
libgtk2.0-dev wx3.0-headers libbz2-dev libtinyxml-dev libportaudio2 \
portaudio19-dev libcurl4-openssl-dev libexpat1-dev libcairo2-dev \
libarchive-dev liblzma-dev libexif-dev libelf-dev libsqlite3-dev \
libusb-1.0-0-dev libasound2-dev libpulse-dev rpm'

Fetch the OpenCPN release to compile, get the zip-file version.
Extract the zip archive to '/usr/local/src' using this method, adjusted for user
and programs:

cd /usr/local/src'
sudo unzip /home/<user>/Downloads/<program>.zip'

Fix the archive name using something like:

sudo mv OpenCPN<releasename> OpenCPN

Fetch the plugins, extract and fix the names using something like these:

cd /usr/local/src/OpenCPN/plugins
'sudo unzip /home/<user>/Downloads/<program>.zip'

'sudo mv LogbookKonni-1.2-1.3006 LogbookKonni_pi'
'sudo mv NmeaConverter_pi-1.0 NmeaConverter_pi'
'sudo mv oesenc_pi-master oesenc_pi'
'sudo mv TwoCanPlugIn-master twocan_pi'


Compile using these commands:

sudo su
cd /usr/local/src/OpenCPN
mkdir build
cd build
cmake ../
make
make install
exit


Note: If you need to redo the compilation, erase the file 'CMakeCache.txt' i the
build library and rerun from the beginning
LennartG is offline   Reply With Quote
Old 25-06-2019, 09:41   #82
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: Twocan - a new Plugin

Rick,
reinstalled the virtual machine and downloaded OpenCPN plus your TwoCan and recompiled. Same problem, this time not translated;

/usr/local/src/OpenCPN/plugins/TwoCan_pi/src/twocanerror.cpp:27:25: fatal error: twocanerror.h: Filen eller katalogen finns inte
compilation terminated.


/LennartG
LennartG is offline   Reply With Quote
Old 25-06-2019, 10:28   #83
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,753
Images: 2
Re: Twocan - a new Plugin

Sorry Lennart, maybe we'll have it right later.
Thank you for the write up. Lots of good things there. very helpful.



Quote:
Originally Posted by LennartG View Post
Rick,
reinstalled the virtual machine and downloaded OpenCPN plus your TwoCan and recompiled. Same problem, this time not translated;

/usr/local/src/OpenCPN/plugins/TwoCan_pi/src/twocanerror.cpp:27:25: fatal error: twocanerror.h: Filen eller katalogen finns inte
compilation terminated.


/LennartG
rgleason is offline   Reply With Quote
Old 27-06-2019, 03:21   #84
Registered User

Join Date: Mar 2011
Posts: 725
Re: Twocan - a new Plugin

Hi Lennart, Rick,

The error message that cmake is issuing is when compiling twocanerror.cpp, file not found error for twocanerror.h

cmakelists.txt looks ok, can you verify that /inc/twocanerror.h exists in your build environment.

Could it also possibly be an encoding issue (UTF-8, ascii, or some other encoding) ?

Regards.
stevead is offline   Reply With Quote
Old 27-06-2019, 05:21   #85
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,753
Images: 2
Re: Twocan - a new Plugin

Quote:
Originally Posted by stevead View Post
Hi Lennart, Rick,


Steve I can't find it now, (have looked) but I distinctly remember the way I corrected it was to at two


#include ..[\inc]\twocanerror.h

add \inc and it built.


..Could it also possibly be an encoding issue (UTF-8, ascii, or some other encoding) ?
Regards.
I have windows and use NotePad++ as the editor. I look at encoding in that and it is UTF-8!
Possible culprit? I thought git or something automatically converted it.
Perhaps I need a lecture in encoding for compilling? Don't know enough about it.
How do I correct it?
rgleason is offline   Reply With Quote
Old 27-06-2019, 06:51   #86
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,753
Images: 2
Re: Twocan - a new Plugin

LennartG


This is the wrong directory, the tests are being done in a separate repository, that is now properly compiled by Appveyor for windows. There are some errors in the last travis compile that I think need repair. Most recent push to my repository has another travis file, not trying to do OSX.
This repository is



https://github.com/rgleason/twocan-test/commits/master


as I believe I stated earlier. However I need to work on that travis file it has bad pathnames and is rejected....one moment please.









Quote:
Originally Posted by LennartG View Post
Rick,
reinstalled the virtual machine and downloaded OpenCPN plus your TwoCan and recompiled. Same problem, this time not translated;

/usr/local/src/OpenCPN/plugins/TwoCan_pi/src/twocanerror.cpp:27:25: fatal error: twocanerror.h: Filen eller katalogen finns inte
compilation terminated.


/LennartG
rgleason is offline   Reply With Quote
Old 27-06-2019, 06:52   #87
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: Twocan - a new Plugin

Rick,

Linux has a tool called 'iconv' for conversion. Search for 'man iconv' and you will find.


/LennartG
LennartG is offline   Reply With Quote
Old 27-06-2019, 07:23   #88
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,753
Images: 2
Re: Twocan - a new Plugin

Well, Appveyor is building and packaging and leaves a file to use.
Travis fails it does not like my changes to add "\inc\"
So some real programmer is going to have to fix this so it works.

https://github.com/rgleason/twocan-test/commits/master

Quote:
test/Plugin/img -pthread -O3 -DNDEBUG -fPIC -Wall -Wno-unused-result -g -O2 -fexceptions -fPIC -std=gnu++11 -o CMakeFiles/twocan_pi.dir/src/twocanerror.cpp.o -c /home/travis/build/rgleason/twocan-test/src/twocanerror.cpp
/home/travis/build/rgleason/twocan-test/src/twocanerror.cpp:27:32: fatal error: ..\inc\twocanerror.h: No such file or directory
#include "..\inc\twocanerror.h"

^
compilation terminated.
make[2]: *** [CMakeFiles/twocan_pi.dir/src/twocanerror.cpp.o] Error 1
make[2]: Leaving directory `/home/travis/build/rgleason/twocan-test/build'
make[1]: *** [CMakeFiles/twocan_pi.dir/all] Error 2
make[1]: Leaving directory `/home/travis/build/rgleason/twocan-test/build'
make: *** [all] Error 2
The command "make" exited with 2.
We are going to have to work on the travis file to get osx and linux packaging working.


I am going to make a PR back to Steven's test twocan repository. No need to make a new PR, these commits have been included with the outstanding PR which has not been merged.

https://github.com/TwoCanPlugIn/Test/pull/1
rgleason is offline   Reply With Quote
Old 27-06-2019, 07:24   #89
Registered User

Join Date: Aug 2016
Location: Stockholm, Sweden
Posts: 289
Re: Twocan - a new Plugin

Rick, just downloaded the code from 'https://github.com/rgleason/twocan-test/commits/master' and got:

/usr/local/src/OpenCPN/plugins/twocan_pi/src/twocanerror.cpp:27:32: fatal error: ..\inc\twocanerror.h: Filen eller katalogen finns inte
compilation terminated.

Translation: *File or directory does not exist'

Note: this is the one you updated a few minutes ago.
/LennartG
LennartG is offline   Reply With Quote
Old 27-06-2019, 11:18   #90
Registered User

Join Date: Mar 2011
Posts: 725
Re: Twocan - a new Plugin

Ahhhh, twocantest !

This is totally experimental, a first pass at combining both the TwoCan Plugin and the TwoCan Plugin Windows Drivers. The top level cmakelists.txt file simply builds both the plugin & windows drivers. Purely designed to enable the creation of a Windows installation package that installs both the plugin & the drivers for Windows builds however appveyor and Travis do their magic.

I have never tested it for a Linux build, nor did I contemplate it for a Linux build (as the Linux version of the plugin does not require any additional drivers).

Rick, I think we need to revisit this.

Firstly my approach to pushing stuff up to github is to never break rule #1.
Rule 1. Never break the build ! The code must build on both Windows & Linux on local repositories before committing and pushing to github

Secondly I am now having doubts about combining the Windows plugin and drivers. My intent was to decouple these so that each could be enhanced or have bugs fixed without impacting each other. I certainly don’t want a fix to a Windows driver impacting a non-Windows version of the plugin. At the moment the Windows drivers are the Achilles heel, the automagic port & baud rate detection has been problematic for some users, I need to contemplate an Actisense NGT-1 driver for some users.

And depending on user demand, Think about a Mac OS X build possibly using the OS X USB Modem interface (that will be fun as I don’t use a Mac !)

Perhaps it would be better if we just simply add an installer for the Windows drivers ?
stevead is offline   Reply With Quote
Reply

Tags
plug


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
New IAC Fleetcode Plugin for OpenCPN CBorchardt OpenCPN 77 23-04-2019 05:40
Plugin development... How to receive chart objects in my plugin? dmartinez OpenCPN 6 04-08-2017 00:56
New History Plugin for OpenCPN seandepagnier OpenCPN 11 04-10-2010 14:11

Advertise Here


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


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.