Volumes Of Fun http://www.volumesoffun.com/phpBB3/ |
|
Problems compiling in Mac OS 10.9 with clang and Qt 4 http://www.volumesoffun.com/phpBB3/viewtopic.php?f=14&t=621 |
Page 1 of 1 |
Author: | franxico [ Thu Dec 25, 2014 1:41 pm ] |
Post subject: | Problems compiling in Mac OS 10.9 with clang and Qt 4 |
Hello there, I am eager to try your samples of the polyvox. I ended up having installed Qt 4.7.4, as Qt 5.4 was not recognised valid for cmake. I read on previous forum post about the use of gcc instead of clang but I have confirmed that make is using clang for CXX. So here is my compilation errors logs. Do you think you can figure what is the problem? Thank you. Best, FB Code: [ 1%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/AStarPathfinder.cpp.o
In file included from /Users/fbernardo/Documents/Development/_cppprojects/polyvox/library/PolyVoxCore/source/AStarPathfinder.cpp:24: /Users/fbernardo/Documents/Development/_cppprojects/polyvox/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.h:75:35: error: no viable conversion from 'int' to 'std::function<void (float)>' polyvox_function<void (float)> funcProgressCallback = 0 ^ ~ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_03:964:31: note: candidate constructor not viable: no known conversion from 'int' to 'std::__1::nullptr_t' for 1st argument _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_03:965:5: note: candidate constructor not viable: no known conversion from 'int' to 'const std::__1::function<void (float)> &' for 1st argument function(const function&); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_03:968:35: note: candidate template ignored: disabled by 'enable_if' [with _Fp = int] typename enable_if<!is_integral<_Fp>::value>::type* = 0); ^ /Users/fbernardo/Documents/Development/_cppprojects/polyvox/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.h:75:35: note: passing argument to parameter 'funcProgressCallback' here polyvox_function<void (float)> funcProgressCallback = 0 ^ /Users/fbernardo/Documents/Development/_cppprojects/polyvox/library/PolyVoxCore/include/PolyVoxCore/AStarPathfinder.h:75:35: error: missing default argument on parameter 'funcProgressCallback' polyvox_function<void (float)> funcProgressCallback = 0 ^ 2 errors generated. 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 |
Author: | David Williams [ Fri Dec 26, 2014 1:21 pm ] |
Post subject: | Re: Problems compiling in Mac OS 10.9 with clang and Qt 4 |
Hi, I have seen this error before so I know how to fix it. The 0.2.1 (or master) version of PolyVox has this line in AStarPathfinder.h: Code: polyvox_function<void (float)> funcProgressCallback = 0 Which gives an error on some more modern compilers. You need to change it to: Code: polyvox_function<void (float)> funcProgressCallback = nullptr There may be other places with a similar problem, but there's certainly not many. This has also been fixed in the latest development version. |
Author: | franxico [ Sat Dec 27, 2014 2:08 am ] |
Post subject: | Re: Problems compiling in Mac OS 10.9 with clang and Qt 4 |
Hi there, thank you. I managed find some more afterwards and to correct it. Code: In file included from /Users/fbernardo/Documents/Development/_cppprojects/polyvox/examples/OpenGL/main.cpp:26:
/Users/fbernardo/Documents/Development/_cppprojects/polyvox/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h:259:78: error: no viable conversion from 'int' to 'std::function<void (const ConstVolumeProxy<MaterialDensityPair<unsigned char, '\x04', '\x04'> > &, const Region &)>' polyvox_function<void(const ConstVolumeProxy<VoxelType>&, const Region&)> dataRequiredHandler = 0, ^ ~ /Users/fbernardo/Documents/Development/_cppprojects/polyvox/examples/OpenGL/main.cpp:76:37: note: in instantiation of default function argument expression for 'LargeVolume<PolyVox::MaterialDensityPair<unsigned char, '\x04', '\x04'> >' required here LargeVolume<MaterialDensityPair44> volData(PolyVox::Region(Vector3DInt32(0,0,0), Vector3DInt32(g_uVolumeSideLength-1, g_uVolumeSideLength-1, g_uVolumeSide... ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_03:1266:31: note: candidate constructor not viable: no known conversion from 'int' to 'std::__1::nullptr_t' for 1st argument _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {} ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_03:1267:5: note: candidate constructor not viable: no known conversion from 'int' to 'const std::__1::function<void (const PolyVox::ConstVolumeProxy<PolyVox::MaterialDensityPair<unsigned char, '\x04', '\x04'> > &, const PolyVox::Region &)> &' for 1st argument function(const function&); ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/__functional_03:1270:35: note: candidate template ignored: disabled by 'enable_if' [with _Fp = int] typename enable_if<!is_integral<_Fp>::value>::type* = 0); ^ /Users/fbernardo/Documents/Development/_cppprojects/polyvox/library/PolyVoxCore/include/PolyVoxCore/LargeVolume.h:259:78: note: passing argument to parameter 'dataRequiredHandler' here polyvox_function<void(const ConstVolumeProxy<VoxelType>&, const Region&)> dataRequiredHandler = 0, ^ 1 warning and 1 error generated. make[2]: *** [examples/OpenGL/CMakeFiles/OpenGLExample.dir/main.cpp.o] Error 1 make[1]: *** [examples/OpenGL/CMakeFiles/OpenGLExample.dir/all] Error 2 |
Author: | franxico [ Sat Dec 27, 2014 1:24 pm ] |
Post subject: | Re: Problems compiling in Mac OS 10.9 with clang and Qt 4 |
Hi there, didn't manage to finish my post yesterday, but I corrected those 'nullptr' errors and two more, and got some new errors... This time they report to Qt library. variable has incomplete type 'std::random_access_iterator_tag' inline bool selectIteration(std::random_access_iterator_tag) and a warning for mac os x compatibility. Anyway, I managed to get the samples compiled. The SmoothLOD crashes with a Code: Initialising GLEW...success OpenGL Implementation Details: GL_VENDOR: NVIDIA Corporation GL_RENDERER: NVIDIA GeForce GT 650M OpenGL Engine GL_VERSION: 2.1 NVIDIA-8.26.28 310.40.55b01 GL_SHADING_LANGUAGE_VERSION: 1.20 Segmentation fault: 11 I'll be looking into the library and code in more detail. Great work, congrats! Best, FB Code: [ 16%] Built target PolyVoxCore [ 18%] Built target PolyVoxUtil [ 23%] Built target BasicExample [ 29%] Built target PagingExample [ 40%] Built target OpenGLExample [ 44%] Built target SmoothLODExample [ 46%] Building CXX object tests/CMakeFiles/TestAStarPathfinder.dir/TestAStarPathfinder.cpp.o In file included from /Users/fbernardo/Documents/Development/_cppprojects/polyvox/tests/TestAStarPathfinder.cpp:24: In file included from /Users/fbernardo/Documents/Development/_cppprojects/polyvox/tests/TestAStarPathfinder.h:27: In file included from /Library/Frameworks/QtCore.framework/Headers/QObject:1: In file included from /Library/Frameworks/QtCore.framework/Headers/qobject.h:47: In file included from /Library/Frameworks/QtCore.framework/Headers/qobjectdefs.h:45: In file included from /Library/Frameworks/QtCore.framework/Headers/qnamespace.h:45: /Library/Frameworks/QtCore.framework/Headers/qglobal.h:320:6: warning: "This version of Mac OS X is unsupported" [-W#warnings] # warning "This version of Mac OS X is unsupported" ^ In file included from /Users/fbernardo/Documents/Development/_cppprojects/polyvox/tests/TestAStarPathfinder.cpp:30: In file included from /Library/Frameworks/QtTest.framework/Headers/QtTest:3: In file included from /Library/Frameworks/QtCore.framework/Headers/QtCore:80: In file included from /Library/Frameworks/QtCore.framework/Headers/qtconcurrentfilter.h:49: In file included from /Library/Frameworks/QtCore.framework/Headers/qtconcurrentfilterkernel.h:49: /Library/Frameworks/QtCore.framework/Headers/qtconcurrentiteratekernel.h:154:60: error: variable has incomplete type 'std::bidirectional_iterator_tag' inline bool selectIteration(std::bidirectional_iterator_tag) ^ /Library/Frameworks/QtCore.framework/Headers/qiterator.h:50:12: note: forward declaration of 'std::bidirectional_iterator_tag' struct bidirectional_iterator_tag; ^ In file included from /Users/fbernardo/Documents/Development/_cppprojects/polyvox/tests/TestAStarPathfinder.cpp:30: In file included from /Library/Frameworks/QtTest.framework/Headers/QtTest:3: In file included from /Library/Frameworks/QtCore.framework/Headers/QtCore:80: In file included from /Library/Frameworks/QtCore.framework/Headers/qtconcurrentfilter.h:49: In file included from /Library/Frameworks/QtCore.framework/Headers/qtconcurrentfilterkernel.h:49: /Library/Frameworks/QtCore.framework/Headers/qtconcurrentiteratekernel.h:164:60: error: variable has incomplete type 'std::random_access_iterator_tag' inline bool selectIteration(std::random_access_iterator_tag) ^ /Library/Frameworks/QtCore.framework/Headers/qiterator.h:51:12: note: forward declaration of 'std::random_access_iterator_tag' struct random_access_iterator_tag; ^ 1 warning and 2 errors generated. make[2]: *** [tests/CMakeFiles/TestAStarPathfinder.dir/TestAStarPathfinder.cpp.o] Error 1 make[1]: *** [tests/CMakeFiles/TestAStarPathfinder.dir/all] Error 2 make: *** [all] Error 2 |
Author: | David Williams [ Sun Dec 28, 2014 8:56 pm ] |
Post subject: | Re: Problems compiling in Mac OS 10.9 with clang and Qt 4 |
Obviously we can't fix the Qt errors but the crash is strange. At some point you might want to test the latest 'develop' branch of PolyVox, perhaps some of these issues (at least the PolyVox compile errors) will have been resolved. The library is changing though so you would need to update your code. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |