Orxonox goes C++11

A place to discuss everything about the Orxonox framework.

Moderator: PPS-Leaders

flozi
Human Space Navy Sergeant
Posts: 13
Joined: Mon Oct 07, 2013 1:51 pm

Re: Orxonox goes C++11

Post by flozi » Sun Jan 31, 2016 12:51 pm

Ah, you're right, I've got this on my system:
libtolua++5.1.a

Maybe we should just ask the ISG to install "tolua++5.1" then.


I just tried again with trunk over ssh, reverted and updated, but I still get the same error when running "cmake .." in an empty build folder.
Why does that work for you? I'm using "ssh zifloria@login.ee.ethz.ch". Is this the right address? Are there other ones?

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Orxonox goes C++11

Post by x3n » Sun Jan 31, 2016 1:13 pm

I connect directly to one of the machines in the student's computer room at ETZ: 'ssh tardis-dxx.ee.ethz.ch' (with xx being the number of the machine, starting at 01). That way I also get access to the /scratch of the machine where I have my checkout of orxonox
Fabian 'x3n' Landau, Orxonox developer

muemart
Noxonian Qulomks
Posts: 28
Joined: Fri Mar 28, 2014 1:10 pm

Re: Orxonox goes C++11

Post by muemart » Sun Jan 31, 2016 2:24 pm

I looked a bit further into tolua++. CEGUI uses it for it's LuaScriptModule, so we try to use the same library as CEGUI. Older versions of CEGUI came with their own tolua++ library, but newer ones use the system package (on Linux at least). So I guess the easiest solutions would indeed be to ask ISG to install it.

For xerces, I found an old discussion here: http://orxonox2.vseth.ethz.ch/phpBB3/vi ... &view=next

flozi
Human Space Navy Sergeant
Posts: 13
Joined: Mon Oct 07, 2013 1:51 pm

Re: Orxonox goes C++11

Post by flozi » Mon Feb 01, 2016 11:30 am

x3n wrote:I connect directly to one of the machines in the student's computer room at ETZ: 'ssh tardis-dxx.ee.ethz.ch' (with xx being the number of the machine, starting at 01). That way I also get access to the /scratch of the machine where I have my checkout of orxonox
Thanks, I didn't know we could do that, nice!
muemart wrote:(...) So I guess the easiest solutions would indeed be to ask ISG to install it.(...)
I just wrote them an email, I'll let you know when something happens

flozi
Human Space Navy Sergeant
Posts: 13
Joined: Mon Oct 07, 2013 1:51 pm

Re: Orxonox goes C++11

Post by flozi » Tue Feb 02, 2016 4:51 pm

We are a step closer now.
The isg installed tolua++5.1 now!

But I still can't compile, cmake works, but then I get this.
So... what's going on?

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Orxonox goes C++11

Post by x3n » Tue Feb 02, 2016 9:41 pm

Ok good.

About your error: I still think your errors look weird compared to my build output. Please check if you have any local modifications (especially in cmake scripts) and revert them. Also delete the build directory and start with a clean one. If you still get the same errors, create a directory on /scratch and build from there.

Anway, I managed to build orxonox on tardis. But it's a bit of a pain.

Tardis has one version of CEGUI installed:
- 0.7.6 -> /usr/lib/libCEGUIBase.so (library) and /usr/include/CEGUI (includes)

But:
Tardis has TWO versions of Ogre installed, one is incomplete:
- 1.8.0 -> /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.8.0 (library), includes are missing
- 1.9.0 -> /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0 (library), /usr/include/OGRE/ (includes)

Now here's the problem: CEGUI 0.7.6 needs Ogre 1.8.*. But Ogre 1.8.0 is incomplete because the headers are missing. Ogre 1.9.0 is complete, but cannot be used because it doesn't work together with CEGUI 0.7.* (and also because Orxonox is not yet ready to be built with Ogre 1.9.*).

Another problem: 1.9.0 is the default version on tardis, so all links (e.g. libOgreMain.so) point to version 1.9.0.

To make it work, I downloaded the headers for Ogre 1.8 myself and set the paths manually in LibraryConfigTardis.cmake to make it use 1.8.0.

Here are my changes in LibraryConfigTardis.cmake:

Code: Select all

