Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 23-10-2014, 04:53   #31
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,778
Re: Building OCPN on OS X

Quote:
Originally Posted by hmacread View Post
Hi Gerhard,

Last time I built OpenCPN I believe there was an Xcode project file with the distribution I got.

Has that been removed from the master Github? I'm a bit of a newbie to Xcode so am not sure about how to go about importing the project.

Any easy way? Otherwise back to the command line for me.

Cheers
Hugh
Hugh,
you may find a Xcode project file in:
https://github.com/CarCode/Cocoa-OCPN.git
But you will have to do a lot of changes because it is hardcoded with the paths of my system and much things are only in german language.
After all Xcode is always the better choice because you will have so much help and tools not available at command line. This trial-and-error methode is too time consuming...
Gerhard
__________________

__________________
CarCode is offline   Reply With Quote
Old 23-10-2014, 11:57   #32
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: Building OCPN on OS X

Pavel...

Making the dmg is dead simple, if everything is set up so far.

$ cmake -DPREFIX=/Users/dsr/tmp ..

$make

$make install

$make create-dmg

Does this work for you?


Also, I don't seem to need:
$ export MACOSX_DEPLOYMENT_TARGET=10.7

Who complains on this for you if you don't export...?

Dave
__________________

__________________
bdbcat is online now   Reply With Quote
Old 23-10-2014, 12:07   #33
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: Building OCPN on OS X

Quote:
Originally Posted by bdbcat View Post
Also, I don't seem to need:
$ export MACOSX_DEPLOYMENT_TARGET=10.7

Who complains on this for you if you don't export...?

Dave
Nobody does, I can build with any target. But the product does not run (well? at all?) on 10.7 if I don't do it (as far as I understand the information I have available).

Pavel
__________________
nohal is online now   Reply With Quote
Old 23-10-2014, 12:10   #34
Registered User

Join Date: Jul 2010
Posts: 51
Re: Building OCPN on OS X

Quote:
Originally Posted by CarCode View Post
Hugh,
you may find a Xcode project file in:
https://github.com/CarCode/Cocoa-OCPN.git

Gerhard
If somebody fixed a portable Xcode file on Mac, it would be easier to make small contributions to OpenCPN. More people would contribute.
__________________
stensmo is offline   Reply With Quote
Old 23-10-2014, 12:22   #35
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: Building OCPN on OS X

stensmo...

Make your own. cmake is actually very good at some things.

This is what I do.

$cmake -G Xcode ..

Good luck
Dave
__________________
bdbcat is online now   Reply With Quote
Old 23-10-2014, 12:54   #36
Registered User

Join Date: Jul 2010
Posts: 51
Re: Building OCPN on OS X

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

Make your own. cmake is actually very good at some things.

This is what I do.

$cmake -G Xcode ..

Good luck
Dave
Ok. I will give that a try.
__________________
stensmo is offline   Reply With Quote
Old 23-10-2014, 13:55   #37
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: Building OCPN on OS X

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

Making the dmg is dead simple, if everything is set up so far.

$ cmake -DPREFIX=/Users/dsr/tmp ..

$make

$make install

$make create-dmg

Does this work for you?
Dave...
Wow. Yeah, it does. And even installs
But as usually there is a but...
When I run it, it consistently crashes, which from the command line resolves to
Code:
knutintosh:build nohal$ /Applications/OpenCPN.app/Contents/MacOS/OpenCPN 
objc[3534]: Class wxNSAppController is implemented in both /Applications/OpenCPN.app/Contents/MacOS/libwx_osx_cocoau_core-3.0.0.2.0.dylib and /Applications/OpenCPN.app/Contents/MacOS/libwx_osx_cocoau_core-3.0.dylib. One of the two will be used. Which one is undefined.

... Tons of similar stuff ...

