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 23-02-2013, 14:57   #1
Marine Service Provider

Join Date: Jan 2013
Location: New Zealand
Posts: 97
Post error compiling openCPN on ARM Chromebook / lUbuntu raring

Hi there,

I'm trying to get opencpn going on the new $249 arm chromebook which seems like the perfect navigation computer once chromeOS is replaced with ubuntu (very low power consumption).

I'm running the pre-release "raring" version of lubuntu 13.04 because it has better support for arm chromebooks than Precise.
I'm using the current beta of OpenCPN from github on the assumption that it will have better ARM support than the stable release.

I was able to install all the dependencies listed on the "installing opencpn from source" pages, except for "libportaudio".

libportaudio0, libportaudio2 and libportaudio-dev are all installed but "libportaudio" is not found.

I got the following compile error which seems to be related to portaudio:

Code:
[ 45%] Building CXX object CMakeFiles/opencpn.dir/src/navutil.cpp.o
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8217:34: error: 'PaStreamCallbackTimeInfo' does not name a type
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8217:60: error: ISO C++ forbids declaration of 'timeInfo' with no type [-fpermissive]
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8218:28: error: 'PaStreamCallbackFlags' has not been declared
/root/opencpnbeta/OpenCPN/src/navutil.cpp: In function 'int OCPNSoundCallback(const void*, void*, long unsigned int, const int*, int, void*)':
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8240:16: error: 'paComplete' was not declared in this scope
/root/opencpnbeta/OpenCPN/src/navutil.cpp: In member function 'bool OCPN_Sound::Create(const wxString&, bool)':
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8335:39: error: invalid conversion from 'int (*)(const void*, void*, long unsigned int, const int*, int, void*)' to 'long unsigned int' [-fpermissive]
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8335:39: error: invalid conversion from 'void*' to 'int (*)(void*, void*, long unsigned int, PaTimestamp, void*) {aka int (*)(void*, void*, long unsigned int, double, void*)}' [-fpermissive]
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8335:39: error: too few arguments to function 'PaError Pa_OpenDefaultStream(PortAudioStream**, int, int, PaSampleFormat, double, long unsigned int, long unsigned int, int (*)(void*, void*, long unsigned int, PaTimestamp, void*), void*)'
In file included from /root/opencpnbeta/OpenCPN/include/navutil.h:45:0,
                 from /root/opencpnbeta/OpenCPN/src/navutil.cpp:54:
/usr/include/portaudio.h:355:9: note: declared here
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8340:77: error: 'Pa_SetStreamFinishedCallback' was not declared in this scope
/root/opencpnbeta/OpenCPN/src/navutil.cpp: In function 'int OCPNSoundCallback(const void*, void*, long unsigned int, const int*, int, void*)':
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8243:1: warning: control reaches end of non-void function [-Wreturn-type]
make[2]: *** [CMakeFiles/opencpn.dir/src/navutil.cpp.o] Error 1
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make: *** [all] Error 2
Does anyone have any suggestions of how to fix this?
Many thanks indeed for your help!

Chris
chris14679 is offline   Reply With Quote
Old 23-02-2013, 15:23   #2
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: error compiling openCPN on ARM Chromebook / lUbuntu raring

Quote:
Originally Posted by chris14679 View Post
Hi there,

I'm trying to get opencpn going on the new $249 arm chromebook which seems like the perfect navigation computer once chromeOS is replaced with ubuntu (very low power consumption).

I'm running the pre-release "raring" version of lubuntu 13.04 because it has better support for arm chromebooks than Precise.
I'm using the current beta of OpenCPN from github on the assumption that it will have better ARM support than the stable release.

I was able to install all the dependencies listed on the "installing opencpn from source" pages, except for "libportaudio".

libportaudio0, libportaudio2 and libportaudio-dev are all installed but "libportaudio" is not found.

I got the following compile error which seems to be related to portaudio:

Code:
[ 45%] Building CXX object CMakeFiles/opencpn.dir/src/navutil.cpp.o
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8217:34: error: 'PaStreamCallbackTimeInfo' does not name a type
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8217:60: error: ISO C++ forbids declaration of 'timeInfo' with no type [-fpermissive]
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8218:28: error: 'PaStreamCallbackFlags' has not been declared
/root/opencpnbeta/OpenCPN/src/navutil.cpp: In function 'int OCPNSoundCallback(const void*, void*, long unsigned int, const int*, int, void*)':
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8240:16: error: 'paComplete' was not declared in this scope
/root/opencpnbeta/OpenCPN/src/navutil.cpp: In member function 'bool OCPN_Sound::Create(const wxString&, bool)':
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8335:39: error: invalid conversion from 'int (*)(const void*, void*, long unsigned int, const int*, int, void*)' to 'long unsigned int' [-fpermissive]
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8335:39: error: invalid conversion from 'void*' to 'int (*)(void*, void*, long unsigned int, PaTimestamp, void*) {aka int (*)(void*, void*, long unsigned int, double, void*)}' [-fpermissive]
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8335:39: error: too few arguments to function 'PaError Pa_OpenDefaultStream(PortAudioStream**, int, int, PaSampleFormat, double, long unsigned int, long unsigned int, int (*)(void*, void*, long unsigned int, PaTimestamp, void*), void*)'
In file included from /root/opencpnbeta/OpenCPN/include/navutil.h:45:0,
                 from /root/opencpnbeta/OpenCPN/src/navutil.cpp:54:
