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 17-10-2014, 10:30   #1
Registered User
 
Mollymawk's Avatar

Join Date: Nov 2009
Location: on the high seas
Boat: "Mollymawk" 50ft Steel Ketch
Posts: 149
Building and installing plugins on OS X

I'm running OpenCPN on OS X and I'd really like to install a couple of plugins - specifically the Weatherfax and World Magnetic Model plugins.

But the OS X versions of all the plugins are listed as "Available later, sorry", and I can't work out how to build them from source.
It seems I have to build the whole of OpenCPN, is that really right?

Any tips would be much appreciated.

~ Caesar
__________________
www.yachtmollymawk.com
Mollymawk is offline   Reply With Quote
Old 17-10-2014, 10:52   #2
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Building and installing plugins on OS X

Caesar...
If you are not able to build OpenCPN itself, it is highly unlikely you are able to build any plugin. It would actually be much easier for you to build all of them because of the version incompatibility hell on OS X which you will pretty sure face when mixing the official OpenCPN package and your locally built plugin dylibs.
I'm working on this right now, so stay tuned - Building and especially debugging for Mac without a Mac is not exactly the most rewarding and easy task in the world, but as the download page says, they are coming.

Pavel
nohal is online now   Reply With Quote
Old 17-10-2014, 11:09   #3
Registered User
 
Mollymawk's Avatar

Join Date: Nov 2009
Location: on the high seas
Boat: "Mollymawk" 50ft Steel Ketch
Posts: 149
Re: Building and installing plugins on OS X

Thanks Pavel.

I haven't actually tried building the whole of OpenCPN - I was hopeful that it wouldn't be necessary.

I was put off building the whole thing partly by the fact that the build instructions for OS X are clearly many years out of date, partly by the fact that I haven't recently had a good enough internet connection to download the source code, and partly by the fact that the latest beta doesn't fully work on OS X so I assume there is a reasonable chance that the bleeding edge source might not either.

(3.3.1824 works so long as I don't enable texture caching; 3.3.2118 doesn't work unless I totally disable OpenGL. I am on Yosemite Beta 2.)

Of course, the right thing for me to do would be to get my hands dirty and help with the debugging, but time constraints and lack of a proper internet connection prevent that for the moment.

I guess I will have to wait for you to do your thing (many thanks for the hard work you do). How are you building/debugging for OS X at all without a Mac? Are you running OS X in a VM? Is running it in a VM not good enough / not fully equivalent to a real Mac?
__________________
www.yachtmollymawk.com
Mollymawk is offline   Reply With Quote
Old 17-10-2014, 13:15   #4
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Building and installing plugins on OS X

Caesar...
Yes, I'm running it inside a VM, Mavericks works quite fine under KVM on Linux. But you can imagine what the "user experience" is, and of course no HW accelerated graphics...
You need a lot of bandwidth to get going with development as you need also the old XCode bundles to target older OS X versions, which means gigabytes of downloads - the OpenCPN source tree clone is like a spit into the ocean compared to that.

BTW, I suppose this is the first time we ever hear about the problems with OpenGL you describe - and if something is not even reported, we really can't fix it.

Pavel
nohal is online now   Reply With Quote
Old 18-10-2014, 03:14   #5
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: Building and installing plugins on OS X

Quote:
Originally Posted by Mollymawk View Post
Thanks Pavel.


(3.3.1824 works so long as I don't enable texture caching; 3.3.2118 doesn't work unless I totally disable OpenGL. I am on Yosemite Beta 2.)

Of course, the right thing for me to do would be to get my hands dirty and help with the debugging, but time constraints and lack of a proper internet connection prevent that for the moment.
The more information you can give, the better chance of solving this. For example, posting the log file, and explaining what doesn't work is a start. Does it crash or what happens? Next, building from source should be tried as I believe it is the only way to get a backtrace. Should be relatively straightforward, but the instructions on the site really need to be updated.

I recall building some of my plugins (with someone who had a mac) and it worked, but some manual copying of files was needed, there was no installer. This is probably now solved for the wmm plugin (and therefore all the other plugins in the near future) I just don't have a fast enough internet connection to get an osx system running in kvm (I'm still struggling to set up an environment for android)
seandepagnier is offline   Reply With Quote
Old 19-10-2014, 15:00   #6
Registered User
 
