Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
First steps problems: build install http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=284 |
Page 1 of 2 |
Author: | corum [ Wed Nov 09, 2011 4:46 pm ] |
Post subject: | First steps problems: build install |
Hi there. I'm totally new around here, and just more than a noob about C/C++ environment settings. First of all, let me express my congratulations for the effort you make, by baking and maintaining a so nice engine. Keep up the good work! And now, comes the pain. ![]() I've got the Git sources, installed XCode, QT, CMake, and passed the early stage of "cmake .." Later, i tried a "make install", and obtained the following errors: [ 1%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/ArraySizes.cpp.o cc1plus: error: unrecognized command line option "-std=c++0x" make[2]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/ArraySizes.cpp.o] Error 1 make[1]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/all] Error 2 make: *** [all] Error 2 My env is made up this way: Mac OSX 10.6.8 Qt 4.7.4 (64 bit) Cmake version 2.8.6 GNU Make 3.81 i686-apple-darwin10-gcc-4.2.1 Please, doctors, tell me if I can save my life! ![]() Thanks in advance, and greetings! |
Author: | milliams [ Wed Nov 09, 2011 5:33 pm ] |
Post subject: | Re: First steps problems: build install |
I have very little experience with MacOS X but I see that your version of GCC bundled with XCode is 4.2. This version of GCC is too old to support the C++11 features we use in PolyVox. It seems that newer versions don't have newer versions of GCC and are instead focusing on using LLVM/Clang for C++. Unfortunately Clang's support of C++11 isn't as good as GCC or VS2010. David, perhaps you could check their list of supported features and see it's currently good enough? The other option is to do what people on VS2005 are doing and replacing the C++11 bits with equivalent Boost functionality. David, I guess you know the current status of this better than I? Either way, I'm sure we can get it working. |
Author: | corum [ Wed Nov 09, 2011 5:40 pm ] |
Post subject: | Re: First steps problems: build install |
Hi milliams, and thanks for your quick reply. I Installed the latest possible version of Xcode on Snow Leopard. I'm trying to avoid the Lion upgrade, until it will be more supportive of the whole apps and tools I use normally. Crossing my fingers. ![]() |
Author: | David Williams [ Wed Nov 09, 2011 9:06 pm ] |
Post subject: | Re: First steps problems: build install |
I also don't have much knowledge of MacOS but here's some pointers: 1) Your version of GCC doesn't appear to support C++0x so you're at least going to have to remove the "-std=c++0x" switch before you get any further. It is specified in the root CMakeList.txt file and possibly in other CMakeLists.txt files as well (there are some in subfolders). 2) You will presumably need to use Boost to provide the missing library features (shared_ptr, function, etc). This is what Visual Studio users do for versions prior to VS2010. Have a look in TypeDefs.h where e.g.'polyvox_shared_ptr' is defined. Add/modify the preprocessor checks so that it uses the Boost versions rather than trying to use the built in versions. Let us know how you get on... |
Author: | corum [ Wed Nov 09, 2011 9:58 pm ] |
Post subject: | Re: First steps problems: build install |
Hi David. David Williams wrote: Let us know how you get on... Sure. I'm going to follow your tips. Thanks for your help. |
Author: | corum [ Wed Nov 09, 2011 10:56 pm ] |
Post subject: | Re: First steps problems: build install |
Ok, I disabled the advanced c++ stuff, downloaded boost 1.47.0 and placed its dir under polyvox/boost_1_47_0. After editing the TypeDef.h in order to force boost over gcc, I made a BOOST_ROOT environment variable point to the (complete) above path, and it looks as seen by cmake, which quotes correctly the library version during the dependencies lookup, just after QT. Now I get a different range of errors. It seems I'm on the good way. ![]() Scanning dependencies of target PolyVoxCoreDynamic [ 1%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/ArraySizes.cpp.o [ 2%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/AStarPathfinder.cpp.o In file included from /polyvox/library/PolyVoxCore/source/AStarPathfinder.cpp:24: /polyvox/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.h:74: error: expected ‘,’ or ‘...’ before ‘>’ token /polyvox/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.h:74: error: parse error in template argument list /polyvox/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.h:76: error: default argument missing for parameter 9 of ‘PolyVox::AStarPathfinderParams<VolumeType, VoxelType>::AStarPathfinderParams(VolumeType<VoxelType>*, const PolyVox::Vector3DInt32&, const PolyVox::Vector3DInt32&, std::list<PolyVox::Vector<3u, int>, std::allocator<PolyVox::Vector<3u, int> > >*, float, uint32_t, PolyVox::Connectivity, boost::function<bool ()(const VolumeType<VoxelType>*, const PolyVox::Vector3DInt32&)>, VoxelType)’ /polyvox/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.h: In constructor ‘PolyVox::AStarPathfinderParams<VolumeType, VoxelType>::AStarPathfinderParams(VolumeType<VoxelType>*, const PolyVox::Vector3DInt32&, const PolyVox::Vector3DInt32&, std::list<PolyVox::Vector<3u, int>, std::allocator<PolyVox::Vector<3u, int> > >*, float, uint32_t, PolyVox::Connectivity, boost::function<bool ()(const VolumeType<VoxelType>*, const PolyVox::Vector3DInt32&)>, VoxelType)’: /polyvox/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.h:85: error: ‘funcProgressCallback’ was not declared in this scope make[2]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/AStarPathfinder.cpp.o] Error 1 make[1]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/all] Error 2 make: *** [all] Error 2 Any guess? ![]() EDIT: as I'm trying it on a Mac, should I go for static compilation? If so, how can I force a static build instead of a dynamic one? Thanks. ![]() |
Author: | David Williams [ Thu Nov 10, 2011 11:35 pm ] |
Post subject: | Re: First steps problems: build install |
I don't know exactly what is causing this error. It could be a compiler issue, or it could be there is a subtle difference between boost::function and std::function. At any rate, I suggest we just skip over it by removing the AStarPathfinder for now. Nothing depends on that (except the unit test) so we can come back to it later. Try commenting out the references to AStarPathfinder in library\PolyVoxCore\CMakeLists.txt |
Author: | corum [ Fri Nov 11, 2011 11:06 pm ] |
Post subject: | Re: First steps problems: build install |
Thanks again for your help. Just followed your tips, and this is the result: Scanning dependencies of target PolyVoxCoreDynamic [ 1%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/ArraySizes.cpp.o [ 2%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/GradientEstimators.cpp.o [ 4%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/Log.cpp.o [ 5%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/MeshDecimator.cpp.o /polyvox/library/PolyVoxCore/source/MeshDecimator.cpp: In member function ‘void PolyVox::MeshDecimator<VertexType>::fillInitialVertexMetadata(std::vector<PolyVox::MeshDecimator<VertexType>::InitialVertexMetadata, std::allocator<PolyVox::MeshDecimator<VertexType>::InitialVertexMetadata> >&) [with VertexType = PolyVox::PositionMaterial]’: /polyvox/library/PolyVoxCore/source/MeshDecimator.cpp:76: error: ‘class std::vector<unsigned int, std::allocator<unsigned int> >’ has no member named ‘cbegin’ /polyvox/library/PolyVoxCore/source/MeshDecimator.cpp:76: error: ‘class std::vector<unsigned int, std::allocator<unsigned int> >’ has no member named ‘cend’ make[2]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/MeshDecimator.cpp.o] Error 1 make[1]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/all] Error 2 make: *** [all] Error 2 It seems it's still referring to std:: over boost:: or maybe I got wrong. All in all I'm a newbie yet. |
Author: | David Williams [ Sat Nov 12, 2011 12:09 am ] |
Post subject: | Re: First steps problems: build install |
It should be fixed if you get latest from Git, or apply this change: https://gitorious.org/polyvox/polyvox/c ... c051868c14 |
Author: | corum [ Sat Nov 12, 2011 9:52 am ] |
Post subject: | Re: First steps problems: build install |
I know, I'm becoming quite boring... ![]() [ 1%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/ArraySizes.cpp.o [ 2%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/GradientEstimators.cpp.o [ 4%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/Log.cpp.o [ 5%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/MeshDecimator.cpp.o [ 7%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/Region.cpp.o [ 8%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/SimpleInterface.cpp.o In file included from /polyvox/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.h:208, from /polyvox/library/PolyVoxCore/include/PolyVoxCore/SimpleInterface.h:29, from /polyvox/library/PolyVoxCore/source/SimpleInterface.cpp:24: /polyvox/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl: In member function ‘VoxelType PolyVox::SimpleVolume<VoxelType>::getVoxelAt(int32_t, int32_t, int32_t) const’: /polyvox/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl:107: error: ‘pUncompressedBlock’ was not declared in this scope /polyvox/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl: In member function ‘bool PolyVox::SimpleVolume<VoxelType>::setVoxelAt(int32_t, int32_t, int32_t, VoxelType)’: /Progetti/polyvox/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl:158: error: ‘pUncompressedBlock’ was not declared in this scope /polyvox/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl: In member function ‘VoxelType PolyVox::SimpleVolume<VoxelType>::getVoxelAt(int32_t, int32_t, int32_t) const [with VoxelType = PolyVox::MaterialDensityPair<short unsigned int, 8u, 8u>]’: /polyvox/library/PolyVoxCore/include/PolyVoxCore/CubicSurfaceExtractorWithNormals.inl:50: instantiated from ‘void PolyVox::CubicSurfaceExtractorWithNormals<VolumeType, VoxelType>::execute() [with VolumeType = PolyVox::SimpleVolume, VoxelType = PolyVox::MaterialDensityPair<short unsigned int, 8u, 8u>]’ /polyvox/library/PolyVoxCore/source/SimpleInterface.cpp:31: instantiated from here /polyvox/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl:107: error: dependent-name ‘PolyVox::SimpleVolume<VoxelType>::Block’ is parsed as a non-type, but instantiation yields a type /polyvox/library/PolyVoxCore/include/PolyVoxCore/SimpleVolume.inl:107: note: say ‘typename PolyVox::SimpleVolume<VoxelType>::Block’ if a type is meant make[2]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/source/SimpleInterface.cpp.o] Error 1 make[1]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCoreDynamic.dir/all] Error 2 make: *** [all] Error 2 |
Page 1 of 2 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |