Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-11-2015, 01:50   #16
Registered User

Join Date: Feb 2012
Location: San Diego, CA
Boat: Cape George 36
Posts: 77
Images: 3
Re: Building OpenCPN on OSX-10.10 (Yosemite)

Quote:
Originally Posted by nohal View Post
Doesn't work what? I'm building OpenCPN all the time following it and see no failure.
OK, fine. I built yet another copy of wxwidgets 3.0.2. Although this seems superfluous as the brew default arguments are pretty much the same as the ones on the instructions page. Specifically

Code:
"--disable-debug",
      "--prefix=#{prefix}",
      "--enable-unicode",
      "--enable-std_string",
      "--enable-display",
      "--with-opengl",
      "--with-osx_cocoa",
      "--with-libjpeg",
      "--with-libtiff",
      # Otherwise, even in superenv, the internal libtiff can pick
      # up on a nonuniversal xz and fail
      # https://github.com/Homebrew/homebrew/issues/22732
      "--without-liblzma",
      "--with-libpng",
      "--with-zlib",
      "--enable-dnd",
      "--enable-clipboard",
      "--enable-webkit",
      "--enable-svg",
      "--enable-graphics_ctx",
      "--enable-controls",
      "--enable-dataviewctrl",
      "--with-expat",
      "--with-macosx-version-min=#{MacOS.version}",
      "--enable-universal_binary=#{Hardware::CPU.universal_archs.join(",")}",
      "--disable-precomp-headers",
      # This is the default option, but be explicit
      "--disable-monolithic"
But fine...I built a local copy following the directions exactly, regenerated the XCode project...and I still get the same error in S57ENC cpl_error.h

Code:
void CPL_DLL CPLError(CPLErr eErrClass, int err_no, const char *fmt, ...)  CPL_PRINT_FUNC_FORMAT (3, 4);
Expected function body after declarator

RE: iPad
Quote:
Originally Posted by nohal View Post
It sure would, it is a shame that it is not possible to get any GPL licensed software on it and as such any development effort in this direction is a waste of time.
How so? If I make my source code available I don't see the problem.
__________________

__________________
AuroraGH is offline   Reply With Quote
Old 03-11-2015, 02:34   #17
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: Building OpenCPN on OSX-10.10 (Yosemite)

Quote:
Originally Posted by AuroraGH View Post
RE: iPad
How so? If I make my source code available I don't see the problem.
You will only be able to install the program at a yailbreaked iPad and not via the App Store because Apple will not allow it.

For your errors in building the static library libS57ENC.a I can't help you because I use SDK 10.11 and wxWidgets 3.1 with Xcode 7.1.

Gerhard
__________________

__________________
CarCode is offline   Reply With Quote
Old 03-11-2015, 02:48   #18
Registered User

Join Date: Feb 2012
Location: San Diego, CA
Boat: Cape George 36
Posts: 77
Images: 3
Re: Building OpenCPN on OSX-10.10 (Yosemite)

Quote:
Originally Posted by CarCode View Post
You will only be able to install the program at a yailbreaked iPad and not via the App Store because Apple will not allow it.
No, you can install anything you like on your own device as long as you compile it from source. Jailbreaking not required. Apple store is another matter but it could be put on Cydian.

It is kind of disheartening that it is GPL's instead of MIT'd though. I mean - OpenCPN gets benefits from including code from MIT/BSD code from GDAL and OpenGIS and then adds more restrictions via GPL. Very not cool I think.

Anyhow I think I'm wasting my time with this project - I try it about every year or so and every year it just doesn't work and nobody can help me make it work and its invariably some stupid Windowsism that is hosing the build.

I think I'll probably give up and move on to Freeboard which looks like it has several advantages - not least of which is cheaper open source hardware, lower power requirements, and a clean separation of UI and services (UI runs in a browser).
__________________
AuroraGH is offline   Reply With Quote
Old 03-11-2015, 03:16   #19
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,314
Re: Building OpenCPN on OSX-10.10 (Yosemite)

AuroraGH why not use Carcode setup? We need good Mac programmers! and I think you'd like opencpn on ipad, but would improve it.
__________________
rgleason is offline   Reply With Quote
Old 03-11-2015, 03:33   #20
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
Re: Building OpenCPN on OSX-10.10 (Yosemite)

Quote:
Originally Posted by rgleason View Post
AuroraGH why not use Carcode setup? We need good Mac programmers! and I think you'd like opencpn on ipad, but would improve it.
Forget it, he is not a Mac programmer reading his comments...

Gerhard
__________________
CarCode is offline   Reply With Quote
Old 03-11-2015, 16:14   #21
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,877
Re: Building OpenCPN on OSX-10.10 (Yosemite)

AuroraGH...

Regarding the build troubles with

Code:
void CPL_DLL CPLError(CPLErr eErrClass, int err_no, const char *fmt, ...)  CPL_PRINT_FUNC_FORMAT (3, 4);
It looks to me as though you are trying to build with a wrong version of GDAL. OpenCPN uses a private GDAL port, whose source is all in our tree. The current public GDAL release is not needed for OpenCPN.

Why did we do this, you ask? Because at the time we needed it (ca 2006), GDAL had lots of troubles that affected us directly. If we wanted to use it, we had to fix it and bundle it with OCPN. So we did.

For reference, the string

