Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

PolyVox compilation error
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=2&t=105
Page 1 of 1

Author:  Freakazo [ Sat Dec 18, 2010 3:13 am ]
Post subject:  PolyVox compilation error

Hi there, I'm having trouble compiling PolyVox.
Firstly I had to build it with "cmake -D ENABLE_EXAMPLES=OFF .." otherwise it would give me the following errors:
As far as I'm aware I installed all the required dependencies.

Code:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENGL_glu_LIBRARY (ADVANCED)
    linked by target "BasicExample" in directory /home/freakazo/PolyVox/examples/Basic
    linked by target "OpenGLExample" in directory /home/freakazo/PolyVox/examples/OpenGL


After getting it to build I run into another problem, here is the output from make install
Code:
[  4%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/ArraySizes.cpp.o
[  8%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/AStarPathfinder.cpp.o
In file included from /home/freakazo/PolyVox/library/PolyVoxCore/include/AStarPathfinder.h:28,
                 from /home/freakazo/PolyVox/library/PolyVoxCore/source/AStarPathfinder.cpp:24:
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h: In constructor ‘PolyVox::Node::Node(int, int, int)’:
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h:52: error: ‘numeric_limits’ is not a member of ‘std’
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h:52: error: expected primary-expression before ‘float’
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h:53: error: ‘numeric_limits’ is not a member of ‘std’
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h:53: error: expected primary-expression before ‘float’
make[2]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/AStarPathfinder.cpp.o] Error 1
make[1]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/all] Error 2
make: *** [all] Error 2


Any help would be greatly appreciated, thanks.
Runing Ubuntu 10.10

Author:  David Williams [ Sat Dec 18, 2010 10:10 am ]
Post subject:  Re: PolyVox compilation error

Freakazo wrote:
Hi there, I'm having trouble compiling PolyVox.
Firstly I had to build it with "cmake -D ENABLE_EXAMPLES=OFF .." otherwise it would give me the following errors:
As far as I'm aware I installed all the required dependencies.

Code:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENGL_glu_LIBRARY (ADVANCED)
    linked by target "BasicExample" in directory /home/freakazo/PolyVox/examples/Basic
    linked by target "OpenGLExample" in directory /home/freakazo/PolyVox/examples/OpenGL


Are you sure you have GLU instaled on your system as well as GL? OpenGL has two parts - the core library (GL) and the utilities library (GLU). Check on your system whether you can find 'glu.h' as well as 'gl.h'. Milliams tends to handle the Linux stuff, so maybe he can tell you where to get these files if they are mising (I guess they are part of Mesa?).

Freakazo wrote:
After getting it to build I run into another problem, here is the output from make install
Code:
[  4%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/ArraySizes.cpp.o
[  8%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/AStarPathfinder.cpp.o
In file included from /home/freakazo/PolyVox/library/PolyVoxCore/include/AStarPathfinder.h:28,
                 from /home/freakazo/PolyVox/library/PolyVoxCore/source/AStarPathfinder.cpp:24:
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h: In constructor ‘PolyVox::Node::Node(int, int, int)’:
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h:52: error: ‘numeric_limits’ is not a member of ‘std’
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h:52: error: expected primary-expression before ‘float’
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h:53: error: ‘numeric_limits’ is not a member of ‘std’
/home/freakazo/PolyVox/library/PolyVoxCore/include/PolyVoxImpl/AStarPathfinderImpl.h:53: error: expected primary-expression before ‘float’
make[2]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/AStarPathfinder.cpp.o] Error 1
make[1]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/all] Error 2
make: *** [all] Error 2


This one is a mistake in the code... the error you are seeing is in the new AStarPathfinder which was only added a week ago and hasn't been tested on Linux/GCC yet. It's failing to recognise 'numeric_limits' because I haven't added the header. I've just fixed this so try getting latest from SVN, and let me know if you hit more problems.

Author:  Freakazo [ Sat Dec 18, 2010 10:55 am ]
Post subject:  Re: PolyVox compilation error

Thanks, the cmake errors was because I didn't also install the dev packages (both for mesa glu and qt4). I always forget to install both. My bad :|


As for the compilation error, it is still there. The error produced is almost exactly the same (AStarPathfinderImpl.h:52 becomes AStarPathfinderImpl.h:53)


Thanks for bearing with me, I'm a total C++ noob, but pretty good with python, hoping to wrap PolyVox using cython.

Note: I noticed the swig bindings, but the last commit to that was middle last year so I'm assuming it's unusable.

Author:  David Williams [ Sat Dec 18, 2010 11:55 am ]
Post subject:  Re: PolyVox compilation error

Freakazo wrote:
As for the compilation error, it is still there. The error produced is almost exactly the same (AStarPathfinderImpl.h:52 becomes AStarPathfinderImpl.h:53)

Sorry, I added the wrong header. Now I've done it properly and compiled on Linux. It all seems good :-)
Freakazo wrote:
Thanks for bearing with me, I'm a total C++ noob, but pretty good with python, hoping to wrap PolyVox using cython.

Note: I noticed the swig bindings, but the last commit to that was middle last year so I'm assuming it's unusable.

Yes, Python bindings for PolyVox would be very cool so I'll guide you as best I can. It was milliams who wrote what exists of the SWIG ones but I'm not sure how far he got. SWIG is great of course because it works for several languages, but cython is also fine (and of course there's no harm in having more than one set of bindings). So you can use whatever you prefer really.

I think the biggest issue you want to watch out for is the heavy use of templates in PolyVox. SWIG does have ways of dealing with templates so hopefully cython does as well. The best class to start with is probably Vector, because it's self contained and fairly simple.

PolyVox is still changing, and some things are scheduled to be removed, so if you can get Vector working then I'll let you know what other classes you'll need to wrap.

NOTE: This discussion about bindings has been split to a new thread here: http://www.thermite3d.org/phpBB3/viewtopic.php?f=2&t=118

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/