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 12-08-2011, 01:05   #16
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Problem with Anchor Alarm in Ubuntu 11.04

Quote:
Originally Posted by idpnd View Post
Thanks Iboc - sadly doesnt work on this ubuntu machine, crashes sound..
Idpnd
I have entered this bug in the tracker.FS#607 : Linux hangs on Anchor Alarm.

Thomas
cagney is offline   Reply With Quote
Old 19-08-2011, 17:39   #17
Registered User
 
Piloto Corsario's Avatar

Join Date: Jan 2010
Location: Huelva - Spain
Boat: Beneteau Oceanis 411
Posts: 6
I have Ubuntu 11.04 32 bits an the last version of Opencpn and the provisional solution works.

Thanks
Piloto Corsario is offline   Reply With Quote
Old 30-09-2011, 02:25   #18
Registered User

Join Date: Mar 2011
Posts: 8
Re: Problem with Anchor Alarm in Ubuntu 11.04

anything new for this problem ? because it's very important, I will go a very long boat trip in tree weeks, and this fonction would be very helpfull !!!

It seem not so complicated... please help

Vince
vince7887 is offline   Reply With Quote
Old 03-10-2011, 09:09   #19
Registered User

Join Date: Jul 2011
Location: Droebak, Norway
Boat: Princess, 388, 40ft
Posts: 11
Re: Problem with Anchor Alarm in Ubuntu 11.04

Try: aoss opencpn
on the commandline

Rgds
Lasse
lurno is offline   Reply With Quote
Old 15-10-2011, 20:41   #20
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Problem with Anchor Alarm in Ubuntu 11.04

Folks....

Finally looked at this sound issue on Ubuntu 11.04.

As cagney reports, wxWidgets defaults to OSS for sound backend.

However, as generally installed from the repos, wxWidgets will fall back to SDL for the backend if OSS cannot be initialized.

I installed libsdl, and it works fine on 11.04.

Anyone else tried this with repo wxWidgets? With locally compiled wxWidgets?

Dave
bdbcat is online now   Reply With Quote
Old 16-10-2011, 02:11   #21
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Problem with Anchor Alarm in Ubuntu 11.04

Dave
Exactly which "libdsl" did you install?
I have
Quote:
libsdl1.2debian
libsdl1.2debian-pulseaudio
libsdl-mixer1.2
installed. No difference, same result.
Using KUbuntu 11.10.
Thomas
cagney is offline   Reply With Quote
Old 16-10-2011, 12:51   #22
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Problem with Anchor Alarm in Ubuntu 11.04

Thomas...

Lets try this:

Replace the following method code in options.cpp

Code:
void options::OnButtonTestSound(wxCommandEvent& event)
{
#if wxUSE_LIBSDL
 printf("wxUSE_LIBSDL true\n");
#endif

      wxSound AIS_Sound(g_sAIS_Alert_Sound_File);

      if(AIS_Sound.IsOk())
      {
            printf("playing sound\n");
            AIS_Sound.Play();
      }
      else
            printf("sound is NOT ok\n");
            

}
Run OCPN from the console, and try Toolbox->AIS->Test Alert Sound. Don't forget to select a sound file first....
You should see something on the console relating to sound

Dave
bdbcat is online now   Reply With Quote
Old 16-10-2011, 12:56   #23
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Problem with Anchor Alarm in Ubuntu 11.04

Thomas....

I have, on Ubuntu 11.04,

libsdl1.2debian
libsdl1.2debian-alsa

Dave
bdbcat is online now   Reply With Quote
Old 16-10-2011, 14:30   #24
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Problem with Anchor Alarm in Ubuntu 11.04

Dave

The only feedback I get is "playing sound", without any sound played, so wxUSE_LIBSDL is not set.
Maybe we can draw the conclusion that sound works directly with alsa, but not if redirected via pulseaudio?

Thomas
cagney is offline   Reply With Quote
Old 16-10-2011, 18:00   #25
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Problem with Anchor Alarm in Ubuntu 11.04

Thomas....

wxUSE_LIBSDL is an optional constant defined at build-time in the wxWidgets libraries.

The wx libs I use (32 bits) come straight from the Ubuntu repo, and have been (fortunately) built with wxUSE_LIBSDL set true.

Did you build your wxWidgets libraries locally? If so, please check the lib/wx/setup.h file in your wx build directory. It should have this in it:

Code:
/*
 * Use SDL for audio (Unix)
 */
#define wxUSE_LIBSDL 1

/*
 * Compile sound backends as plugins
 */
#define wxUSE_PLUGINS 0
Bottom line: If wxUSE_LIBSDL is not defined, then libsdl won't be used by the runtime, and no sound will come out.