Code:
CPL_PRINT_FUNC_FORMAT
does not appear in the OCPN code base. But it is in the current public GDAL sources. GDAL: cpl_port.h Source File

So, check your include file directories, especially for things like "cpl_port.h"

Good luck, and keep us posted.
Dave
__________________
bdbcat is offline   Reply With Quote
Old 03-11-2015, 21:09   #22
Registered User

Join Date: Feb 2012
Location: San Diego, CA
Boat: Cape George 36
Posts: 77
Images: 3
Re: Building OpenCPN on OSX-10.10 (Yosemite)

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

Regarding the build troubles with

Code:
void CPL_DLL CPLError(CPLErr eErrClass, int err_no, const char *fmt, ...)  CPL_PRINT_FUNC_FORMAT (3, 4);
It looks to me as though you are trying to build with a wrong version of GDAL.

Good luck, and keep us posted.
Dave
Bam! That was it. I had an old install of GDAL installed by homebrew from building PostGIS awhile ago and I forgot about it. Thanks so much.
__________________
AuroraGH is offline   Reply With Quote
Old 04-11-2015, 16:44   #23
Registered User

Join Date: Apr 2015
Location: San Francisco
Posts: 65
Re: Building OpenCPN on OSX-10.10 (Yosemite)

Does this mean that you have it working?

I've updated the Developer Manual as I've learned more, and AFAIK if you follow the directions exactly "it just works." This includes building with Xcode, though I haven't figured out how to build the install package from Xcode. When I was working on the manual ~6 months ago I didn't find a MacPorts or Homebrew version of wxWidgets 3.0.2 that had all of the bug fixes OpenCPN required. Perhaps there's something newer that would eliminate building from source. I don't have a dog in the homebrew vs macports battle - they both seem to work.

My most common errors are forgetting to set the target environment to 10.7 and forgetting to reinstall the 10.7 SDK after a Xcode upgrade/reinstall.

It would be great to have an iOS version - Apple now supports signing apps for your own use - but I think the wxWidgets dependency might be hard to overcome.
__________________
fogmachine is offline   Reply With Quote
Old 04-11-2015, 17:51   #24
Registered User

Join Date: Feb 2012
Location: San Diego, CA
Boat: Cape George 36
Posts: 77
Images: 3
Re: Building OpenCPN on OSX-10.10 (Yosemite)

Quote:
Originally Posted by fogmachine View Post
Does this mean that you have it working?
....
It would be great to have an iOS version - Apple now supports signing apps for your own use - but I think the wxWidgets dependency might be hard to overcome.
I have it working.

I was a bit disappointed at first to see wxEverything littered in all the non-UI code. If we want to do a nice iOS UI, wx is kind of in the way. I can kind of see why it was done - the strings and collections are decent and easy to use although in almost every case the stl components would have been just as good and easy to use. In fact I tried building a lot of libraries by tossing in a #define wxString std::string and it mostly worked.

Anyhow, I spent the day digging into just what the available build options for wxKitchenSink are and it turns out that there is a compile option that will just build the core types without any UI and make a nice static library. --with-iphone and --disable-gui seem to be the keys here. So...for grins I added an iOS target and a MacCPN target that excludes all the OpenCPN classes that have wxGUI files and uses a standard storyboard.

I'm still trying to figure out a nice way to have both wx libraries (minimal iOS and regular OSX) on my machine without conflicts.

Anyhow...it does look possible. I've been playing with Freeboard (Freeboard [MeshCMS]) a little bit too. It has kind of a different approach and I like the DIY arduino instruments. Less psyched about the web browser viewer and am wondering if I can build a UI on a Raspberry Pi using Pharo Smalltalk instead of using the browser.
__________________
AuroraGH is offline   Reply With Quote
Old 01-12-2015, 14:45   #25
Registered User

Join Date: Feb 2012
Location: San Diego, CA
Boat: Cape George 36
Posts: 77
Images: 3
Re: Building OpenCPN on OSX-10.10 (Yosemite)

FWIW...the latest pull of the top of wxWidgets produces a build versioned 3.1 rather than 3.0.2. wxWidgets.org does not list this as an 'official' build. However if you check out that source code and just build it with the line

../configure --enable-unicode --enable-aui --disable-debug --enable-opengl --without-liblzma

Then create the xcode project (or open the project file and replace 3.0 with 3.1 everywhere), the project builds just fine and you don't need to go digging up the 10.7 sdk.

Simpler.

Now if we could just decouple the UI and do a proper native one so the toolbar didn't float over all the other apps all the time, we'd be making some serious progress. Also, it would be nice if it was actually attached to the window rather than chasing it around the screen.

One thing at a time I guess...
__________________

__________________
AuroraGH is offline   Reply With Quote
Reply

Tags
enc, opencpn

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
OpenCPN and Mac OSX mskl OpenCPN 9 27-03-2014 09:41
OpenCPN does not see STM32 virtual port in MAC OSX GREENGHOST OpenCPN 9 24-02-2014 13:40
Cannot open OpenCPN 3.2.2.dmg in OSX 10.6.8 gijiw OpenCPN 5 05-12-2013 16:49
OpenCPN 2.5 (Mac OSX) Crashes on Start Up ? farmerboy OpenCPN 4 31-12-2011 05:55
OpenCPN on Mac OSX 10.7 (Lion) jeroen OpenCPN 1 11-10-2011 10:16



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 23:43.


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.