WARNING: MSVC, Linux and C::B build files being deleted!

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

WARNING: MSVC, Linux and C::B build files being deleted!

Post by sinbad »

CMake is proving to be very good indeed - OS X is still a bit of a problem (may be resolved later) but the other build environments are now pretty much superceded by the CMake work that's been done.

So, this is advance warning that I want to delete the native build systems for all other platforms (MSVC, Linux, Code::Blocks / MinGW) very soon, so that we can forget about updating them anymore (important when adding new projects or files). All that's really left with these is SDK building, but since we don't have to worry about SDKs for Cthugha immediately I think it's ok for this to be resolved after switching the day-to-day source building to CMake.

If anyone has any qualms about this - speak now! Otherwise, I'm going to delete the native build systems except for OS X in a few days.

I'd also appreciate it if anyone who has already tried the new CMake system would let me know how it's working for them, so I can feel happy it's going down ok - the more platforms / compilers the better.

Edit: the deletion process has started, see the end of the thrad for current status

User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by Kentamanos »

I haven't had time to play with CMake yet, but I think I understand the deal.

In the case of Visual Studio for instance, you're going to delete the .vcproj and .sln files. It will then be up to us to run CMake to create these files. Is that correct?

If that's the case, you might want to have someone throw a quick overview of CMake on wiki pages like: http://www.ogre3d.org/wiki/index.php/Bu ... rom_Source

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by sinbad »

Yep, that's the deal - you fire up CMake, change the options if you want, then tell it to generate a build system for you. Although it adds an extra step to using the source build, it makes it much easier to use alternate build options.

Yes, we'll definitely be updating the documentation :)

User avatar
steven
Gnoll
Posts: 657
Joined: Mon Feb 28, 2005 1:53 pm
Location: Australia - Canberra (ex - Switzerland - Geneva)
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by steven »

I understand the need to simplify maintenance.
But those tools seems to change and be over-seeded all the time by a new tool.

So my only complaint is that I dislike being forced to "Install Yet Another Tool" which until now systematically lead to "Learn This Supposedly Automatic Tool To Tweak or Use It Correctly".

Nevertheless in OGE we began using cmake.... but... a few days later we had a Linux user who didn't like it and gave us WAF files. So we decided in oge to simply support those compiler files that the developers use and those that are actively maintained by someone: vc80, vc90, cmake and waf for now :)

My 2 cents.

dermont
Orc Shaman
Posts: 785
Joined: Thu Dec 09, 2004 2:51 am
x 35

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by dermont »

On Linux it will be sad to see the autotool build files go, so configurable and easy to use, anyway a couple minor points on the cmake build:

* pkgconfig file CEGUI-OGRE.pc still not being installed
* it appears that OGRE_GCC_VISIBILITY and visibility flags are no longer automatically
detected and have to be manually defined, don't know if this is intentional.

Even manually setting the visibility flags the PCZTestApp demo build fails with undefined references. Probably a stray path/lib on my system but updating OgrePCZPrerequisites.h as per the rest of the plugins for visibility appears to resolve the build problem.

Code: Select all

#elif defined ( OGRE_GCC_VISIBILITY )
#    define _OgrePCZPluginExport  __attribute__ ((visibility("default")))
#else
#   define _OgrePCZPluginExport
#endif
Is there any particular reason the PCZSceneManager doesn't match the other plugins visibility settings?

Also it appears to resolve the runtime crash when including both the OctreeSceneManager and PCZ plugins in the config file.

User avatar
Chris Jones
Lich
Posts: 1742
Joined: Tue Apr 05, 2005 1:11 pm
Location: Gosport, South England
x 1

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by Chris Jones »

So my only complaint is that I dislike being forced to "Install Yet Another Tool" which until now systematically lead to "Learn This Supposedly Automatic Tool To Tweak or Use It Correctly".
I agree, i hate being forced to install more software than i have to, especially when it will only be used once. Also isn't it like putting all of your eggs in one basket? What if in the future it's stopped being maintained or a different/better tool comes out?

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by jacmoe »

@Steven, Chris Jones:
It's not like CMake will going to go away anytime soon. It's a pretty mature/established tool. :)
It's so much easier to tweak and tailor your build environment with it, than using premade build scripts (solution/projects).

@Dermont:
Right, so autotools are easy to use?
AFAIK, CMake generates a comfy autotools build environment for you on Linux, if you ask for it. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by sinbad »

