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
Compilation fails on Debian Wheezy
Moderator: PPS-Leaders
- Nowic
- Thanathon, God of the lower Planes
- Posts: 186
- Joined: Tue Oct 03, 2006 7:53 pm
- Location: Zürich
- Contact:
Compilation fails on Debian Wheezy
"I've always lived cheaply. I live like a student, basically. And I like that because it means that money is not telling me what to do. I can do what I think is important for me to do. It freed me to do what seemed worth doing." -- Richard Stallman
Re: Compilation fails on Debian Wheezy
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.
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.
"I'm Commander Shepard and this is my favorite forum on the internet."
Re: Compilation fails on Debian Wheezy
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
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)
Fabian 'x3n' Landau, Orxonox developer
- Nowic
- Thanathon, God of the lower Planes
- Posts: 186
- Joined: Tue Oct 03, 2006 7:53 pm
- Location: Zürich
- Contact:
Re: Compilation fails on Debian Wheezy
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...)
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
"I've always lived cheaply. I live like a student, basically. And I like that because it means that money is not telling me what to do. I can do what I think is important for me to do. It freed me to do what seemed worth doing." -- Richard Stallman
Re: Compilation fails on Debian Wheezy
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.
"I'm Commander Shepard and this is my favorite forum on the internet."
Re: Compilation fails on Debian Wheezy
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
http://www.orxonox.net/changeset/9703
Fabian 'x3n' Landau, Orxonox developer
Who is online
Users browsing this forum: No registered users and 3 guests