Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 07-06-2016, 02:47   #1
Registered User

Join Date: Feb 2012
Location: La Paz, Mexico
Boat: Cape George 36
Posts: 127
Images: 3
Building on Mac El Capitan

Steps to get a build environment on mac. Under El Capitan, these steps

Extract the SDK and copy to the installed Xcode environment:
$ hdiutil attach ~/Downloads/xcode4630916281a.dmg
$ sudo sh -c "(cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs ; mkdir MacOSX10.7.sdk ; chown ${USER} MacOSX10.7.sdk)"
$ (cd /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs ; tar cf - MacOSX10.7.sdk) | (cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs; tar xf -)
$ hdiutil detach /Volumes/Xcode

Do not produce an SDK that the latest XCode - Version 7.3.1 (7D1014) recognizes (build setting says (not found) after SDK in selection pane).

Also, not sure I've got the right branch - just been trying to build master.
AuroraGH is offline   Reply With Quote
Old 07-06-2016, 08:57   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,532
Images: 2
Re: Building on Mac El Capitan

See Carcode message
http://www.cruisersforum.com/forums/...ml#post2138381
rgleason is offline   Reply With Quote
Old 07-06-2016, 11:27   #3
Registered User

Join Date: Feb 2012
Location: La Paz, Mexico
Boat: Cape George 36
Posts: 127
Images: 3
Re: Building on Mac El Capitan

I'm just following the instructions on Compiling - Mac OS X | Official OpenCPN Homepage

Very happy to not have to build against 10.7 - maybe the website should be updated.

wxWidgets 3.0.2 will not build against 10.11

../src/osx/webview_webkit.mm:936:25: error: cannot initialize a variable of type 'WebBackForwardList *' with an rvalue of type 'WKBackForwardList *'
WebBackForwardList* history = [m_webView backForwardList];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/osx/webview_webkit.mm:954:25: error: cannot initialize a variable of type 'WebBackForwardList *' with an rvalue of type 'WKBackForwardList *'
WebBackForwardList* history = [m_webView backForwardList];

Or have we moved on to 3.1.0 (which would be nice)?

Still no joy on a build.
AuroraGH is offline   Reply With Quote
Old 07-06-2016, 11:36   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,532
Images: 2
Re: Building on Mac El Capitan

AuroraGh

If you would be so kind as to make a complete list of the steps you need to take
I'd be happy to update the documentation, or to augment it for MAC El Capitan

What is El Capitan? Is that like Lion? ..a version?
rgleason is offline   Reply With Quote
Old 07-06-2016, 12:14   #5
Registered User

Join Date: Feb 2012
Location: La Paz, Mexico
Boat: Cape George 36
Posts: 127
Images: 3
Re: Building on Mac El Capitan

Quote:
Originally Posted by rgleason View Post
AuroraGh

If you would be so kind as to make a complete list of the steps you need to take
I'd be happy to update the documentation, or to augment it for MAC El Capitan

What is El Capitan? Is that like Lion? ..a version?
El Capitan is Mac OS 10.11

When I figure them out and get a running build, I'll do that.
AuroraGH is offline   Reply With Quote
Old 07-06-2016, 16:27   #6
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,387
Re: Building on Mac El Capitan

AuroraGH...

There is a good reason to build with wx3.02 and SDK 10.7. And that is reproducibility. The current production version (i.e. shipping version) of OpenCPN for Mac uses this build schema. If you jump ahead and have difficulties, there is no net to catch you. I recommend a step-by-step approach with complicated projects like OCPN which have lots of dependencies.

On your instant problem: It seems to be possible to use SDK10.7 on XCode 7.3. See this link:
osx - Mac OS X 10.6 SDK no longer works with Xcode 7.3? - Stack Overflow

S.O. is your friend...

I have not tried this, since I use XCode 4.3.3 on Lion to build OCPN. But it sounds reasonable.

Good Luck, standing by...
Dave
bdbcat is offline   Reply With Quote
Old 07-06-2016, 18:12   #7
Registered User

Join Date: Feb 2012
Location: La Paz, Mexico
Boat: Cape George 36
Posts: 127
Images: 3
Re: Building on Mac El Capitan

Quote:
Originally Posted by bdbcat View Post
AuroraGH...

There is a good reason to build with wx3.02 and SDK 10.7. And that is reproducibility. The current production version (i.e. shipping version) of OpenCPN for Mac uses this build schema. If you jump ahead and have difficulties, there is no net to catch you. I recommend a step-by-step approach with complicated projects like OCPN which have lots of dependencies.

On your instant problem: It seems to be possible to use SDK10.7 on XCode 7.3. See this link:
osx - Mac OS X 10.6 SDK no longer works with Xcode 7.3? - Stack Overflow

S.O. is your friend...

I have not tried this, since I use XCode 4.3.3 on Lion to build OCPN. But it sounds reasonable.

Good Luck, standing by...
Dave
I have tried a whole lot of things. No luck.

The instructions on the website for installing OS10.7 sdk invariably result in some files not able to be created. I did get a link to a zipped up 10.7 sdk directory and placed it in the right place. However the default command line compiler cannot build wxWidgets 3.0.2 against that SDK. The result of the .configure command is

Code:
../configure --enable-unicode --with-osx-cocoa --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ --with-macosx-version-min=10.7 --enable-aui --disable-debug --enable-opengl --without-liblzma
results in:

Code:
checking for SDK directory /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/... exists
checking if C compiler (gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/ -mmacosx-version-min=10.7) works with SDK/version options... configure: error: in `/Users/todd/Projects/OpenCPN/wxWidgets-3.0.2/build-release':
configure: error: no.  Try a different SDK
So I can't build wxWidgets from the command line against 10.7 with the supplied compiler.

Attempts to build against 10.11 (current) mostly work except that Apple has changed the api for the WebView widget and I will need to modify the wxWidgets source code to fix that. I haven't tried that yet but I would just plain give up on 10.7SDK going forwards - its dead.

I have tried building wxWidgets 3.1.0 - it builds and all projects will compiler but OpenCPN won't link with it complaining about a lot of missing symbols.

Frustrating day.
AuroraGH is offline   Reply With Quote
Old 07-06-2016, 18:47   #8
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,387
Re: Building on Mac El Capitan

AuroraGH...

1. I have uploaded to Dropbox a zipped copy of SDK10.7. Here is the link:

https://www.dropbox.com/s/ty6go2ib1b...7.sdk.zip?dl=0

I took this verbatim from my working XCode app bundle. It should be possible to unzip it into your XCode bundle, and try the wx3.0.2 configure again.

2. If that doesn't work, then I think we should move to SDK10.11 for modern XCode V7. Patch wx302 as necessary. There is more info in the Webview_webkit failure here:

#16329 (wxwidgets doesn't build on Mac OS 10.10) – wxWidgets

...or, there may be a wx configure option that disables the webview compile step. I don't think we need it for OCPN.

Dave
bdbcat is offline   Reply With Quote
Old 08-06-2016, 05:12   #9
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,537
Re: Building on Mac El Capitan

First the documentation at Compiling - Mac OS X | Official OpenCPN Homepage
should be deleted. It is several years old, e.g., a Xcode version 4.6.3 is not available anymore. Actually it is Xcode version 7.3.1.

Furthermore I pointed out here already years ago that the wxWidgets port for Mac is still under development even until today. WxWidgets might work well for Windows and Linux but not for Mac OSX.

So I always use the latest trunk of version 3.1.0 for Mac OSX.
The correct configure string is:
../configure --with-osx_cocoa --enable-debug --enable-shared --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk --with-macosx-version-min=10.10 --enable-mimetype=yes

Debug enabled is needed to see the possible asserts in OpenCPN code.

After "configure" do "make" and then do "make install", that is all. wxWidgets compilation has still about 64 warnings, mostly because of using outdated Mac OSX functions. But these warnings doesn't hurt actually.

Gerhard
CarCode is offline   Reply With Quote
Old 08-06-2016, 05:42   #10
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,532
Images: 2
Re: Building on Mac El Capitan

This is getting pretty complicated, I guess we need a rewrite. Has the whole Mac world moved onto El Capitan? Does the OS version matter to compiling OpenCPN? It appears so, from reading.

Who can rewrite this?
rgleason is offline   Reply With Quote
Old 08-06-2016, 07:00   #11
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,537
Re: Building on Mac El Capitan

Quote:
Originally Posted by rgleason View Post
This is getting pretty complicated, I guess we need a rewrite. Has the whole Mac world moved onto El Capitan? Does the OS version matter to compiling OpenCPN? It appears so, from reading.

Who can rewrite this?
Would you please take your hands off when adults are talking together?

Gerhard
CarCode is offline   Reply With Quote
Old 08-06-2016, 07:32   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,532
Images: 2
Re: Building on Mac El Capitan

Touche. You make me chuckle.
rgleason is offline   Reply With Quote
Old 08-06-2016, 07:35   #13
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,532
Images: 2
Re: Building on Mac El Capitan

Why don't you just rewrite it Gerhard? Too much work? Aurora could be a great asset to your cause, helping get MAC version improved. It would help you too. Smile.
rgleason is offline   Reply With Quote
Old 08-06-2016, 07:41   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,532
Images: 2
Re: Building on Mac El Capitan

Gerhard, I am sorry I should not have said that. I am sure the path is a kind of unknown warren that needs to be worked out. I will shut up now.
rgleason is offline   Reply With Quote
Old 08-06-2016, 09:08   #15
Registered User

Join Date: Jul 2015
Location: Plano, Texas
Posts: 69
Re: Building on Mac El Capitan

Quote:
Originally Posted by rgleason View Post
This is getting pretty complicated, I guess we need a rewrite. Has the whole Mac world moved onto El Capitan? Does the OS version matter to compiling OpenCPN? It appears so, from reading.

Who can rewrite this?
Hi Rick,

The Mac world is not nearly so pedantic as the PC world. Most users, from what I can tell, are on the current release of the OS or no more than one behind. Apple has made it too simple not to update and there is no cost involved. Oddly it's a bit backwards from the PC world in that we regularly get software updates from our key tool providers that advise that their latest wares will need to run on the current OS.

Since it came up again, here is another vote for moving on to wxwidgets 3.1.0 which wxwidgets.org says should now be considered a production release. You will get a lot of warnings about deprecated functions, but it compiles and works great on the Windows environment on on the latest OpenCPN beta. Someone else will have to judge the Linux and Mac worlds since I have OpenCPN running on neither.

Same goes for cmake, which is up to 3.5.3 I believe. They seemed to have fixed a lot of stuff like the flaky "Find" functions. Still not a huge fan of cmake, but I do have to use it occasionally (outside of OpenCPN) and it is getting better.

Regards,
Doug
dwoodall is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trouble building 3.2 on Mac jasenj1 OpenCPN 34 25-05-2013 07:53
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 OpenCPN on Mac sbfreddie OpenCPN 8 07-04-2012 17:24
Mac Mini Desktop Computers sluissa Marine Electronics 27 05-09-2009 18:46
sailmail and mac vonnwonder Marine Electronics 3 14-12-2006 14:53

Advertise Here


All times are GMT -7. The time now is 01:40.


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.