Cruisers Forum
 


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 05-04-2012, 18:25   #1
Registered User
 
sbfreddie's Avatar

Join Date: Mar 2012
Location: Southern Texas, Port Isabel
Boat: I Wish
Posts: 175
Images: 1
Send a message via Skype™ to sbfreddie
Building OpenCPN on Mac

Hi All:
Do you know who wrote the cmake script to build OpenCPN? I have a question about pointing the find wxWidgets to another location than is being pointed to now. I also would like to point GTK2 to a different location also.
I believe the varying problems I see with the various Macs I've seen on the forums is that they all have different wxWidgets, because the system all have different versions of wxWidgets mostly pretty old. The most recent being on Mac OS 10.6.8 which is 2.8.8. On Mac OS 10.7 and above the system does not come with wxWidgets so in order to build it you have to install your own. There are also a huge amount of variables when building wxWidgets also.
I believe the Linux people are using 2.9.3.

TIA,
freddie
sbfreddie is offline   Reply With Quote
Old 05-04-2012, 20:29   #2
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,396
Re: Building OpenCPN on Mac

sbfreddie....

I wrote most of CMakeLists.txt

How can I help you?

Dave
bdbcat is online now   Reply With Quote
Old 05-04-2012, 22:05   #3
Registered User

Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
Posts: 96
Send a message via Skype™ to balp
Re: Building OpenCPN on Mac

Quote:
Originally Posted by sbfreddie View Post
Hi All:
Do you know who wrote the cmake script to build OpenCPN? I have a question about pointing the find wxWidgets to another location than is being pointed to now. I also would like to point GTK2 to a different location also.
I believe the varying problems I see with the various Macs I've seen on the forums is that they all have different wxWidgets, because the system all have different versions of wxWidgets mostly pretty old. The most recent being on Mac OS 10.6.8 which is 2.8.8. On Mac OS 10.7 and above the system does not come with wxWidgets so in order to build it you have to install your own. There are also a huge amount of variables when building wxWidgets also.
I believe the Linux people are using 2.9.3.

TIA,
freddie
It used the wxConfig command, make the custom one first in the path. I think it's the same for gtk but i have not had to customize they ever.
balp is offline   Reply With Quote
Old 06-04-2012, 12:38   #4
Registered User
 
sbfreddie's Avatar

Join Date: Mar 2012
Location: Southern Texas, Port Isabel
Boat: I Wish
Posts: 175
Images: 1
Send a message via Skype™ to sbfreddie
Re: Building OpenCPN on Mac

What I would like to do is redirect Cmake find_package to my wxWidgets and GTK2 locations first and default to the systems locations last. When I build OpenCPN with Xcode I get 87 warnings about using depricated carbon lib functions.
When I build and install the plugins, when I open the dashboard plugin nothing shows up in the plugin and when I close the window OpenCPN crashes. The backtrace shows a bad system call in wxWidgets. This is why I believe many of the problems are related to wxWidgets for crashes on the Mac.

Perhaps OpenCPN should be be built with static libraries so that they will be included with the executable when downloading the App.

TIA,
Freddie
sbfreddie is offline   Reply With Quote
Old 06-04-2012, 13:36   #5
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,396
Re: Building OpenCPN on Mac

sbfreddie....

OK, sounds like a good plan.

Your best solution may be to build custom versions of the CMake modules which find wxWidgets and GTK2, and invoke them by conditional statements in CMakeLists, applicable only to Mac and/or specific versions of Mac system.

These custom modules could become a part of the OpenCPN distribution if they do the job.

We all would be happy to read your code changes and comment as you make progress.

Sadly, we can't use static linking for any platform, as the PlugIn system depends on dynamic linking at run-time.

Good Luck
Dave
bdbcat is online now   Reply With Quote
Old 06-04-2012, 16:34   #6
Registered User
 
sbfreddie's Avatar

Join Date: Mar 2012
Location: Southern Texas, Port Isabel
Boat: I Wish
Posts: 175
Images: 1
Send a message via Skype™ to sbfreddie
Re: Building OpenCPN on Mac

Dave:
Thanks for the suggestions, this will take some time as I do know much about Cmake so I will have to study up to see if I can figure out how to do this, any ideas about a good tutorial regard what I need to do?

I am building a bash script to build and install all the relevant pieces that are needed to build OpenCPN, however it sure would be helpful if I knew exactly which pieces I need instead of just building everything under the sun in wxWidgets and GTK2.

I have some homework to do.

Thanks,
Freddie
sbfreddie is offline   Reply With Quote
Old 07-04-2012, 00:20   #7
Registered User

Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
Posts: 96
Send a message via Skype™ to balp
Re: Building OpenCPN on Mac

I updated the macbuikld list, on the opencpn.org page GTK isn't needed.
The Cmake script used the wx-config that its first in your path to find the installed wxWidgets,

if you compile an own version of wvWidgets, make sure you add it's binary directory first to you path environment they run cmake and it will be used. There is no need to change anything permanent.


just do:

Code:
mkdir build_osx
cd build_osx
env PATH=/Users/someone/xwwidgets/bin/:$PATH cmake ..
make
balp is offline   Reply With Quote
Old 07-04-2012, 00:27   #8
Registered User

Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
Posts: 96
Send a message via Skype™ to balp
Re: Building OpenCPN on Mac

Quote:
Originally Posted by sbfreddie View Post
What I would like to do is redirect Cmake find_package to my wxWidgets and GTK2 locations first and default to the systems locations last. When I build OpenCPN with Xcode I get 87 warnings about using depricated carbon lib functions.
I think you need to used wxWidgets with the flags:

--with-osx_cocoa
--with-macosx-sdk=/Developer/SDKs/MacOSX10.7.sdk
--with-macosx-version-min=10.7

Maybe 10.7 is a bit new, and it can be moved down a bit


Have a look at:

http://opencpn.org/ocpn/compiling_source_mac

I made a working build to 10.7 with newest wxWidgets. It needed a few patches that i have submitted.
balp is offline   Reply With Quote
Old 07-04-2012, 17:24   #9
Registered User
 
sbfreddie's Avatar

Join Date: Mar 2012
Location: Southern Texas, Port Isabel
Boat: I Wish
Posts: 175
Images: 1
Send a message via Skype™ to sbfreddie
Re: Building OpenCPN on Mac

I do not use Mac OS 10.7 (Lion). It is 64 bit only and most of my apps are not compatible. I believe many of the people using OpenCPN are on 10.5 or 10.6 so an app compiled for Lion will not work. Any distributable version of OpenCPN should be at least compiled for 32bit and 64bit systems, also known as a FAT binary.
I will try your suggestions on 10.6.8 (Snow Leopard) and see how they work.

Thanks,
Freddie
sbfreddie is offline   Reply With Quote
Reply

Tags
opencpn


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
Shoestring Sailors (Cruising on $500 per month - part II) David_Old_Jersey General Sailing Forum 1416 14-03-2020 09:37
Bikers on Board ? hoppy Fishing, Recreation & Fun 218 13-03-2016 16:26
OpenCPN and multiple PCs yonubear OpenCPN 2 05-04-2012 16:35
Safety on Board ulpilot45 Health, Safety & Related Gear 60 04-04-2012 18:23
Can You Sail (only) On This ? scoobert Powered Boats 54 04-04-2012 18:15

Advertise Here


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


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.