 |
05-04-2012, 19:25
|
#1
|
Registered User
Join Date: Mar 2012
Location: Southern Texas, Port Isabel
Boat: I Wish
Posts: 175
|
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
|
|
|
05-04-2012, 21:29
|
#2
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,711
|
Re: Building OpenCPN on Mac
sbfreddie....
I wrote most of CMakeLists.txt
How can I help you?
Dave
|
|
|
05-04-2012, 23:05
|
#3
|
Registered User
Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
Posts: 96
|
Re: Building OpenCPN on Mac
Quote:
Originally Posted by sbfreddie
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.
|
|
|
06-04-2012, 13:38
|
#4
|
Registered User
Join Date: Mar 2012
Location: Southern Texas, Port Isabel
Boat: I Wish
Posts: 175
|
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
|
|
|
06-04-2012, 14:36
|
#5
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,711
|
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
|
|
|
06-04-2012, 17:34
|
#6
|
Registered User
Join Date: Mar 2012
Location: Southern Texas, Port Isabel
Boat: I Wish
Posts: 175
|
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
|
|
|
07-04-2012, 01:20
|
#7
|
Registered User
Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
Posts: 96
|
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
|
|
|
07-04-2012, 01:27
|
#8
|
Registered User
Join Date: Mar 2010
Location: Svanesund, Orust, Sweden
Boat: Forgus 31
Posts: 96
|
Re: Building OpenCPN on Mac
Quote:
Originally Posted by sbfreddie
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.
|
|
|
07-04-2012, 18:24
|
#9
|
Registered User
Join Date: Mar 2012
Location: Southern Texas, Port Isabel
Boat: I Wish
Posts: 175
|
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
|
|
|
 |
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|