Not sure how pulseaudio relates, though....

Dave
bdbcat is online now   Reply With Quote
Old 17-10-2011, 03:52   #26
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Problem with Anchor Alarm in Ubuntu 11.04

Dave
I'm using plain vanilla ubuntu packages.
I tried out the eepc 386 box with Ubuntu 10.10. No sdl packages installed, so I installed the same packages as you did. No luck. Tried recompilation, still no luck, wxUSE_LIBSDL is still not set.
I wonder what's going on?
Could you make a package based on your new setup, for testing?
Thomas
cagney is offline   Reply With Quote
Old 17-10-2011, 05:36   #27
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Problem with Anchor Alarm in Ubuntu 11.04

Thomas....

I am having bandwidth problems this week, so cannot upload a package....sorry....

Some thoughts:

When OCPN is built, it includes "setup.h" from /usr/lib/wx/include/{build_name}/wx.
This is the setup file that establishes wxUSE_LIBSDL for the entire application.
So, check the include path in the OCPN make step by making OCPN with

Code:
$make VERBOSE=true
to find out exactly which setup.h is being included. Then look at that setup.h to validate wxUSE_LIBSDL is set.

Can you recompile the wxWidgets libraries from source? I have found that finding the exact copy of setup.h to modify before the build takes some trial and error. There are several copies of setup.h in the wxWidgets build tree.
But eventually it can be set.

More later
Dave
bdbcat is online now   Reply With Quote
Old 17-10-2011, 08:34   #28
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Problem with Anchor Alarm in Ubuntu 11.04

Dave

There are two setup.h .
/usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h from the package libwxgtk2.8-dev
and
/usr/lib/wx/include/base-unicode-release-2.8/wx/setup.h from the package libwxbase2.8-dev
Both has the line
Quote:
#define wxUSE_LIBSDL 0
Both the 64 bits (11.10) and 32 bits (10.10) installations has the same setup.

So the two packages were compiled without support for libsdl.
Changing the definition in the two files setts the constant in OCPN, but, as expected (not compiled into the wx packages), still no sound.
Of course I can try to compile the two packages with wxUSE_LIBSDL set, but that doesn't solve he general problem.
I wonder how your standard ubuntu packages are compiled with sdl support while the ones I have installed lacks this support?

Thomas
cagney is offline   Reply With Quote
Old 17-10-2011, 18:36   #29
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: Problem with Anchor Alarm in Ubuntu 11.04

Thomas....

Hmmm.....

As I recall my workflow.....
I installed Kubuntu 11.04 (32) from ISO. There was no sign of wxWidgets in the default repos.

So I added wxWidgets repos to synaptics "Other Software" sources viz.

Code:
Quote:
http://apt.wxwidgets.org/
natty-wx main
Quote:
http://apt.wxwidgets.org/
natty-wx main (Source Code)
And then installed libwxgtk2.8-dev.

And there it was. wxUSE_LIBSDL was set in these binaries.

Now, after the fact, I wonder why there was no wx in the natty canonical repos?

What do you find for your 11.10? Were wxWidgets runtime and dev packages in the as-shipped apt sources list?

I love mysteries....
Dave
bdbcat is online now   Reply With Quote
Old 18-10-2011, 11:42   #30
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Re: Problem with Anchor Alarm in Ubuntu 11.04

Dave

The only thing I did, that was different from the default config, was to activate "universe" in the source list.

I'm happy you did not find the wx packages in the standard place, because the repro you found, leads to a very simple solution to the problem.
Just replace the installed libwxgtk2.8-0 package, with a package from apt.wxwidgets.org.
No recompilation, just a different deb package.
There is no specific package for 11.10, but the package for 11.04 worked just fine as a straight forward replacement for me.
I have tested this on two computers, 32&64 bits.
It would be nice if more users could test this. If it works we just have to tweak the Linux installation instructions a little bit.

To add this repo to the source list, these instructions should work for OpenCPN as well -->InstallingOnUbuntuOrDebian - wxPyWiki
I have not had the time to test this.

Thanks for the solution!

Thomas
cagney is offline   Reply With Quote
Reply

Tags
alarm, anchor


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
Raytheon ST5000+ Problem Capt.Don Marine Electronics 13 21-10-2013 13:31
Computer Problem ... Salt and Moisture canucksailor Marine Electronics 7 08-07-2011 19:20
Problem Since 2.2.918 - Garmin Won't Work MarkJ OpenCPN 28 29-06-2011 17:40
Furuno Radar Problem - Help !! Greg4cocokai Marine Electronics 0 29-06-2011 00:43

Advertise Here


All times are GMT -7. The time now is 06:41.


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.