-  LIST(APPEND CMAKE_INCLUDE_PATH "/usr/pack/cegui-0.6.2-sd")
-  LIST(APPEND CMAKE_LIBRARY_PATH "/usr/pack/cegui-0.6.2-sd/amd64-debian-linux5.0")
-  LIST(APPEND CMAKE_INCLUDE_PATH "/usr/pack/ogre-1.6.1-sd")
-  LIST(APPEND CMAKE_LIBRARY_PATH "/usr/pack/ogre-1.6.1-sd/amd64-debian-linux5.0")
+  SET(OGRE_INCLUDE_DIR "/scratch/landauf/dependencies/ogre_src_v1-8-1/OgreMain/include/")
+  SET(OGRE_LIBRARY_OPTIMIZED "/usr/lib/x86_64-linux-gnu/libOgreMain.so.1.8.0")
+  SET(OGRE_PLUGIN_Plugin_ParticleFX_OPTIMIZED "/usr/lib/x86_64-linux-gnu/OGRE-1.8.0/Plugin_ParticleFX.so")
+  SET(OGRE_PLUGIN_RenderSystem_GL_OPTIMIZED "/usr/lib/x86_64-linux-gnu/OGRE-1.8.0/RenderSystem_GL.so")
Note that my changes are not strictly correct because I downloaded headers for Ogre 1.8.1 (and used my own build-settings), while tardis uses version 1.8.0. But these issues can be sorted out.
So far it looks promising: Orxonox compiles, the tests run and orxonox starts (at least up to the point where it tries to create a window, which doesn't work via ssh). On the other hand, as long as no one sees it running with graphics, we cannot tell if it really works.

And last but not least: I still think we can (and probably should) compile our own dependencies for tardis.
Fabian 'x3n' Landau, Orxonox developer

flozi
Human Space Navy Sergeant
Posts: 13
Joined: Mon Oct 07, 2013 1:51 pm

Re: Orxonox goes C++11

Post by flozi » Tue Feb 02, 2016 10:39 pm

Oh wow, that's annoying :(

I can test if everything works next Thursday.

So should we create a repository with all dependencies on tardis? This seems to be the best solution, but quite a bit of work.


btw, I quickly tried your solution via ssh, but instead of downloading 1.8.1, I downloaded 1.8.0 from here.
This didn't work. What are your "own build-settings"? And why did you download 1.8.1 and not 1.8.0?

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Orxonox goes C++11

Post by x3n » Wed Feb 03, 2016 8:48 am

Initially I wanted to compile Ogre 1.8.1 myself, then I realized that tardis already has 1.8.0 installed. That's why I have 1.8.1 ;)

When you build the ogre sources, it will create a file called 'OgreBuildsettings.h' (or something similar) in the build directory. This file needs to be copied into the headers directory.

We probably don't need to build ALL dependencies for tardis. Maybe only ogre + cegui.
Fabian 'x3n' Landau, Orxonox developer

flozi
Human Space Navy Sergeant
Posts: 13
Joined: Mon Oct 07, 2013 1:51 pm

Re: Orxonox goes C++11

Post by flozi » Wed Feb 03, 2016 7:30 pm

Could you be a bit more precise on how you did it?

I can't compile ogre, it tells me it couldn't locate FREETYPE.
Assuming I managed to build ogre, where do I have to copy this 'OgreBuildsettings.h' to? To here: ../OgreMain/include/?

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Orxonox goes C++11

Post by x3n » Wed Feb 03, 2016 8:29 pm

Here's my build command:

Code: Select all

cmake .. -DCMAKE_BUILD_TYPE=Release -DFREETYPE_INCLUDE_DIR=/usr/include/freetype2
I did not actually compile it, so I'm not sure if this include-dir actually makes sense (since freetype2 and freetype are maybe not the same). But that doesn't matter, running cmake is enough to create OgreBuildesettings.h.
Assuming I managed to build ogre, where do I have to copy this 'OgreBuildsettings.h' to? To here: ../OgreMain/include/?
Yes.
Don't worry, the compiler will tell you if the file is missing (when you build orxonox). There's no magic guru knowledge involved in this. Just solving one error after another. ;)
Fabian 'x3n' Landau, Orxonox developer

flozi
Human Space Navy Sergeant
Posts: 13
Joined: Mon Oct 07, 2013 1:51 pm

Re: Orxonox goes C++11

Post by flozi » Thu Feb 04, 2016 9:06 am

Ok, that did the trick.
And... It worked!!! :beerchug:
(It starts normally, graphics are showing up, etc.)


Apart from the cumbersome process, another problem with this workaround: I run out of disk space while building on my ~/flo-extra-0/ folder.
I had two copies of the ogre source lying around. After deleting those it worked fine. The whole thing now takes 4.4GB.
I don't know how much it took before, but I never run out of space on my extra folder before...

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Orxonox goes C++11

Post by x3n » Thu Feb 04, 2016 2:10 pm

Well done! :)
cumbersome process
Now that you created a working setup, you can add OgreMain/include/ to a tar.gz package and upload it e.g. here: http://svn.orxonox.net/downloads/ (use HTTPS for SVN and HTTP to give the download url to other people). Students can download this package and use it without problems.
I run out of disk space
You can delete everything in the Ogre directory except for OgreMain/include/. The includes need only 4 MB disk space.

But that's probably not the main reason. On my tardis box, the build-directory allone takes 3 GB. On my windows machine it's actually >5GB!
The build directory is so large because normally we build orxonox in debug mode which gives huge object- and binary-files.
Maybe the build also became larger with GCC 4.9 and C++11?

See http://www.orxonox.net/wiki/Buildsystem for a list of build modes: -DCMAKE_BUILD_TYPE=(Debug|Release|RelWithDebInfo|RelForDevs|MinSizeRel)

For example, MinSizeRel is a release build wich is optimized for small size.
These build modes are defined here (for gcc): cmake/CompilerConfigGCC.cmake (lines 59-64). You can try to tweak these settings locally (e.g. if you need a debug build with smaller size). But please don't commit these changes unless you know what you do ;)
Fabian 'x3n' Landau, Orxonox developer

flozi
Human Space Navy Sergeant
Posts: 13
Joined: Mon Oct 07, 2013 1:51 pm

Re: Orxonox goes C++11

Post by flozi » Sat Feb 06, 2016 2:49 pm

Alright.
I added the zipped dependencies to svn (http://svn.orxonox.net/downloads/tardisDependencies.zip),
changed the build settings for tardis (http://www.orxonox.net/changeset/11109)
and updated the wiki (http://www.orxonox.net/wiki/LinuxTardis).
This should be fairly easy for our students now.

Cheers!
:beerchug:

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: Orxonox goes C++11

Post by x3n » Sun Feb 07, 2016 7:21 pm

cool! thanks!
Fabian 'x3n' Landau, Orxonox developer

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests