Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 25-07-2010, 15:37   #31
Registered User

Join Date: Jul 2010
Posts: 6
Successfully building on a Mac*

(* with issues..)

So, after continually hearing about how great OpenCPN was from my buddy Ross, I figured I would build it on my Mac.

Using git, I got the source code.

Using Darwin Ports I installed wxwidgets, wxgtk, gpsd, glib2, and gzip.

I went into the buildosx directory, and:

cmake ../ -G Xcode

Then the fun started. After fighting with linker errors for a bit, I realized that the plugins weren't compiling properly (it _looked_ like it needed to reference files that were in the main application- like the plugin needed to be told that it wasn't a standalone application, but instead a library). After realizing they were just the plugins, I disabled them all.

Then I got the policy_t conflict mentioned previously with gpsd (policy_t interferes with a header in the mach framework). So I "port deactive gpsd" to get it off my system. (and reran cmake)

Building that, worked, but crashed after giving me the boilerplate. So I stepped through in debugger, and it was crashing here:

// Romoved at 2.2 build 710 for testing
#ifdef __WXOSX__
// RMS Problems with 2.8.3 on the mac and Destroy toolbar
//DestroyMyToolbar();
if (0 == m_toolBar)
{
m_toolBar = CreateAToolbar();
SetToolBar((wxToolBar *)m_toolBar);
}
#else
DestroyMyToolbar();
m_toolBar = CreateAToolbar();
SetToolBar((wxToolBar *)m_toolBar);
#endif

in chart1.cpp

The version in git failed, so I uncommented the section above that was commented out. That failed as well. So I took out the call to SetToolBar entirely, and the application launches and loads charts. It doesn't quit though (bug from the forums before on the Mac, I believe).

Just thought people might be interested in my experience. I haven't played with it too much to determine the stability, just got it up and stopped for the night.

Couple of questions-
1) Since gpsd did compile on my machine, it will probably be possible to figure out how to fix that issue. Either by removing a library that isn't needed in the project, or by some fancy #define footwork.
2) Any suggestions on fixing the toolbar issue? I have zero experience with wx. (but lots of experience with C, C++, etc. etc.)
3) Any suggestions on the makefile issues for the plugins? Anyone seen (or resolved) that before?

(BTW, this is using the latest version, so although this could go in a separate thread, I figured that beta testing the mac version is sorta the same as beta testing the other versions)

Thanks!
-Ryan Martell
S/V Valkyrie
__________________

__________________
rmartell is offline   Reply With Quote
Old 25-07-2010, 15:43   #32
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Ryan,

I don't know anything about building on a Mac, but have you seen the thread http://www.cruisersforum.com/forums/...pro-43249.html?
Maybe it helps you to find some answers to your questions?

Gunther
__________________

__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 25-07-2010, 18:41   #33
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,877
Ryan...

Good progress on the Mac.

1. SetToolBar issue: Do you have a way to trace into the wxWidgets code wxFrame::SetToolBar()? It would help to see some traces up to and including the exact fault in that method. I don't know Mac tools....

2. Quit issue: I have a patch for that, and will look at it. Again, any traces or screenshots of debugger output may be useful.

3. Plugins: I have no clue what a dynamically loadable library looks like in Mac-land. It is, under linux, a simple .so file. With gcc tools, we need only one common include file to build plugins: ocpn_plugin.h After they are built, they are simply copied to the right location for opencpn to see them and try to load and initialize them. More build messages may help here.

Fumbling in the darkness of a foreign land....
Dave
__________________
bdbcat is offline   Reply With Quote
Old 25-07-2010, 23:00   #34
Registered User

Join Date: Jul 2010
Posts: 6
Hi Dave-

Good work on this overall. I know how hard it is to maintain a multiple os application.

1) I think this might be either a wxwidgets bug or an issue with 64/32 bit. My i5 builds 64bit by default. I know that wxwidgets relies on carbon Apis that will never be 64 bit, and that wxw 2.9 supports cocoas native Apis but is unsupported. When I build opencpn, I specify 32 bit, but I'm not sure what wxwidgets is being built with. The actual error is related to a retain count in the native menu code (I could give you stack traces, but it'd probably not help you- as you are a stranger in this land). I tried just setting it to the menu created initially with the wxw call (before anything is added to it) but that still crashed. Once I get more bandwidth, I'll make sure I can rebuild wxwidgets in 32 bit mode.

2) Was that one mine from the other thread? ;-)

3) I can copy them, but it really looks like it trying to link everything in- or rather, it looks like the plugins are calling functions that aren't defined inside themselves (but are in the codebase), so the link is failing. I'll post some output tomorrow. (functions like ll_to_lc, if I recall correctly).

