Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 23-02-2013, 15:57   #1
Registered User

Join Date: Jan 2013
Posts: 15
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, 16:23   #2
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
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, 17:14   #3
Registered User

Join Date: Jan 2013
Posts: 15
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, 18:25   #4
Registered User

Join Date: Jan 2013
Posts: 15
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, 05:09   #5
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,250
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, 21:25   #6
Registered User

Join Date: Jan 2013
Posts: 15
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

Thread Tools
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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 11:45.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.