It is currently Sat Aug 22, 2020 1:54 pm


All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: First steps problems: build install
PostPosted: Wed Nov 09, 2011 4:46 pm 

Joined: Wed Nov 09, 2011 4:28 pm
Posts: 10
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!


Top
Offline Profile  
Reply with quote  
 Post subject: Re: First steps problems: build install
PostPosted: Wed Nov 09, 2011 5:33 pm 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
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.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: First steps problems: build install
PostPosted: Wed Nov 09, 2011 5:40 pm 

Joined: Wed Nov 09, 2011 4:28 pm
Posts: 10
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. :-)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: First steps problems: build install
PostPosted: Wed Nov 09, 2011 9:06 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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...


Top
Offline Profile  
Reply with quote  
 Post subject: Re: First steps problems: build install
PostPosted: Wed Nov 09, 2011 9:58 pm 

Joined: Wed Nov 09, 2011 4:28 pm
Posts: 10
Hi David.
David Williams wrote:
Let us know how you get on...

Sure. I'm going to follow your tips.
Thanks for your help.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: First steps problems: build install
PostPosted: Wed Nov 09, 2011 10:56 pm 

Joined: Wed Nov 09, 2011 4:28 pm
Posts: 10
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. :D

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. :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: First steps problems: build install
PostPosted: Thu Nov 10, 2011 11:35 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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


Top
Offline Profile  
Reply with quote  
 Post subject: Re: First steps problems: build install
PostPosted: Fri Nov 11, 2011 11:06 pm 

Joined: Wed Nov 09, 2011 4:28 pm
Posts: 10
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: First steps problems: build install
PostPosted: Sat Nov 12, 2011 12:09 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
It should be fixed if you get latest from Git, or apply this change: https://gitorious.org/polyvox/polyvox/c ... c051868c14


Top
Offline Profile  
Reply with quote  
 Post subject: Re: First steps problems: build install
PostPosted: Sat Nov 12, 2011 9:52 am 

Joined: Wed Nov 09, 2011 4:28 pm
Posts: 10
I know, I'm becoming quite boring... :P


[ 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


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net