Page 1 of 1
Compilation fails on Debian Wheezy
Posted: Tue Oct 08, 2013 9:29 pm
by Nowic
Hi,
The current trunk does not compile on Debian 7.0 (Wheezy) 64bit. I get a weird message about an already declared symbol.
[ 2%] Building CXX object src/libraries/core/CMakeFiles/core.dir/OgreBuildUnit.cc.o
In file included from /usr/include/boost/filesystem.hpp:35:0,
from /home/simon/Projekte/orxonox_new/trunk/src/libraries/core/GraphicsManager.cc:35,
from /home/simon/Projekte/orxonox_new/trunk/build/src/libraries/core/OgreBuildUnit.cc:1:
/usr/include/boost/filesystem/v3/path.hpp:732:24: error: ‘path’ is already declared in this scope
libogre 1.7.4
libboost-filesystem 1.49.0
Cheers
Simon
Re: Compilation fails on Debian Wheezy
Posted: Wed Oct 09, 2013 1:29 pm
by beni
Hey Nowic,
you're back! Thanks for trying to make it work on Debian. I don't think we had somebody compiling it for Debian in a while now.
The error message you have is weird indeed. Looks like the boost library is incompatible with Ogre, but weird that we don't have the same problem on other systems.
Thanks for letting us know. Looking forward seeing you on November 2nd.
Re: Compilation fails on Debian Wheezy
Posted: Wed Oct 09, 2013 7:14 pm
by x3n
Hi Nowic
Have a look at src/libraries/core/CorePrereqs.h between lines 266 and 318. There we make some forward declarations of some important classes in the boost namespace, including 'path' (for your version of boost this is probably on line 296 and 300). Even though it shouldn't, these may collide with the actual declaration in the boost headers.
You could try to
- Look at the actual declaration in /usr/include/boost/filesystem/v3/path.hpp:732 and look for differences between this declaration and the forward declaration in CorePrereqs.h. If they differ, adjust the code in CorePrereqs.h accordingly
- Remove the forward declaration in CorePrereqs.h (this could result in other compiler errors)
Re: Compilation fails on Debian Wheezy
Posted: Mon Oct 14, 2013 8:57 pm
by Nowic
Thank you for your suggestions. The following patch fixes the issue.
Reference for the change:
http://www.boost.org/doc/libs/1_49_0/li ... /index.htm
Should I commit it? (If I still have the rights to do it...)
Code: Select all
Index: src/libraries/core/CorePrereqs.h
===================================================================
--- src/libraries/core/CorePrereqs.h (Revision 9702)
+++ src/libraries/core/CorePrereqs.h (Arbeitskopie)
@@ -299,15 +299,18 @@
{
using filesystem3::path;
}
-# endif
+#endif
#else
-
- // TODO: Check this once boost 1.48 is released
- namespace filesystem
+ // 1.48 and newer includes version 3 only
+ namespace filesystem3
{
class path;
}
+ namespace filesystem
+ {
+ using filesystem3::path;
+ }
#endif
Re: Compilation fails on Debian Wheezy
Posted: Mon Oct 14, 2013 9:36 pm
by beni
Commit it. We can still roll it back if it breaks something else. It's a very small change anyway. Good work! Somebody ran into the same problem on Ubuntu 13.04 just today. If you could commit it, it might fix his problem as well.
Re: Compilation fails on Debian Wheezy
Posted: Tue Oct 15, 2013 8:53 pm
by x3n
Thanks for testing. I compared boost versions from 1.47 up to 1.54 and noticed that we only have to change the version number in the preprocessor statement to fix the issue (boost versions 1.48 and 1.49 were affected).
http://www.orxonox.net/changeset/9703