Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 24-05-2010, 18:45   #1
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
CMake and Other Cross-Platform Issues

Hello....

We are going to try to move away from the gnu automake/conf tools and over to cmake as our primary build configurator.

I have committed to CVS a working version of CMakeLists.txt and supporting files. Thanks so much to sethdart for his pioneering work here.

Have a look at this thread/post for more info on the operation of cmake.

OpenCPN Version 2.1.0 Beta


My experiences:
linux: cmake 2.8.1 was fiddly to install, best approach was to use the "bootstrap" method. Running cmake and resulting build on Ubuntu was flawless.

Windows: installing cmake 2.8.1 is trivial; download the Windows installer .exe and it just works fine. Running cmake and building in VS2005 was a little fussy. The wxWidgets libraries need to have been built with the same runtime library model as is specified in the opencpn VS project built by cmake. I setup the cmake source to use /MD(release) or /MDd(debug) for the runtime library. YMMV.

Comments from cmake mavens encouraged. This is my first major project experience with it. I'm sure the script will need tweaking....

Comments Welcome
Dave
__________________

__________________
bdbcat is online now   Reply With Quote
Old 24-05-2010, 20:14   #2
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Dave,

Can not find VERSION.cmake it seems to be missing.

CMake Error at CMakeLists.txt:30 (INCLUDE): include could not find load file:
C:/devmnt/opencpn/VERSION.cmake

Paul
__________________

__________________
Viking Sailor is offline   Reply With Quote
Old 24-05-2010, 20:28   #3
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Viking Sailor....

Fixed in CVS

Thanks
Dave
__________________
bdbcat is online now   Reply With Quote
Old 24-05-2010, 22:09   #4
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Dave,

Cmake seems to work. It completed successfully. Did a build in VC and that also worked. How can I be sure that Cmake is working correctly,

Paul
__________________
Viking Sailor is offline   Reply With Quote
Old 25-05-2010, 08:31   #5
Registered User

Join Date: Mar 2010
Location: Göteborg, Sweden
Boat: Seamaster 700
Posts: 96
Send a message via Skype™ to balp
Quote:
Originally Posted by bdbcat View Post
linux: cmake 2.8.1 was fiddly to install, best approach was to use the "bootstrap" method. Running cmake and resulting build on Ubuntu was flawless.
I use the Ubuntu package with great success, just sudo apt-get install cmake

Started to get working, cdash site for OpenCPN.

CDash - OpenCPN

Every five minutes the cvs is checked and if a file is changed a build will be done on my Ubuntu 10.04-x86 machine. I wil set up the 64 bit version soonish and a instruktiv how to run your own build server.
__________________
balp is offline   Reply With Quote
Old 25-05-2010, 09:18   #6
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Balp....

Thanks for the input.
I run Ubuntu 8.04. If I do apt-get on cmake, I get Version 2.4.something.

README for 2.8.1 says that 2.4 cmake should configure and make 2.8.1 in-situ. Didn't work for me, due to confusion over /usr and /usr/local.

So, I killed all of 2.4, and did the bootstrap. Worked fine.

Dave
__________________
bdbcat is online now   Reply With Quote
Old 25-05-2010, 12:48   #7
Registered User

Join Date: Mar 2010
Location: Göteborg, Sweden
Boat: Seamaster 700
Posts: 96
Send a message via Skype™ to balp
Quote:
Originally Posted by bdbcat View Post
README for 2.8.1 says that 2.4 cmake should configure and make 2.8.1 in-situ. Didn't work for me, due to confusion over /usr and /usr/local.
I think the cmake files are 2.6 safe, i think that came in 9.04 to ubuntu. I have not yet tested on 2.6 cmake thou.
__________________
balp is offline   Reply With Quote
Old 26-05-2010, 11:03   #8
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Dave,

Trying to get Cmake working on XP. Please help with this:

1>------ Build started: Project: i18n, Configuration: Debug Win32 ------
1>i18n [opencpn_sv_SE]: Created mo file.
1>'GETTEXT_MSGFMT_EXECUTABLE-NOTFOUND' is not recognized as an internal or external command,
1>operable program or batch file.
1>Project : error PRJ0019: A tool returned an error code from "i18n [opencpn_sv_SE]: Created mo file."
1>Build log was saved at "file://c:\devmnt\opencpn\buildwin\i18n.dir\Debug\BuildLog .htm"
1>i18n - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 7 up-to-date, 0 skipped ==========

Thanks,

Paul
__________________
Viking Sailor is offline   Reply With Quote
Old 26-05-2010, 11:46   #9
Registered User

Join Date: Mar 2010
Location: Göteborg, Sweden
Boat: Seamaster 700
Posts: 96
Send a message via Skype™ to balp
Quote:
Originally Posted by Viking Sailor View Post
Dave,

Trying to get Cmake working on XP. Please help with this:

1>------ Build started: Project: i18n, Configuration: Debug Win32 ------
1>i18n [opencpn_sv_SE]: Created mo file.
1>'GETTEXT_MSGFMT_EXECUTABLE-NOTFOUND' is not recognized as an internal or external command,
1>operable program or batch file.
Looks like gettext is missing, I was sure that was supposed to be optional.

GetText for Windows

Holds a windows port, The path may have to be specified. Not all familiar with the currect version of the cmake files.
__________________
balp is offline   Reply With Quote
Old 26-05-2010, 11:47   #10
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Talking

Viking

Read this post OpenCPN Version 2.1.0 Beta
A bit down you'll find links to "gettext" for windows.
Your error messages indicates that you probably don't have gettext installed.

Thomas

PS It wasn't me putting the smiley in the upper left corner......this is serious business! (can't get rid of the thing).
__________________
cagney is offline   Reply With Quote
Old 26-05-2010, 12:40   #11
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Guy's,

Thanks for the help. I think that "GETTEXT_MSGFMT_EXECUTABLE-NOTFOUND" is a script. Don't see it in CVS. Will wait for Dave's input on how he wants to resolve this.

Thanks again,

Paul


__________________
Viking Sailor is offline   Reply With Quote
Old 26-05-2010, 18:29   #12
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 4,883
Viking Sailor....

OK, got this sorted out. The cmake script did not gracefully handle the case where gettext package is not available. Fixed in CVS.

Please note that if you have no gettext in Windows, then of course the application messages will all be in English. But it should run sensibly.

Also a note on cmake: Don't forget to "delete the cmake cache" when you add dependent packages like gettext. cmake does not automatically scan for changes in this kind system utility with each run.

Thanks, and good luck
Dave
__________________
bdbcat is online now   Reply With Quote
Old 26-05-2010, 22:00   #13
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Dave,

I added gettext after the first time I did a build. Didn't rerun Cmake after adding gettext. The build now works. A small point -- VC asked for the location of opencpn.exe when starting debugging the first time. It would nice for the new tester if Cmake could tell VC where the executable is located.

Thanks,

Paul
__________________
Viking Sailor is offline   Reply With Quote
Old 27-05-2010, 05:11   #14
Registered User
 
Viking Sailor's Avatar

Join Date: Nov 2006
Location: San Francisco Bay
Boat: Fantasia 35 - s/v Feeling Good
Posts: 1,074
Dave,

A quick note about using Cmake on XP. It works!

I was able to updated to 526a with no problems. Used TortoiseCVS to update the OpenCPN files. Ran Cmake to update the VC project files. Built the debug version of 526a using VC. Have started testing using the VC debugger. So far everything is working great.

Here is a list of the software that needed to be installed:
1) MSVC free C++ compiler - Download details: Visual Studio 2008 Express Editions with SP1
2) TortoiseCVS: Download
3) GetText for Windows
4) Cmake for Windows - http://www.cmake.org/cmake/resources/software.html

Thank you for your hard work and help,

Paul
__________________
Viking Sailor is offline   Reply With Quote
Old 27-05-2010, 08:24   #15
Registered User

Join Date: Oct 2009
Location: Lelystad, The Netherlands
Boat: vd Stadt 44, Ben the Boat
Posts: 195
Quote:
Built the debug version of 526a using VC. Have started testing using
the VC debugger.
Paul,

Are you able to compile for release? I'm able to do the exact same thing, running VS 2010 in debug. I'm not able to compile in release yet. A VSProject file like in the build\msw directory compiles in debug as well in release

Bart
__________________

__________________
champ8242 is offline   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
Swim Platform - Pro & Con vldevin Monohull Sailboats 19 23-08-2009 18:05
Swim Platform mparent Auxiliary Equipment & Dinghy 1 09-08-2009 15:09
Boom Crane and aft platform Palarran Multihull Sailboats 20 09-09-2008 15:06
swim platform for dog Rastarea Families, Kids and Pets Afloat 10 04-09-2008 18:12
Morgan swim platform neilj36 Auxiliary Equipment & Dinghy 3 12-08-2008 06:07



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

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


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.