/usr/include/portaudio.h:355:9: note: declared here
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8340:77: error: 'Pa_SetStreamFinishedCallback' was not declared in this scope
/root/opencpnbeta/OpenCPN/src/navutil.cpp: In function 'int OCPNSoundCallback(const void*, void*, long unsigned int, const int*, int, void*)':
/root/opencpnbeta/OpenCPN/src/navutil.cpp:8243:1: warning: control reaches end of non-void function [-Wreturn-type]
make[2]: *** [CMakeFiles/opencpn.dir/src/navutil.cpp.o] Error 1
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make: *** [all] Error 2
Does anyone have any suggestions of how to fix this?
Many thanks indeed for your help!

Chris
Un-install "libportaudio-dev" and libportaudio0 , which belongs to portaudio ver 18, OpenCPN uses ver 19.
Install "portaudio19-dev" and "libporaudiocpp0" instead, and see how it goes!

O needs:
portaudio19-dev
libportaudio2
libportaudiocpp0

Thomas
cagney is offline   Reply With Quote
Old 23-02-2013, 16:14   #3
Marine Service Provider

Join Date: Jan 2013
Location: New Zealand
Posts: 97
Re: error compiling openCPN on ARM Chromebook / lUbuntu raring

Hi Thomas, thanks for the amazingly quick and useful response! I get much further through the compile process after doing as you suggested but now I get a different portaudio error. Can you suggest anything for this one:

Code:
[ 57%] Building CXX object CMakeFiles/opencpn.dir/src/scrollingdialog.cpp.o
make[2]: *** No rule to make target `/usr/lib/libportaudio.so', needed by `opencpn'.  Stop.
make[1]: *** [CMakeFiles/opencpn.dir/all] Error 2
make: *** [all] Error 2
Many thanks! Chris
chris14679 is offline   Reply With Quote
Old 23-02-2013, 17:25   #4
Marine Service Provider

Join Date: Jan 2013
Location: New Zealand
Posts: 97
Re: error compiling openCPN on ARM Chromebook / lUbuntu raring

UPDATE: I fixed this error by editing CMakeCache.txt

Original line:

//Path to a library.
PORTAUDIO_LIBRARY:FILEPATH=/usr/lib/libportaudio.so

Correct line:

PORTAUDIO_LIBRARY:FILEPATH=/usr/lib/arm-linux-gnueabihf/libportaudio.so

It now compiles and install correctly!


I CAN CONFIRM that OpenCPN works on the Samsung ARM chromebook running lubuntu 13.04. This will be an excellent platform for OpenCPN due to the low cost, low power consumption and high speed. I expect and hope we will see a huge number of OpenCPN installs on the ARM chromebook soon.

chris14679 is offline   Reply With Quote
Old 24-02-2013, 04:09   #5
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: error compiling openCPN on ARM Chromebook / lUbuntu raring

Quote:
Originally Posted by chris14679 View Post
UPDATE: I fixed this error by editing CMakeCache.txt

Original line:

//Path to a library.
PORTAUDIO_LIBRARY:FILEPATH=/usr/lib/libportaudio.so

Correct line:

PORTAUDIO_LIBRARY:FILEPATH=/usr/lib/arm-linux-gnueabihf/libportaudio.so

It now compiles and install correctly!


I CAN CONFIRM that OpenCPN works on the Samsung ARM chromebook running lubuntu 13.04. This will be an excellent platform for OpenCPN due to the low cost, low power consumption and high speed. I expect and hope we will see a huge number of OpenCPN installs on the ARM chromebook soon.

OK!
Try to use the attached "FindPortaudio.cmake", instead of the one that comes with OpenCPN. It uses "FindPkgConfig". Check if it can find the right path, without editing the cache file.
Get rid of the ".doc" extension, it's just a workaround to be able to upload to this forum.
FindPortaudio.cmake.doc

Thomas
cagney is offline   Reply With Quote
Old 24-02-2013, 20:25   #6
Marine Service Provider

Join Date: Jan 2013
Location: New Zealand
Posts: 97
Re: error compiling openCPN on ARM Chromebook / lUbuntu raring

I tried using the original cmakecache.txt and your new findportaudio. It all seemed to compile perfectly through cmake and make.

I didn't test "make install" because I have my installl how I want it now and I didn't want to upset it.
chris14679 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


Advertise Here


All times are GMT -7. The time now is 13:21.


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.