objc[3559]: Class wxOSXStatusItemTarget is implemented in both /Applications/OpenCPN.app/Contents/MacOS/libwx_osx_cocoau_adv-3.0.0.2.0.dylib and /Applications/OpenCPN.app/Contents/MacOS/libwx_osx_cocoau_adv-3.0.dylib. One of the two will be used. Which one is undefined.
Segmentation fault: 11
I'm able to "fix" it and get rid of the segfault with
Code:
sudo rm /Applications/OpenCPN.app/Contents/MacOS/*3.0.dylib
Pavel
__________________
nohal is online now   Reply With Quote
Old 23-10-2014, 14:18   #38
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: Building OCPN on OS X

Dave...
Here's the backtrace of the crash... What's puzzling is that of course all the libs are the same as they are copied from the symlinked WX stuff in /usr/local/lib...
Code:
(lldb) bt
* thread #1: tid = 0x678a, 0x00007fff8b481297 libsystem_malloc.dylib`szone_malloc_should_clear + 20, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x7fff5f3fffb4)
  * frame #0: 0x00007fff8b481297 libsystem_malloc.dylib`szone_malloc_should_clear + 20
    frame #1: 0x00007fff8b483868 libsystem_malloc.dylib`malloc_zone_malloc + 71
    frame #2: 0x00007fff8b48427c libsystem_malloc.dylib`malloc + 42
    frame #3: 0x00007fff9138736e libc++abi.dylib`operator new(unsigned long) + 30
    frame #4: 0x000000010178394d libwx_osx_cocoau_core-3.0.dylib`wxStockGDI::GetFont(wxStockGDI::Item) + 349
    frame #5: 0x00000001016b2bd7 libwx_osx_cocoau_core-3.0.dylib`wxSystemSettingsNative::GetFont(wxSystemFont) + 71
    frame #6: 0x0000000101783936 libwx_osx_cocoau_core-3.0.dylib`wxStockGDI::GetFont(wxStockGDI::Item) + 326
    frame #7: 0x0000000101783961 libwx_osx_cocoau_core-3.0.dylib`wxStockGDI::GetFont(wxStockGDI::Item) + 369

... Repeats 2.6 gazillion times

    frame #52345: 0x0000000101783961 libwx_osx_cocoau_core-3.0.dylib`wxStockGDI::GetFont(wxStockGDI::Item) + 369
    frame #52346: 0x00000001016b2bd7 libwx_osx_cocoau_core-3.0.dylib`wxSystemSettingsNative::GetFont(wxSystemFont) + 71
    frame #52347: 0x0000000101783936 libwx_osx_cocoau_core-3.0.dylib`wxStockGDI::GetFont(wxStockGDI::Item) + 326
    frame #52348: 0x0000000101783961 libwx_osx_cocoau_core-3.0.dylib`wxStockGDI::GetFont(wxStockGDI::Item) + 369
    frame #52349: 0x00000001016b2bd7 libwx_osx_cocoau_core-3.0.dylib`wxSystemSettingsNative::GetFont(wxSystemFont) + 71
    frame #52350: 0x0000000101783936 libwx_osx_cocoau_core-3.0.dylib`wxStockGDI::GetFont(wxStockGDI::Item) + 326
    frame #52351: 0x0000000101783961 libwx_osx_cocoau_core-3.0.dylib`wxStockGDI::GetFont(wxStockGDI::Item) + 369
    frame #52352: 0x00000001016b2bd7 libwx_osx_cocoau_core-3.0.dylib`wxSystemSettingsNative::GetFont(wxSystemFont) + 71
    frame #52353: 0x00000001018227dc libwx_osx_cocoau_core-3.0.dylib`wxWindowBase::GetClassDefaultAttributes(wxWindowVariant) + 108
    frame #52354: 0x00000001016549b4 libwx_osx_cocoau_core-3.0.dylib`wxWindowBase::GetDefaultAttributes() const + 20
    frame #52355: 0x0000000101822581 libwx_osx_cocoau_core-3.0.dylib`wxWindowBase::GetForegroundColour() const + 161
    frame #52356: 0x000000010165b301 libwx_osx_cocoau_core-3.0.dylib`wxWindow::MacUpdateControlFont() + 81
    frame #52357: 0x000000010165b47a libwx_osx_cocoau_core-3.0.dylib`wxWindow::SetFont(wxFont const&) + 26
    frame #52358: 0x000000010165505a libwx_osx_cocoau_core-3.0.dylib`wxNonOwnedWindow::Create(wxWindow*, int, wxPoint const&, wxSize const&, long, wxString const&) + 458
    frame #52359: 0x0000000101658031 libwx_osx_cocoau_core-3.0.dylib`wxTopLevelWindowMac::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) + 49
    frame #52360: 0x0000000100020b99 OpenCPN`MyFrame::MyFrame(wxFrame*, wxString const&, wxPoint const&, wxSize const&, long) [inlined] wxString::wxString(this=0x0000000101f2f608, this=0x0000000101f2f608, this=<unavailable>, psz=<unavailable>, hint=<unavailable>, id=<unavailable>, name=0x0000000101f2f608) + 91 at frame.h:35
    frame #52361: 0x0000000100020b3e OpenCPN`MyFrame::MyFrame(this=0x000000010381e800, frame=<unavailable>, title=<unavailable>, pos=<unavailable>, size=<unavailable>, style=<unavailable>) + 46 at chart1.cpp:2507
    frame #52362: 0x000000010000d675 OpenCPN`MyApp::OnInit(this=0x0000000102923090) + 18853 at chart1.cpp:1912
    frame #52363: 0x000000010164ef8e libwx_osx_cocoau_core-3.0.dylib`wxApp::CallOnInit() + 158
    frame #52364: 0x000000010147ef4f libwx_baseu-3.0.dylib`wxEntry(int&, wchar_t**) + 47
    frame #52365: 0x0000000100007a84 OpenCPN`main(argc=1, argv=<unavailable>) + 20 at chart1.cpp:793
    frame #52366: 0x0000000100005f04 OpenCPN`start + 52
My lunch pause is over, will get back to it later.

Pavel
__________________
nohal is online now   Reply With Quote
Old 23-10-2014, 16:55   #39
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,884
Re: Building OCPN on OS X

Pavel....

I occasionally find it useful to

$rm /Users/dsr/tmp/bin/*

before $cmake install.

I think what happens is the $make install just adds stuff into the app bundle, rather than starting from scratch.

Remember a couple of Betas back where the dmg had old wx2.9 dylibs in there for no good reason?

Anyway, the terminal output of "$make install" should show what is being bundled into the app, and in what order.

Dave
__________________

__________________
bdbcat is online now   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
Wood That Won't Warp For Building Entire Kitchen Counter, and Advice On Building Hatc albergsailor Monohull Sailboats 30 25-09-2012 10:15
How to use MMR2-C-Map card reader with OCPN ? Flemming Torp OpenCPN 6 28-05-2012 09:39
Pictures of OCPN in action. cagney OpenCPN 0 03-04-2012 10:16
Furuno and OCPN KrisCatteceur Navigation 2 12-01-2012 14:04
Does OCPN support NMEA 0183 v3.1? Netsurfer OpenCPN 5 25-05-2010 08:42



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 10:27.


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.