Mollymawk's Avatar

Join Date: Nov 2009
Location: on the high seas
Boat: "Mollymawk" 50ft Steel Ketch
Posts: 149
Re: Building and installing plugins on OS X

Guys, sorry not to have reported the OpenGL problem in the latest beta. I have had internet access (and power for the computer) so rarely in the last months that the chance simply hasn't come up, and since I don't use my Mac as the primary navigation computer on board I had honestly forgotten all about the issue until this discussion came up.

I will try to do a proper bug report as soon as I can, but basically the problem is that the screen is filled with tiled and stretched copies of the ownship icon. If I enable tile caching, this is replaced by tiled copies of a very small section of a chart from near where I am.

I am running Yosemite Beta 2 (no internet to update, you're getting the picture) on a 2008 MacBook Pro (MacBookPro4,1).
Since it's a graphics problem: my GPU is NVIDIA GeForce 8600M GT 512 MB.

As mentioned, I can't build from source at the moment as I haven't had a good enough internet connection to download the source - never mind downloading the latest Xcode, since my old version doesn't work on Yosemite.

Pavel, why is it necessary to use an old Xcode to target old versions of OS X? Can't you set the build target to an old OS and build with the latest Xcode?
(FWIW, I would suggest that if there is little manpower/resources available for working with OS X, support for versions beyond the last couple of years be dropped. Since upgrades are now free, nobody with a machine less than six or seven years old needs to be running anything less than the latest version of the OS. And if they are, the old builds of OCPN will of course still work for them...)

~ Caesar
__________________
www.yachtmollymawk.com
Mollymawk is offline   Reply With Quote
Old 19-10-2014, 15:14   #7
Registered User
 
Mollymawk's Avatar

Join Date: Nov 2009
Location: on the high seas
Boat: "Mollymawk" 50ft Steel Ketch
Posts: 149
Re: Building and installing plugins on OS X

Is it actually necessary to have the full Xcode, or will the Xcode Command Line Tools work?
__________________
www.yachtmollymawk.com
Mollymawk is offline   Reply With Quote
Old 19-10-2014, 15:14   #8
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Building and installing plugins on OS X

Quote:
Originally Posted by Mollymawk View Post
Pavel, why is it necessary to use an old Xcode to target old versions of OS X? Can't you set the build target to an old OS and build with the latest Xcode?
(FWIW, I would suggest that if there is little manpower/resources available for working with OS X, support for versions beyond the last couple of years be dropped. Since upgrades are now free, nobody with a machine less than six years old needs to be running anything less than the latest version of the OS. And if they are, the old builds of OCPN will of course still work for them...)
You don't need the old XCode (actually you don't need XCode at all), you need the old SDK which is part of the package and not available elsewhere. We target OS X 10.7 and newer, which at least to me seems reasonable. And I don't exactly think that everybody is upgrading to Yosemite right now, actually the only live Mac user I know is not even on Mavericks yet, saying "My computer works"...

Pavel
nohal is online now   Reply With Quote
Old 19-10-2014, 15:41   #9
Registered User
 
Mollymawk's Avatar

Join Date: Nov 2009
Location: on the high seas
Boat: "Mollymawk" 50ft Steel Ketch
Posts: 149
Re: Building and installing plugins on OS X

FS#1541 : Serious graphics errors with OpenGL enabled

Let me know if I can provide any more information.
__________________
www.yachtmollymawk.com
Mollymawk is offline   Reply With Quote
Old 19-10-2014, 15:49   #10
Registered User
 
Mollymawk's Avatar

Join Date: Nov 2009
Location: on the high seas
Boat: "Mollymawk" 50ft Steel Ketch
Posts: 149
Re: Building and installing plugins on OS X

Quote:
Originally Posted by nohal View Post
You don't need the old XCode (actually you don't need XCode at all), you need the old SDK which is part of the package and not available elsewhere. We target OS X 10.7 and newer, which at least to me seems reasonable. And I don't exactly think that everybody is upgrading to Yosemite right now, actually the only live Mac user I know is not even on Mavericks yet, saying "My computer works"...

Pavel
Ah, I understand.

Targeting 10.7 and later certainly seems reasonable.
Of course, not everybody is upgrading to Yosemite yet, since it was only released a couple of days ago; I wasn't suggesting that... :-)
But on the other hand, every computer running Lion can upgrade for free to anything up to and including Yosemite, so all I was really suggesting was that if developing for old versions is onerous, dropping some of the very old ones might not be too harmful. If you have the time and energy to develop for old versions, of course, that's great!

Incidentally, I have now managed to download the source code. Now just the 2GB-or-so Xcode download...
__________________
www.yachtmollymawk.com
Mollymawk is offline   Reply With Quote
Old 19-10-2014, 16:40   #11
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Building and installing plugins on OS X

Caesar...
I have put OS X packages for WMM and objsearch plugins on the download page a couple of minutes ago. https://github.com/nohal/wmm_pi/blob/wmm/README.md is updated with my notes about the build process.
The build of the OpenCPN core should not need anything more as long as you don't want to package it, which is when some kind of Dave's magic comes to play (and it should probably be reworked)

Pavel
nohal is online now   Reply With Quote
Old 19-10-2014, 17:06   #12
Registered User
 
Mollymawk's Avatar

Join Date: Nov 2009
Location: on the high seas
Boat: "Mollymawk" 50ft Steel Ketch
Posts: 149
Re: Building and installing plugins on OS X

Quote:
Originally Posted by nohal View Post
Caesar...
I have put OS X packages for WMM and objsearch plugins on the download page a couple of minutes ago. https://github.com/nohal/wmm_pi/blob/wmm/README.md is updated with my notes about the build process.
The build of the OpenCPN core should not need anything more as long as you don't want to package it, which is when some kind of Dave's magic comes to play (and it should probably be reworked)

Pavel
Ok... it installed fine (after I renamed my OpenCPN 3.3.1824.app back to OpenCPN.app). The map background in the installer is a nice touch!

But it doesn't actually work. Doesn't show up in OCPN at all. Log file contains the following errors:
Code:
21:53:29 BRST: PlugInManager: Loading PlugIn: /Applications/OpenCPN 3.3.1824.app/Contents/PlugIns/wmm_pi/libwmm_pi.dylib
21:53:29 BRST: Error: dlopen(/Applications/OpenCPN 3.3.1824.app/Contents/PlugIns/wmm_pi/libwmm_pi.dylib, 2): Symbol not found: __ZNK12wxWindowBase9CanScrollEi
  Referenced from: /Applications/OpenCPN 3.3.1824.app/Contents/PlugIns/wmm_pi/libwmm_pi.dylib
  Expected in: flat namespace
 in /Applications/OpenCPN 3.3.1824.app/Contents/PlugIns/wmm_pi/libwmm_pi.dylib
21:53:29 BRST:    PlugInManager: Cannot load library: /Applications/OpenCPN 3.3.1824.app/Contents/PlugIns/wmm_pi/libwmm_pi.dylib
I had originally thought moving the dylib from Plugins/wmm_pi/ up to Plugins/ might fix the problem, since the builtin plugins are directly in Plugins/, but it didn't make any difference.
Haven't tried any other sort of debugging yet.

Thanks for putting those build instructions up. I will download wxWidgets and try building later.
__________________
www.yachtmollymawk.com
Mollymawk is offline   Reply With Quote
Old 19-10-2014, 17:22   #13
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Building and installing plugins on OS X

Moving the dylib won't help, the problem obviously is the linking of wxWidgets libraries being different between mine and Dave's system. The Windows DLL hell looks like kid's play in comparison with this OS X "heaven"
nohal is online now   Reply With Quote
Old 19-10-2014, 17:39   #14
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: Building and installing plugins on OS X

Caesar...
Could you post the output of
Code:
ls -la /Applications/OpenCPN.app/Contents/MacOS
please?

Thanks

Pavel
nohal is online now   Reply With Quote
Old 19-10-2014, 18:50   #15
Registered User
 
Mollymawk's Avatar

Join Date: Nov 2009
Location: on the high seas
Boat: "Mollymawk" 50ft Steel Ketch
Posts: 149
Re: Building and installing plugins on OS X

