Board index FlightGear Development Google Summer of Code

Anyone trying to build FlightGear using CMake?  Topic is solved

Project proposals, student applications and all related discussions.

Anyone trying to build FlightGear using CMake?

Postby tprk » Fri Aug 20, 2010 12:08 pm

Hi,
I'm trying to build FlightGear by using CMake on Windows XP. (trying to compose a solution file to be used on Visual Studio 2008 Express Edition). Until now, I composed CMakeLists.txt files of the whole solution (includes many projects such as FlightGear, SimGear, fgadmin, fgviewer etc.) but I couldn't build solution yet.
I mean, I can "configure" successfully on CMake, then open that just created solution file using VS2008, the soution explorer displays all source codes of all projects.
But when i try to build solution, it gives me lots lots of errors like
..\src\FDM\YASim\YASim.cxx(6): Fatal error cannot open include file: "simgear/debug/logstream.hxx" No such a file or directory (this is just an example, not a specific one)

How can i handle this errors? What are the commands that i should use in CMakeLists.txt files to get rid of these errors?
(By the way, I add SimGear and FlightGear as libraries by "add_library" command, not by "add_executable".)
Any help is appreciated.
--
tprk
tprk
 
Posts: 3
Joined: Sun Aug 15, 2010 9:49 pm

Re: Anyone trying to build FlightGear using CMake?

Postby Hooray » Mon Sep 06, 2010 2:43 pm

tprk wrote:Hi,
I'm trying to build FlightGear by using CMake on Windows XP. (trying to compose a solution file to be used on Visual Studio 2008 Express Edition). Until now, I composed CMakeLists.txt files of the whole solution (includes many projects such as FlightGear, SimGear, fgadmin, fgviewer etc.) but I couldn't build solution yet.
I mean, I can "configure" successfully on CMake, then open that just created solution file using VS2008, the soution explorer displays all source codes of all projects.
But when i try to build solution, it gives me lots lots of errors like
..\src\FDM\YASim\YASim.cxx(6): Fatal error cannot open include file: "simgear/debug/logstream.hxx" No such a file or directory (this is just an example, not a specific one)

How can i handle this errors?

These are actually fairly trivial errors - you probably simply missed to set up the include paths properly, in this case apparently for simgear.
If you really want get good support, you should be as specific as possible, though.

What are the commands that i should use in CMakeLists.txt files to get rid of these errors?
Any help is appreciated.


Personally, I think the idea to port the autotools based FG build system to cmake is really good.

This will probably make things much easier for building FlightGear on different platforms (Win, Linux, Mac) and for keeping things up to date and in sync - that is exactly the thing that cmake is indeed very good at.

However, the nature of your questions makes me believe that you will either need to do a lot of reading first, or that you should forget about doing that yourself.

All of the questions you have raised could have been answered by reading either the cmake documentation, or by searching the FlightGear mailing lists.

While building FlightGear is certainly far from trivial, porting the whole FG build system to cmake should be ideally done by someone who at least understands cmake reasonably well and who is able to build FG with the conventional tools and systems.

Please don't get me wrong, I still think that the whole idea is great, and that this is the right thing to do for FlightGear in the long run, but given your questions I simply don't think you are currently up to the task of doing this on your own without reading up on cmake and FlightGear build instructions first.

Internally, cmake will still fall back to the platform specific build system - it is merely an abstraction wrapper for different platforms and operating systems.
The errors you have reported are easy to fix, these are typical errors that you get if you fail to set up dependencies properly - regardless of the build system being used. For cmake specifics, you will probably want to refer to the cmake FAQ, manual or mailing lists. And th FlightGear wiki,forums and mailing lists provide very good help for anything FlightGear related.

If you are totally new to cmake and/or FlightGear, this is a VERY ambitious project, and it would be far easier to either start building FlightGear using conventional means, or to learn cmake using a less complex project - FlightGear has a whole number of fairly complex dependencies that need to be satisfied in a specific build order.

If you are really interested in pursuing this, I would suggest to start a corresponding gitorious branch so that others can review, comment and fix things.
Having a wiki page for this effort would also probably be a very good idea, because it is likely that a cmake based build system for FlightGear will be of interest to many other users who might have issues building FG using conventional means.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 10751
Joined: Tue Mar 25, 2008 8:40 am