I'll build a binary that can be posted, once we get through these issues. No promises on working on other peoples machine though (non 64 bit/ppc)! (I hate figuring out how to do cross compiles). But if I can get a working Xcode project file, others should be able to build their own.

-Ryan
__________________
rmartell is offline   Reply With Quote
Old 26-07-2010, 04:22   #35
Registered User

Join Date: Jul 2010
Posts: 8
Quote:
Originally Posted by jimbo3123 View Post
I just installed Build 710 on my Windows 7 PC. The new route manager button causes the program to immediately lock-up and then crash as soon as it is pressed.
exactly the same here...

Version 2.2 Build 716

Win7 Pro (legit copy!!) press 'Route Manager' button and 'Opencpn has stopped working'

__________________
mattpayne is offline   Reply With Quote
Old 27-07-2010, 09:05   #36
Registered User

Join Date: Dec 2009
Location: France BRETAGNE
Boat: Arpege dufour 9M Snark
Posts: 2
Hello,

Exactly the same problem as jimbo3123 and mattpayne with me too win7 32


Version 2.2 Build 716


lolo
__________________
lolozzr is offline   Reply With Quote
Old 27-07-2010, 10:34   #37
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
When testing build 726 and the celestial plugin, opencpn simply exits when clicking OK in the plugin dialog.This happens when "New" has been pressed first. ddd reports "Program exited with code 0377" and Backtrace - reports "No Stack".
When running from the commandline the following message comes up at exit "loading text db..."

Thomas
__________________
cagney is offline   Reply With Quote
Old 28-07-2010, 11:27   #38
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
OK! Nice start with build 727. Just uploaded build 727 for people who want to test the new plugins on Ubuntu/Deb.
Just took a couple of shots of the Sun And Polaris.
(If you believe that, you don't know much about celestial!)

Thomas
Attached Thumbnails
Click image for larger version

Name:	celest.png
Views:	116
Size:	84.2 KB
ID:	18050  
__________________
cagney is offline   Reply With Quote
Old 28-07-2010, 12:04   #39
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Thomas,

Quote:
Originally Posted by cagney View Post
When testing build 726 ...
Quote:
Originally Posted by cagney View Post
Nice start with build 727...
BTW: It is hard to keep the tracker up-to-date with the build numbers. Or shall we just have one for each day?

And AFAIK the last "official" Windows Beta is still 716.

What do you suggest how to handle the build numbers?

Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 28-07-2010, 12:14   #40
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Gunther
Quote:
And AFAIK the last "official" Windows Beta is still 716.
Correct. Just update the tracker with the official beta releases from Dave. The numbers I'm referring to are more "alfa" stuff. No point in tracking a build that Dave don't think "worthy" of a release.

Thomas
__________________
cagney is offline   Reply With Quote
Old 28-07-2010, 12:28   #41
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 387
Build 727 also works on Windows.

Using magnetic azimuth on the celestial plugin causes a loop.
__________________
ChuckSK is offline   Reply With Quote
Old 28-07-2010, 14:45   #42
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
I have the same problem.
Message from CLI
Quote:
loading text db...
Could not open model file /usr/local/share/opencpn/astrolabe/IGRF11.COF
Thomas
__________________
cagney is offline   Reply With Quote
Old 29-07-2010, 19:10   #43
Registered User

Join Date: Jul 2010
Posts: 7
2.2.716 CRASH ON WAYPOINT ENTRY

Everytime I try and add a waypoint the program crashes and will not allow me back into waypoint manager. I have to go into the ini file and remove the NAVMARKS section at the end before i can go back into the waypoint manager, and then of course it crashes when I enter a waypoint again. Are there any suggestions? I've tried entering just waypoint names without N/W points, but it still crashes.
__________________
AbacoBahamaMan is offline   Reply With Quote
Old 30-07-2010, 08:44   #44
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,877
AbacoBahamaMan....

More detail please. What system? What keystrokes/mouse clicks exactly are you using that cause this problem? What does the (deleted) .ini file entry look like?

Thanks
Dave
__________________
bdbcat is offline   Reply With Quote
Old 30-07-2010, 10:22   #45
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 387
Here is a fix for the magnetic azimuth problem with the celestial plugin.
Attached Thumbnails
Click image for larger version

Name:	Magnetic_fix.JPG
Views:	95
Size:	54.6 KB
ID:	18096  
__________________

__________________
ChuckSK is offline   Reply With Quote
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beta Test / Technical bdbcat OpenCPN 2067 02-12-2017 15:06
OpenCPN Version 2.2 Beta Test bdbcat OpenCPN 437 15-12-2010 20:17
OpenCPN Version 2.1.0 Beta bdbcat OpenCPN 1045 25-06-2010 11:09
OpenCPN Version 1.3.5 Beta Technical bdbcat OpenCPN 544 24-03-2010 11:34



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 05:14.


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.