For the older beta, which I'm using due to the OpenGL problem:
Code:
Csr-MBP:~ caesar$ ls -la /Applications/OpenCPN\ 3.3.1824.app/Contents/MacOS/
total 39648
drwxr-xr-x@ 11 caesar  admin      374 24 Jun 18:03 .
drwxr-xr-x@  7 caesar  admin      238 24 Jun 18:03 ..
-rwxr-xr-x@  1 caesar  admin  7969884 24 Jun 18:03 OpenCPN
-rwxr-xr-x@  1 caesar  admin  2137964 24 Jun 18:03 libwx_baseu-2.9.5.0.0.dylib
-rwxr-xr-x@  1 caesar  admin   276876 24 Jun 18:03 libwx_baseu_net-2.9.5.0.0.dylib
-rwxr-xr-x@  1 caesar  admin    82252 24 Jun 18:03 libwx_baseu_xml-2.9.5.0.0.dylib
-rwxr-xr-x@  1 caesar  admin  1802424 24 Jun 18:03 libwx_osx_cocoau_adv-2.9.5.0.0.dylib
-rwxr-xr-x@  1 caesar  admin   648388 24 Jun 18:03 libwx_osx_cocoau_aui-2.9.5.0.0.dylib
-rwxr-xr-x@  1 caesar  admin  6300904 24 Jun 18:03 libwx_osx_cocoau_core-2.9.5.0.0.dylib
-rwxr-xr-x@  1 caesar  admin   104708 24 Jun 18:03 libwx_osx_cocoau_gl-2.9.5.0.0.dylib
-rwxr-xr-x@  1 caesar  admin   955572 24 Jun 18:03 libwx_osx_cocoau_html-2.9.5.0.0.dylib
And for what it's worth, for the newer beta:
Code:
Csr-MBP:~ caesar$ ls -la /Applications/OpenCPN\ 3.3.2118.app/Contents/MacOS/
total 40064
drwxr-xr-x@ 11 caesar  admin      374 19 Sep 01:55 .
drwxr-xr-x@  7 caesar  admin      238 19 Sep 01:55 ..
-rwxr-xr-x@  1 caesar  admin  8189640 19 Sep 01:55 OpenCPN
-rwxr-xr-x@  1 caesar  admin  2128244 19 Sep 01:55 libwx_baseu-3.0.0.1.0.dylib
-rwxr-xr-x@  1 caesar  admin   276876 19 Sep 01:55 libwx_baseu_net-3.0.0.1.0.dylib
-rwxr-xr-x@  1 caesar  admin    82284 19 Sep 01:55 libwx_baseu_xml-3.0.0.1.0.dylib
-rwxr-xr-x@  1 caesar  admin  1834124 19 Sep 01:55 libwx_osx_cocoau_adv-3.0.0.1.0.dylib
-rwxr-xr-x@  1 caesar  admin   647724 19 Sep 01:55 libwx_osx_cocoau_aui-3.0.0.1.0.dylib
-rwxr-xr-x@  1 caesar  admin  6289228 19 Sep 01:55 libwx_osx_cocoau_core-3.0.0.1.0.dylib
-rwxr-xr-x@  1 caesar  admin   105664 19 Sep 01:55 libwx_osx_cocoau_gl-3.0.0.1.0.dylib
-rwxr-xr-x@  1 caesar  admin   940964 19 Sep 01:55 libwx_osx_cocoau_html-3.0.0.1.0.dylib
__________________
www.yachtmollymawk.com
Mollymawk is offline   Reply With Quote
Reply

Tags
plug


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
Plugins and outboard and laptop! Algarve OpenCPN 1 01-02-2014 19:00
Installing Debugger and VDR Plugins zodd OpenCPN 26 08-08-2013 07:40
Installateur de plugins, Install software for plugins. Gilletarom OpenCPN 3 30-04-2013 05:57
Wood That Won't Warp For Building Entire Kitchen Counter, and Advice On Building Hatc albergsailor Monohull Sailboats 30 25-09-2012 09:15
Building Plugins in 2.3.0 JonPan OpenCPN 0 18-12-2010 14:48

Advertise Here


All times are GMT -7. The time now is 12:17.


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.