Re: Anyone trying to build FlightGear using CMake?

Postby Hooray » Fri Sep 24, 2010 3:20 pm

Just FYI: There are scripts that can handle a largely automated conversion from autotools to cmake syntax: http://www.paraview.org/Wiki/CMake#auto ... 2Fautoconf

This will probably still need lots of manual tweaking, though - still, it may at least get you started.
Most of the problems can certainly be resolved by referring to the FAQ, documentation or the mailing list.

However, personally I would suggest to start with simgear to get some hands on experience.
SimGear requires openal, plib, openscenegraph, boost and libjpeg

If you are still interested in this, I would suggest to clone the gitorious repository.
I am saying this, because I might be interested in contributing to this:

I am really convinced that a cmake based build system is the right thing for FlightGear, it's just a matter of getting started doing the whole conversion.
I am sure we can find other users to help with the conversion process.

If you take a look at the gitorious/fg history, you'll see that someone actually started a cmake port some time ago, only to delete the whole thing shortly after...
Last edited by Hooray on Sat Sep 25, 2010 4:11 am, edited 2 times in total.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 10751
Joined: Tue Mar 25, 2008 8:40 am

Re: Anyone trying to build FlightGear using CMake?

Postby zakalawe » Fri Sep 24, 2010 8:05 pm

Two comments - VS2008 projects files already exist! Along with some helpful instructions:http://gitorious.org/fg/flightgear/blobs/next/docs-mini/README.MSVC.

Secondly, a cmake build system has been proposed, and one of the lead developers would like it, but lacks the time - so it's still helpful to work on cmake, if you have some experience with it.
zakalawe
 
Posts: 1137
Joined: Sat Jul 19, 2008 4:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: Anyone trying to build FlightGear using CMake?

Postby Hooray » Sat Sep 25, 2010 3:47 am

a cmake build system has been proposed, and one of the lead developers would like it, but lacks the time - so it's still helpful to work on cmake, if you have some experience with it.


I also think porting the SG/FG build system to cmake would be an excellent and very worthwhile project.
Nowadays, building SG/FG and all the dependencies has become a fairly non trivial thing, meanwhile even on Linux systems.
And don't even let me start talk about building everything on Windows :-)

zakalawe wrote:Two comments - VS2008 projects files already exist! Along with some helpful instructions:http://gitorious.org/fg/flightgear/blobs/next/docs-mini/README.MSVC.


There are also scripted converters available for turning VS project files into CMakeLists:

http://www.paraview.org/Wiki/CMake#Visual_Studio

So I guess one could try to run both converters and then merge in the useful difference between the two scripts
And then there are also scripts that will try to analyze a source tree and propose a CMakeLists structure.

So I guess these three generators could be used to come up with a lot of what would initially be required, and then at some point it would probably be about reading FAQs, documentation and mailing list :-)

I am currently leaning towards moving this to the GSOC forum, so that we can add this as a GSOC project...

While 3 months time is a lot of time just for porting a build system, FG is cross platform software - and has a bunch of non trivial dependencies, so personally I can see this taking a while, especially for people not familiar with autotools, cmake, SG/FG and all the depedencies. But also if the project requires all build instructions to be updated accordingly (wiki).

There is also a pretty good article on KDE's decision to port their build system to cmake here: http://lwn.net/Articles/188693/

EDIT: I have added all that's been said here to the wiki now, in the form of a new GSOC project proposal, feel free to add your own input: http://wiki.flightgear.org/index.php/A_ ... FlightGear
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 10751
Joined: Tue Mar 25, 2008 8:40 am

Re: Anyone trying to build FlightGear using CMake?  

Postby fredb » Tue Feb 01, 2011 9:35 am

FYI the Cmake build system for SG/FG is operational now, even under Windows. No need for a student on that topic anymore.
User avatar
fredb
 
Posts: 756
Joined: Fri Dec 01, 2006 10:41 am
Location: Paris, France


Return to Google Summer of Code

Who is online

Users browsing this forum: No registered users and 1 guest