steven wrote:So my only complaint is that I dislike being forced to "Install Yet Another Tool" which until now systematically lead to "Learn This Supposedly Automatic Tool To Tweak or Use It Correctly".
It's worth bearing in mind this only affects people using the source from SVN. The SDK will remain simple for those that want the non-flexible route, and I will probably generate a default build setup for the packaged source releases (which can be regenerated if you want with CMake)
Nevertheless in OGE we began using cmake.... but... a few days later we had a Linux user who didn't like it and gave us WAF files. So we decided in oge to simply support those compiler files that the developers use and those that are actively maintained by someone: vc80, vc90, cmake and waf for now :)
We've used multiple project systems for years and years now, and honestly, the larger the proect gets the more of a total pain in the ass it becomes. When you add a new library, that's at least 6 environments you have to replicate the setup in (ok, you can copy/paste the VC ones so long as you manually change the version number, but it's still a pain). Regularly contributors would only update a subset of the project files and someone else would have to plug the gap - it all adds overhead. The ability to centralise the setup is a vast improvement - if your project isn't that big yet and you're happy to manage it on an ad-hoc basis, go for it, but honesetly I'll jump at the chance to get rid of all this duplication.

Plus, I *hate* autotools ;) So damn esoteric, and all just for one platform.
dermont wrote:On Linux it will be sad to see the autotool build files go, so configurable and easy to use, anyway a couple minor points on the cmake build:
* pkgconfig file CEGUI-OGRE.pc still not being installed
* it appears that OGRE_GCC_VISIBILITY and visibility flags are no longer automatically
detected and have to be manually defined, don't know if this is intentional.
Obviously based on the above I won't miss the autotools one bit, but then that's because for they're just an overhead on a platform I don't use much ;) I'll need to ask CABAListic about this.
Is there any particular reason the PCZSceneManager doesn't match the other plugins visibility settings?

Also it appears to resolve the runtime crash when including both the OctreeSceneManager and PCZ plugins in the config file.
Only that no-one's noticed before (or mentioned it, or raised a patch ;) ). I'll get that fixed.
Also isn't it like putting all of your eggs in one basket? What if in the future it's stopped being maintained or a different/better tool comes out?
One of the benefits of CMake is that it's been around for a very long time, and is used by a lot of high-profile projects like KDE and Second Life, and Boost have actively discussed using it in the future instead of their own boost-jam. It's also open source, so it's not going to suddenly disappear. Even if for some reason all development stopped on it right now (unlikely, but let's say it did), it works fine the way it is now anyway, and the open source nature means we're never completely stuck.

The 'I don't like installing software' argument isn't enough to discourage me I'm afraid. As someone who already has to keep far more software than I'd like installed in order to support this community (if it were me, I'd only have one copy of MSVC installed ;) ), I think I can live with requiring people to install something small like CMake. ;)

What I will probably do for the packaged source releases is generate default build files so on downloading, the project is ready to go, and using CMake is optional (to modify the build configuration). However in SVN CMake will be the only option.

About something 'better' coming out - put it this way, we're unlikely to hop build mechanisms on a whim, we've changed once in 8 years ;)

User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
x 3
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by _tommo_ »

I hate somewhat those auto-build tools, of course it's easier to open up OgreMain_vc9.sln and click "Rebuild" for the end user...
but given the vast amount of time and annoying that CMake saves for the developers, i think it's a good thing :D

Anyway, you could always put premade VC projs, C::B builds into the SDK, only they would have been created by CMake :D
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games

User avatar
Noman
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 714
Joined: Mon Jan 31, 2005 7:21 pm
Location: Israel
x 2
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by Noman »

I agree with this step. Makes it much less of a hassle to maintain multiple build environments.

Also, if the Ogre project decides to phase out of CMake and move back to its current format, all that sinbad has to do is generate the project files for all the platforms and commit them to SVN. Its really not putting all your eggs in one basket - the revert is very easy if needed...

User avatar
volca
Gnome
Posts: 393
Joined: Thu Dec 08, 2005 9:57 pm
x 1
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by volca »

Also don't forget it makes it easier to work with a clean source tree as the out of source builds are a supported and widely used feature of CMake. It surely is a valuable tool.
Image

reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland
x 5

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by reptor »

Boost 1.38 seems to come with cmake, it's not official yet but it seems to be there.

Also the Bullet physics library uses it (although they've done some mistakes, doesn't compile out of the box on mingw or on msvc for me, but I think that's not cmake's fault).

I don't oppose cmake. I think the idea is great. I know I would hate to be updating all those project files for different IDEs.

dermont
Orc Shaman
Posts: 785
Joined: Thu Dec 09, 2004 2:51 am
x 35

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by dermont »

jacmoe wrote:
Right, so autotools are easy to use?
I don't think I that was what I wrote. For me I am having some trouble replicating some of the functionality of the current build and is probably due to the fact I'm not familiar with the cmake build options.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by CABAListic »

@dermont: Don't worry about the pkgconfig files, I will address them together with the CMake find script. This is listed as an essential prerequisite before switching in CMakeTODO anyway :) I'll also look into resolving the visibility issues, but give me some rope here because I have to do some reading first (I'm not entirely up to speed on the whole gcc visibility stuff). If you're lacking any other configurable features from autotools, please raise them. I think I integrated all and then some, with the exception of DevIL and gtk support because to my eye those look deprecated. If there's still demand for those, we can add them to CMake.

As to everyone complaining about having to install CMake: I understand the feeling. In fact, it's the exact same way I felt when I had to install it to use PhysFS. But you really need to see it from a developer's side: The moment you need to support multiple compilers and compiler setups (a necessity in cross-platform development), managing several different build systems quickly becomes a maintenance hazard. As sinbad already pointed out, many contributors only work with a subset of the supported platforms and therefore cannot update all the build systems to their changes, so some build systems are left behind until someone fixes them (this has happened a couple of times already). CMake may still need some attention on platform detail, but at least it's a centralised system, and if any developer adds a file to the build, then it's going to appear on all platforms.
Furthermore I'd encourage everyone to give CMake or similar build systems a chance even for your own projects. I'm certain most of you already had the pleasure of having to fix include and library paths inside a multi-project VS solution because your dependencies setup didn't quite match the setup on the original development computer. At least in CMake you can use find scripts to find such dependencies, and even if they don't find them automatically CMake offers you a central place to enter the missing paths for all sub-projects and all targets (debug, release). It may need some getting used to, but for a multi-developer, multi-platform project it's totally worth it, imho!

That being said, I need to point out that pre-generating solution files from CMake for other users may not be as easy as it sounds. CMake by default uses absolute paths which are in nature not independent of the host computer. There is an option (I think) to use relative paths, but how good that's working I don't know (they do have some reasons to use absolute paths as a default).


Edit: This is slightly off-topic, but since the PCZ scene manager was mentioned here: Is there a particular reason why PCZ is implemented as a plugin? Seeing as how you have to link against it to use it, this seems to defeat the purpose of a plugin. If it were a simple addon library, that would certainly ease my job with CMake and the CMake find / pkgconfig scripts to provide 3rd-party projects a coherent way to link against PCZ. Right now it's a hybrid.

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by jacmoe »

Really looking forward to it! :D
As a developer of Ogre powered projects I find it a PITA to maintain separate versions for source/SDK.
I also like that the new build system doesn't pollute the source directory.
Great work. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by sinbad »

CABAListic wrote:That being said, I need to point out that pre-generating solution files from CMake for other users may not be as easy as it sounds. CMake by default uses absolute paths which are in nature not independent of the host computer. There is an option (I think) to use relative paths, but how good that's working I don't know (they do have some reasons to use absolute paths as a default).
That's a good point, thanks for bringing it up - I had noticed that at some point previously then completely forgot about it. Pregenerating solution files won't be possible unless relative directories can be used, I'll put that on the TODO so we (and by that I mean I ;) ) don't forget it.

Edit: This is slightly off-topic, but since the PCZ scene manager was mentioned here: Is there a particular reason why PCZ is implemented as a plugin?
Yes, this is mostly down to it trying to fit into the conventional plugin system, and also because of the LGPL & static linking coming with extra baggage. Of course, we've now eliminated that so we can start to reconsider these aspects!

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by sinbad »

Ok, I have deleted all the MSVC project files from trunk that are made redundant by CMake. I've only left the few optional ones (like XSIExport) that are so far not replaced.

In a few minutes I am going to delete the ReferenceApplication and Demo_BspCollision - it's very old anyway and has been superceded by many, many physics addons like NxOgre, OgreNewt and OgreBullet. I will remove the dependency on ODE in CMake once I've done this.

CABAListic, please can you remove the old Linux build files if you are happy that CMake covers it now.

SCienCE - since you look after Code::Blocks, please can you verify that the explicit C::B files can be deleted.

I will continue to look after the XCode projects (also Praetor may be looking at them too) until the OS X build is completely recreated in CMake - it's part way there but not quite yet.

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by Assaf Raman »

Do you think we need an announcement about this issue?
Watch out for my OGRE related tweets here.

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by sinbad »

Other than here (this is public)? I don't think so - this is only a trunk issue only so I wouldn't normally put it on the front page. I'll put it in the porting notes though.

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by Assaf Raman »

I meant a "developer forum" announcement like "Attention Exporter Developers: New Tangent Flags in Shoggoth".
Watch out for my OGRE related tweets here.

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Re: WARNING: MSVC, Linux and C::B build files to be deleted!

Post by sinbad »

This is the developer forum :) I'll turn this one into an announcement to keep it current...

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 57
Contact:

Re: WARNING: MSVC, Linux and C::B build files being deleted!

Post by CABAListic »

Alright, autoconf files are gone, too. That's two down :)

User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Re: WARNING: MSVC, Linux and C::B build files being deleted!

Post by Kentamanos »

I don't think I saw it posted in here (apologies if I missed it), but it looks like sinbad started a quick start guide in the wiki: http://www.ogre3d.org/wiki/index.php/CM ... tart_Guide

Of course he might not have wanted it posted until the last two sections were done, but it's helping me in any event :).

EDIT: Just gave it a shot based upon the guide, and it worked well for me.

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Re: WARNING: MSVC, Linux and C::B build files being deleted!

Post by Klaim »

Notice : CABAListic did write it.

User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Re: WARNING: MSVC, Linux and C::B build files being deleted!

Post by Kentamanos »

Klaim wrote:Notice : CABAListic did write it.
If you're replying to my last post, the page's history indicates sinbad started the page and wrote the Windows portion (all that existed when I first posted) and CABAListic wrote the Linux stuff.

Not that I particularly care who wrote what on the wiki (and obviously CABAListic is a huge player in the CMake work), I'm just glad it's there :).

Post Reply