Saturday, September 26, 2015

How To Install OpenCPN on a Raspberry Pi


EDIT 11 FEB 2016: I would now recommend simply installing the OpenPlotter software found here (it's basically a fresh install for the Raspberry Pi with OpenCPN already installed and running): http://www.sailoog.com/en/blog-categories/openplotter-rpi

EDIT 24 MAY 2016: I've also gone and updating this post to reflect the guide at OpenCPN, instead of just winging it on my own.

Recommended Gear

Easy Step-By-Step OpenCPN Install/Compile on a Raspberry Pi for Total Noobs

If you follow the OpenCPN documentation, there are two options. The first option says you can install it without compiling it from Launchpad, but I'll be totally honest--I tried going that route, and I couldn't get it to work because, as I've mentioned in multiple places, I'm not exactly a very computer literate person. I'm very good at copying and pasting into a Terminal window, and that's what we're going to do here. Their second option is compiling OpenCPN, which as far as I can tell, means building it from scratch, which is much easier than it sounds. Here's how you do that:

Get a fully working Raspberry Pi (I'm using a Raspberry Pi 2 Model B+), with the latest edition of Raspbian installed, and run the following commands in the Terminal:

sudo apt-get update
sudo apt-get upgrade
     # When it prompts you, type "Y" for Yes and hit enter. This may take a while
sudo apt-get install build-essential cmake gettext git-core gpsd gpsd-clients libgps-dev wx-common libwxgtk3.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
     # When it prompts you, type "Y" for Yes and hit enter. This *will* take a long time, about 5 minutes depending on your internet speed
git clone http://github.com/seandepagnier/OpenCPN -b rpi_fixes
cd OpenCPN
sudo mkdir build
cd build
sudo cmake ..
sudo make -j3
     # This takes a long time. It will probably crash, too. See expanded notes below.
sudo make install
sudo nano /boot/config.txt
     # Add these two lines so it can run on slow hardware:
     framebuffer_depth=32
     framebuffer_ignore_alpha=1
cp /usr/local/share/applications/opencpn.desktop /home/pi/Desktop/
     # this creates a desktop shortcut
sudo reboot

The first two lines,

sudo apt-get update
sudo apt-get upgrade

are there to make sure all the items from the next line point to the correct web addresses to download. At least that's how I understand it. It's always good to run those two commands whenever you're about to download and install things using apt-get. It will prompt you if you want to download the new files, which will take up XXX megabytes, and simply type "Y" and then enter to confirm that you do. This might take a few minutes.

The next line,

sudo apt-get install build-essential cmake etc...

downloads all those libraries and background programs that OpenCPN requires. This one takes a while, and again, you'll have to confirm that you want to download them all by typing "Y" for yes when it prompts you.

The next line,

git clone http://github.com/seandepagnier/OpenCPN -b rpi_fixes

downloads the official and latest OpenCPN program from GitHub. GitHub, if you're not in the loop, is basically where many programmers keep their code for ease of use and easy access. If you know what you're looking at, it might be helpful to go check it out sometime. Now, why use Sean Depagnier's OpenCPN instead of the official one? Because it's optimized for the RPi, and won't crash as much as you install it.

I use GitHub because it makes it easy to download scripts and files straight from the terminal (in fact, you don't even need a monitor, keyboard, or mouse with the Raspberry Pi for this reason--you can SSH in and do it through the terminal on your laptop or desktop). Once you download all those files from GitHub, we still have to integrate it with all those other libraries we downloaded, and actually install it.

These few lines,

cd OpenCPN
sudo mkdir build
cd build





make a build folder inside the OpenCPN directory, which is what we use to build/compile/install OpenCPN. The next commands,

sudo cmake ..
sudo make -j3
sudo make install

do the actual installation of OpenCPN. It takes a while to accomplish, especially because the RPi isn't exactly a high powered processor. The -j3 basically helps to prevent crashes. But it still probably will crash after you do the sudo make -j3 command... in which case, unplug the RPi, wait a few seconds, plug it back in, and then:

cd OpenCPN/build
sudo make -j3

This will restart the process right where you left off. Repeat as necessary. It crashed on me three times. Don't confuse a crash with the monitor from turning off (I deal with this later).

When it's installed, do this:

sudo nano /boot/config.txt

Add these two lines to the file:

framebuffer_depth=32
framebuffer_ignore_alpha=1

Now that OpenCPN is installed, let's make it nice and polished for use. First of all, we'll need some charts.

Downloading Raster/Vector Charts for OpenCPN


This is a guide for easily getting US charts for OpenCPN. Allegedly, the vector charts don't work well on a Raspberry Pi, but I didn't notice anything slow on my 2 Model B+. This is totally up to you which one you want.
Follow those links and download whichever state you desire. When it's done downloading, unzip the file to wherever you want, and then open OpenCPN. I found that the only way to unzip them is to right click, then "Extract To Here" and then copy/paste the folder after that.

Setup a USB GPS Puck with OpenCPN


Simply plug it in to one of the USB ports on the Pi, launch OpenCPN and go to the Connections tab under Settings. Click "Add Connection", select "Serial" ("Network" would be for Wi-Fi or Ethernet cable connections), click the DataPort drop down, and "/dev/ttyUSB0" should show up. If you're not sure which USB port it is, simply unplug the GPS, in a terminal type "ls /dev/tty*" and make note of how many USB devices are there, then plug in the GPS, and retype in the same command, and whichever one is added is the GPS. Select it, leave everything else the way it is, and click Okay. It will automatically start locating you, and if you click on the red boat icon on the toolbar (the "Auto Follow" option), it will center on you.

Setup I2C Devices with OpenCPN


If you have a low-cost $10 IMU Compass, it's pretty easy to setup to use with OpenCPN, although not as easy as a GPS. You'll need a script to process this, and fortunately I've gone into great detail on how to do this here. If you're not using kplex, simply add a Network connection in OpenCPN, using the UDP port as described in that script.

Connect NMEA-0183 to OpenCPN


I've also gone into great deal about this in another post. Basically, you'll follow the same instructions as the GPS, selecting USB0 or USB1 or whatever as your input in the OpenCPN options. Or you could also check out the multiplexer concept too.

Prevent the Monitor from Automatically Shutting off on a Raspberry Pi


You'll want to disable the screen's auto-turn-off feature, since you probably don't want the screen to turn off in the middle of navigating a channel. To do this, type in: 

sudo nano /etc/lightdm/lightdm.conf

"nano" is a text editing program built into the Terminal program. For the uninitiated, it might look kind of daunting; but it's quite simple. That command will open up the lightdm.conf file, allowing you to edit the necessary parameter to keep the screen on. Using the down arrow key, press down until you find [SeatDefaults] and add the this line of text just below it:

xserver-command=X -s 0 dpms

Then press CTRL+X, then Y, then enter to save and exit the nano editor. VoilĂ ! Now after you reboot the Pi, you're screen will never turn off unless you pull the plug.


Old Guide (outdated):

What follows is the original post from September 2015, which still exists for posterity's sake.

Easy. Get a fully working Raspberry Pi connected to the Internet, and execute the following commands in the Command Prompt/Terminal:
 #Part 1: Setting up the Raspberry Pi for OpenCPN  
 sudo apt-get update  
 sudo apt-get upgrade  
 sudo nano /etc/lightdm/lightdm.conf  
      #Add this line under [SeatDefaults]: "xserver-command=X -s 0 dpms"  
 sudo nano /etc/modules  
      #Add these two variables (on separate lines): "i2c-bcm2708" and "i2c-dev"  
 cd /etc/modprobe.d  
 ls  
      #If there's no file called raspi-blacklist.conf, then skip the next line  
 sudo nano raspi-blacklist.conf  
      #Comment out "blacklist spi-bcm2708" & "blacklist i2c-bcm2708" with a "#" if they're there  
 sudo nano /boot/config.txt  
      #Add these two variables (on separate lines): "dtparam=i2c1=on" and "dtparam=i2c_arm=on"  
 sudo apt-get install python-smbus i2c-tools  
 sudo reboot  
      #Part II: Installing OpenCPN  
 cd /home/pi  
 mkdir opencpn  
 cd opencpn  
 wget http://agurney.com/raspi/opencpn_4.0.0-1_armhf_tides_map.deb  
 sudo apt-get install libwxgtk2.8-0 libglu1-mesa libtinyxml2.6.2 libwxbase2.8.0 libportaudio2 libjack-jackd2-0 wx2.8-i18n  
 sudo dpkg -i opencpn_4.0.0-1_armhf_tides_map.deb  
 cp /usr/local/share/applications/opencpn.desktop /home/pi/Desktop/  
 sudo nano /boot/config.txt  
      #Add these two variables on separate lines: "framebuffer_depth=32" and "framebuffer_ignore_alpha=1"  
 sudo reboot  
      #After restart, launch OpenCPN, then close it (this creates opencpn.conf)  
 sudo nano /home/pi/.opencpn/opencpn.conf  
      #Add these two variables on separate lines: "MEMCacheLimit=40" and "NCacheLimit=10"  
 sudo reboot  
      #Now you're ready for a circumnavigation  
Easy, right? If you're not a coder by day, then maybe not. But that above commands are pretty much it; read on to see how they're broken down, why we set certain variables, and if you have no clue what you're doing, then you're my target audience.

First Thing's First

Get yourself a Raspberry Pi with the basic Raspbian installed. There are plenty of guides all over (the NOOBS setup is probably the easiest--it's also what I used). You will also need a HDMI monitor (I just used my friend's TV while waiting for my actual screen to arrive), a micro-USB cord (the same that charges Android phones), a miniSD card, and a keyboard/mouse.

It would also be a good idea to take a look at these sites:
  • Alisdair's Pi Chart website was the best reference for this project, but it didn't all work for me (hence the writeup here on Zen of Sailing)
  • M/V C:\[ESC], which also builds on Alisdair's Pi Chart
  • Zapmaker has a pretty good writeup too, though it requires a bit of technical knowledge (actually, all of these do...)
  • Machinations, although he doesn't have OpenCPN on the Pi, has some great ideas for incorporating the Pi with OpenCPN as an NMEA 0183 Wi-Fi multiplexer
After I got OpenCPN running on my Pi, I actually didn't really like it. It worked flawlessly, but my end game will using OpenCPN on my laptop for my primary chart plotter, and to have the Pi just be the multiplexer feeding data into OpenCPN. But, in the interest of promoting workable and low-cost marine instruments, I decided to do an article on this anyway.

Setup the Raspberry Pi and Optimize for OpenCPN

This is real easy. Just follow the instructions from the Raspberry Pi Foundation's website, and you'll be good to go. But there are a few tweaks that can enhance it for OpenCPN during the setup process, outlined below. Not only that, but sometimes with these things, if a little tiny variable is different, then the whole setup changes. So, here's exactly what I did to get it running:
  1. Download the SD Card formatter from here, and format your SD card (yes, it's fine to erase it).
  2. Download the NOOBS zip file from here (the offline/network install version--it's big). Then unzip that file and copy/paste all the contents onto your freshly formatted SD card. If you get lost, just reference the INSTRUCTIONS-README.txt file.
  3. Slide the MicroSD card into the Pi, plug in your keyboard/mouse setup, then plug in the HDMI cable for your monitor. Finally, plug in the USB power cord. As soon as power is applied, it will turn on and boot up.
  4. Let it do its thing, then select the "Raspbian (Recommended)" option and click Install. This will take a while to process.
  5. When it's done, a blue screen with a prompt comes up. You will have to use your keyboard for this portion. The arrows move your "selector" up and down, and tab highlights SELECT or FINISH (press enter on whichever one you want) or tab again to go back to moving the "selector." Change the following to optimize the Raspberry Pi for OpenCPN:
    • Go to Enable Boot to Desktop, tab to SELECT, hit enter, highlight Desktop Login, tab to highlight SELECT, and hit enter
    • Select Internationalisation Options, and change as necessary (I highlighted en_GB, pressed the space bar to deselect it, then highlighted "en_US.UTF-8 UTF-8" and pressed space to select it (then, when you leave this screen, it will confirm your selection), and I changed the time zone to Pacific New)
    • Change Overclock to MEDIUM (950MHz ARM, 250MHz Core, 450MHz SDRAM, 2 overvolt)
  6. Select FINISH, and Reboot. It will load up, and now your Pi is working! Keep in mind, I just plugged mine directly into the ethernet port on my router, so I didn't need the USB WiFi dongle. I believe this one works straight out of the box, so you should be good to go with that.

Part I: Setting Up the Raspberry Pi for OpenCPN

This is the tricky part; you have a barebones basic Raspberry Pi, but it needs certain libraries/programs/whatever you want to call them that will allow OpenCPN to actually run and work on this little silicon wafer board. So, I will try to be as precise with these next few steps, and tailor it for folks who don't have a whole lot of programming knowledge (like me). First, I will list the entire sequence of code you have to type into the terminal, not counting the editing of various config files or documents. Read through the code to get an idea here, and then I break it down below that. Or, if you are already computer-savvy, then you can just follow this code block:
 sudo apt-get update  
 sudo apt-get upgrade  
 sudo nano /etc/lightdm/lightdm.conf  
      #Add this line under [SeatDefaults]: "xserver-command=X -s 0 dpms"  
      #This will prevent the screen from turning off  
 sudo nano /etc/modules  
      #Add these two variables (on separate lines): "i2c-bcm2708" and "i2c-dev"  
      #This is to enable the Pi to accept various inputs if you hookup instruments  
 cd /etc/modprobe.d  
 ls  
      #If there's no file called raspi-blacklist.conf, then skip the next line  
 sudo nano raspi-blacklist.conf  
      #Comment out "blacklist spi-bcm2708" & "blacklist i2c-bcm2708" with a "#"  
      #This is to verify the Pi will accept input  
 sudo nano /boot/config.txt  
      #Add these two variables (on separate lines): "dtparam=i2c1=on" and "dtparam=i2c_arm=on"  
      #This is also for the input  
 sudo apt-get install python-smbus i2c-tools  
      #Developer tools and libraries for OpenCPN and inputs  
 sudo reboot  
  1. Update the system. Using the mouse, select the "Terminal" in the top left. You'll get a black program window that will probably say "pi@raspberrypi ~ $ " and a blinking cursor. For the uninformed, this simply means that you (the user "pi") can type in commands for the Raspberry Pi to perform (for future reference, the default username is "pi" and the password is "raspberry"). Type in the following command to update the system:
    sudo apt-get update
    Let it download what it needs to, and then when it's all done (when you get the "pi@raspberrypi ~ $ " again), run this command:
    sudo apt-get upgrade
    It will ask to confirm if you want to use up additional disk space; simply type "y" and hit enter to acknowledge. It will run through it's little thing, and when it's all done, you're Raspberry Pi will be all up to date and current!

  2. You'll want to disable the screen's auto-turn-off feature, since you probably don't want the screen to turn off in the middle of navigating a channel. To do this, type in:
    sudo nano /etc/lightdm/lightdm.conf
    "nano" is a text editing program built into the Terminal program. For the uninitiated, it might look kind of daunting; but it's quite simple. That command will open up the lightdm.conf file, allowing you to edit the necessary parameter to keep the screen on. Using the down arrow key, press down until you find [SeatDefaults] and add the this line of text just below it:

    xserver-command=X -s 0 dpms
    Then press CTRL+O (the letter O, not the number 0) and hit enter to save it, then CTRL+X to exit the nano editor. VoilĂ ! Now after you reboot the Pi, you're screen will never turn off unless you pull the plug.
  3. Next, you'll have to enable a few ports/wires/feed the magic gremlins to allow your Raspberry Pi to accept information from your instruments. This uses something called I2C, and here are the steps to enable this:
    • Type this code into the terminal window:
      sudo nano /etc/modules
      This opens up the nano editor again for "modules," and you just have to add this line somewhere in there:i2c-bcm2708, press enter for a new line, then add this one: i2c-dev. The end result should look something like the picture. CTRL+O, Enter, CTRL+X.
    • This next step is probably optional for most people. Type this code in to see if you have to do it:
      cd /etc/modprobe.d
      ls
      If you don't see a file called raspi-blacklist.conf, then you're good to go to the next bullet. If you do see that file, open it up in the nano editor by typing:
      sudo nano raspi-blacklist.conf
      If there are either of these lines in there (blacklist spi-bcm2708 or blacklist i2c-bcm2708), you will need to put a "#" in front of both of those lines. If those lines aren't there, then you're good to move on to the next bullet.
    • Type the following command into the terminal:
      sudo nano /boot/config.txt
      and add the following two lines of text (on seperate lines): dtparam=i2c1=on and dtparam=i2c_arm=on, being sure that the first line has the number 1 (and not the letter L!) in "i2c1".
  4. Finally, the last step. Type in this code to install the two necessary libraries:
    sudo apt-get install python-smbus i2c-tools
    Let it install those programs, then once it's done... restart by typing this:
    sudo reboot
    Let the whole system reboot, and now it's ready to install OpenCPN!

Part II: Installing OpenCPN

This is where Alisdair's Pi Chart website comes in handy. He has kindly put together a sweet package that sets everything up, as I mentioned way up top, but there were still a few things that didn't quite work for me. So I would go take a look at his cool site if you'd like, and the code that follows is based off of what he did, but modified so that it worked for me. Same as before, I will list the entire code sequence, then break it down for us non-technical plebians.
 cd /home/pi  
 mkdir opencpn  
 cd opencpn  
 wget http://agurney.com/raspi/opencpn_4.0.0-1_armhf_tides_map.deb  
 sudo apt-get install libwxgtk2.8-0 libglu1-mesa libtinyxml2.6.2 libwxbase2.8.0 libportaudio2 libjack-jackd2-0 wx2.8-i18n  
      #These are toolkits that are normally included in standard OS's, but not the Pi  
 sudo dpkg -i opencpn_4.0.0-1_armhf_tides_map.deb  
 cp /usr/local/share/applications/opencpn.desktop /home/pi/Desktop/  
 sudo nano /boot/config.txt  
      #Add these two variables on separate lines: "framebuffer_depth=32" and "framebuffer_ignore_alpha=1"  
      #This is to accomodate the Pi's low processing power (otherwise OpenCPN will crash on launch)  
 sudo reboot  
      #After restart, launch OpenCPN, then close it (this creates opencpn.conf)  
 sudo nano /home/pi/.opencpn/opencpn.conf  
      #Add these two variables on separate lines: "MEMCacheLimit=40" and "NCacheLimit=10"  
      #This isn't entirely necessary, but makes it a little smoother on low-power systems  
 sudo reboot  
  1. Open up the terminal, and establish a directory for OpenCPN. We will also download to this new folder, all in one code sequence:
    cd /home/pi
    mkdir opencpn
    cd opencpn
    wget http://agurney.com/raspi/opencpn_4.0.0-1_armhf_tides_map.deb
    "wget" is just a fancy command to download the file. That particular file includes OpenCPN, the tide harmonics file, as well as a low-res world map for when you don't have charts. As of August 2015, version 4.0.0 was the most current and up to date. You will have to visit his website to see if anything more current comes out since then. Or, if there are any problems, you'll have to go to his site to see if anything's changed.
  2. Now, since we're on Linux, some things aren't automatically installed like with Windows or MacOSX. So we just need to download those things before we run OpenCPN. Type in this command, being careful not to mispell anything:
    sudo apt-get install libwxgtk2.8-0 libglu1-mesa libtinyxml2.6.2 libwxbase2.8.0 libportaudio2 libjack-jackd2-0 wx2.8-i18n
    It might just be easier to copy and paste if you're reading this on your Pi. In any case, you'll have to confirm you want to use up extra disk space as the programs download. There's quite a few, so it might take a little bit of time.
  3. Now that all the backbone programs are installed, it's time to do the same with the OpenCPN package you downloaded in Step 1. Here's the command:
    sudo dpkg -i opencpn_4.0.0-1_armhf_tides_map.deb
    That "unpacks" OpenCPN, which officially means it's installed!
  4. Create a Desktop Shortcut by:
    cp /usr/local/share/applications/opencpn.desktop /home/pi/Desktop/
  5. Now double click on the icon, acknowledge that you won't sue them, and...!
    It will most likely crash immediately. That's because we still have to edit a few parameters that will only load on boot up. These are necessary because of the Raspberry Pi's unusually low processing power and graphics. So, here we go:
    sudo nano /boot/config.txt
    Add these two lines to the file: framebuffer_depth=32 and framebuffer_ignore_alpha=1, save it (you should know how by now), and then reboot the computer:
    sudo reboot
  6. Now double click on the icon, and it will open for you. But you have no charts, and there's still one thing you have to edit that you can only change after it runs for the first time. So, close it out and open the terminal and:
    sudo nano /home/pi/.opencpn/opencpn.conf
    Add these two lines (there's nothing wrong with adding them at the very top): MEMCacheLimit=40 and NCacheLimit=10
    Then, once more:
    sudo reboot
    And now you have OpenCPN installed on your Raspberry Pi!

Getting Charts

Time to get some charts! It doesn't really matter where you put the directory; that part's up to you. I will say that NOAA's interactive chart picker seems to crash the browser on the Raspberry Pi, so here are some handy links for NOAA US charts that won't cause a crash:
Allegedly, the Vector charts don't work as well on the Raspberry Pi because they are more processor intensive. That makes sense, but they seem to run fine on my Raspberry Pi 2 Model B. I did notice that when I downloaded the .zip file, if I tried to extract them to a different directory than the .zip file, it would crash. So, extract them to the same directory, then paste the chart folders over to your chart directory.

Getting the USB GPS Puck to Work

I will include here a brief introduction for getting that USB GPS puck to work. It works flawlessly with the Pi, and is a breeze to set up.

Simply plug it in to one of the USB ports on the Pi, launch OpenCPN and go to the Connections tab under Settings. Click "Add Connection", select "Serial" ("Network" would be for Wi-Fi or Ethernet cable connections), click the DataPort drop down, and "/dev/ttyUSB0" should show up. Select it, leave everything else the way it is, and click Okay. It will automatically start locating you, and if you click on the red boat icon on the toolbar (the "Auto Follow" option), it will center on you.

Final Words

Definitely go check out those other web pages linked to above, especially if you're having issues. Those pages were my source material, and they're procedures didn't work 100% for me; so there's a good chance that what I wrote here won't work 100% for you, either. Now, my next project is to turn it into a comprehensive multiplexer, but I might have to do that one from scratch. Either way, expect to see a detailed write up in the near future for that project. Until then, see what you can do with this cheap but effective chartplotter!

7 comments:

  1. I just tried installing OpenPlotter on an RPI2. OpenCPN doesn't start. When I try to run it from a terminal window, I get "Illegal Instruction".

    I know it isn't your software, but have you ever seen that error?

    ReplyDelete
    Replies
    1. I have not, but I also don't use OpenCPN on the Pi. However, there's a pretty robust community over here that can probably help you out: http://www.cruisersforum.com/forums/f13/openplotter-project-152754-21.html

      Delete
  2. Works like a charm, thank you very much! Maybe you could add the option to start X, and then automatically start openCPN in full screen mode. Took me a while to find it, and also probably others as well.
    So to startx first with lightdm, and then when the graphical user interface is loaded, automatically start the OpenCPN gui in fullscreen.
    The steps I found you can find here: https://www.reddit.com/r/linuxquestions/comments/3f4y82/debian_lightdm_autostart_a_gui_program_java_swing/
    The steps I did were:

    sudo nano /.config/autostart/opencpn.desktop

    Which creates the file required.
    Then paste the following in order to make it an executable script in the file:

    [Desktop Entry]
    Name=Start OpenCPN Program fullscreen
    Comment=Start the OpenCPN Program fullscreen
    Exec=/usr/bin/opencpn -fullscreen
    Type=Application

    Save the file by ctrl + x and press y.
    This should start the OpenCPN in full screen mode after the window manager is loaded. I hope this helps others as well.

    ReplyDelete
  3. This guide is awesome thanks for putting the time in to write it and keep it updated. For those that are interested, OpenCPN have put together their own install guide for Raspberry pi 2/3 (https://github.com/OpenCPN/OpenCPN/blob/258b90c38fc9ab17762b7cc623ae5b3b1e19f91d/data/doc/getting_started/opencpn_installation/raspberrypi_rpi2.html). Definitely worth checking out!

    ReplyDelete
  4. Helpful info.This article is very helpful. Good share,!!

    cabling company toronto

    ReplyDelete
  5. Updated my RPI2B and tried to reinstall OpenCPN
    I get the following:
    *** system-info for raspberry-pi 0.5.6 ***************************************
    Model B serial 00000000d31fad13 detected with 1008 MB (944 Sys/64 GPU)
    SD card raw capacity: 14.5 GiB
    WARNING: Overvoltage has been applied to this system at least once!
    kens@raspberrypi2:~ $ dpkg -l libwxsvg-dev
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name Version Architecture Description
    +++-==============-============-============-=================================
    ii libwxsvg-dev:a 2:1.4~dfsg-2 armhf Development files for wxSVG
    ii libwxgtk3.0-de 3.0.2-1 armhf wxWidgets Cross-platform C++ GUI
    ii wx3.0-headers 3.0.2-1 armhf wxWidgets Cross-platform C++ GUI
    ii wx-common 3.0.2-1 armhf wxWidgets Cross-platform C++ GUI

    *******************************
    Compilation Error
    Start:
    [ 40%] Linking CXX executable opencpn
    /usr/bin/ld: libWXSVG.a(SVGCanvas.cpp.o) symbol number 458 references nonexistent SHT_SYMTAB_SHNDX section
    /usr/bin/ld: libWXSVG.a(SVGCanvas.cpp.o) symbol number 458 references nonexistent SHT_SYMTAB_SHNDX section
    libWXSVG.a: error adding symbols: Bad value
    collect2: error: ld returned 1 exit status
    CMakeFiles/opencpn.dir/build.make:2480: recipe for target 'opencpn' failed
    make[2]: *** [opencpn] Error 1
    make[2]: Leaving directory '/usr/local/src/OpenCPN/build'
    CMakeFiles/Makefile2:503: recipe for target 'CMakeFiles/opencpn.dir/all' failed
    make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
    make[1]: Leaving directory '/usr/local/src/OpenCPN/build'
    Makefile:152: recipe for target 'all' failed
    make: *** [all] Error 2

    Any update on this build?

    ReplyDelete