AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Mozilla Public License 2.0
2.65k stars 655 forks source link

openvdb/points/PointDataGrid.h:751:40: error: ‘make_unique’ is not a member of ‘std’ #820

Closed malaterre closed 4 years ago

malaterre commented 4 years ago

Latest release of OpenVDB 7.1.0 does break blender compilation on Debian buildds machines:

cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/source/blender/makesrna/intern && /usr/bin/cc -DGLEW_NO_GLU -DWITH_ASSERT_ABORT -DWITH_AUDASPACE -DWITH_BULLET -DWITH_CINEON -DWITH_COLLADA -DWITH_CYCLES -DWITH_DDS -DWITH_FFMPEG -DWITH_FFTW3 -DWITH_FLUID -DWITH_FREESTYLE -DWITH_GL_PROFILE_CORE -DWITH_HDR -DWITH_INPUT_NDOF -DWITH_INTERNATIONAL -DWITH_JACK -DWITH_OCEANSIM -DWITH_OPENAL -DWITH_OPENEXR -DWITH_OPENGL -DWITH_OPENIMAGEIO -DWITH_OPENJPEG -DWITH_OPENSUBDIV -DWITH_OPENVDB -DWITH_OPENVDB_BLOSC -DWITH_PYTHON -DWITH_SDL -DWITH_TIFF -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D__LITTLE_ENDIAN__ -D__MMX__ -D__SSE2__ -D__SSE__ -I/<<PKGBUILDDIR>>/source/blender/makesrna/intern -I/<<PKGBUILDDIR>>/source/blender/makesrna -I/<<PKGBUILDDIR>>/source/blender/blenfont -I/<<PKGBUILDDIR>>/source/blender/blenkernel -I/<<PKGBUILDDIR>>/source/blender/blenlib -I/<<PKGBUILDDIR>>/source/blender/blentranslation -I/<<PKGBUILDDIR>>/source/blender/bmesh -I/<<PKGBUILDDIR>>/source/blender/depsgraph -I/<<PKGBUILDDIR>>/source/blender/draw -I/<<PKGBUILDDIR>>/source/blender/gpu -I/<<PKGBUILDDIR>>/source/blender/ikplugin -I/<<PKGBUILDDIR>>/source/blender/imbuf -I/<<PKGBUILDDIR>>/source/blender/makesdna -I/<<PKGBUILDDIR>>/source/blender/nodes -I/<<PKGBUILDDIR>>/source/blender/physics -I/<<PKGBUILDDIR>>/source/blender/windowmanager -I/<<PKGBUILDDIR>>/source/blender/editors/include -I/<<PKGBUILDDIR>>/source/blender/render/extern/include -I/<<PKGBUILDDIR>>/intern/cycles/blender -I/<<PKGBUILDDIR>>/intern/atomic -I/<<PKGBUILDDIR>>/intern/glew-mx -I/<<PKGBUILDDIR>>/intern/guardedalloc -I/<<PKGBUILDDIR>>/intern/memutil -I/<<PKGBUILDDIR>>/intern/mantaflow/extern -I/<<PKGBUILDDIR>>/intern/clog -I/<<PKGBUILDDIR>>/source/blender/blenloader -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/source/blender/makesdna/intern -I/<<PKGBUILDDIR>>/source/blender/python -I/<<PKGBUILDDIR>>/intern/ffmpeg -I/<<PKGBUILDDIR>>/intern/rigidbody -I/<<PKGBUILDDIR>>/source/blender/freestyle -I/<<PKGBUILDDIR>>/intern/opensubdiv -isystem /<<PKGBUILDDIR>>/extern/audaspace/bindings/C -isystem /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/extern/audaspace -Wall -Wcast-align -Werror=implicit-function-declaration -Werror=return-type -Werror=vla -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wlogical-op -Wundef -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Wformat-signedness -Wrestrict -Wnonnull -Wabsolute-value -Wuninitialized -Wredundant-decls -Wshadow -Wno-error=unused-but-set-variable -Wimplicit-fallthrough=5 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -fuse-ld=gold -fopenmp -std=gnu11   -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -msse2 -Werror=implicit-function-declaration -Wno-missing-prototypes -o CMakeFiles/bf_rna.dir/rna_scene_gen.c.o -c /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/source/blender/makesrna/intern/rna_scene_gen.c
In file included from /<<PKGBUILDDIR>>/source/blender/blenkernel/intern/volume.cc:68:
/usr/include/openvdb/points/PointDataGrid.h: In member function ‘openvdb::v7_1::points::AttributeSet::UniquePtr openvdb::v7_1::points::PointDataLeafNode<T, Log2Dim>::stealAttributeSet()’:
/usr/include/openvdb/points/PointDataGrid.h:751:40: error: ‘make_unique’ is not a member of ‘std’
  751 |     AttributeSet::UniquePtr ptr = std::make_unique<AttributeSet>();
      |                                        ^~~~~~~~~~~
/usr/include/openvdb/points/PointDataGrid.h:751:40: note: ‘std::make_unique’ is only available from C++14 onwards
/usr/include/openvdb/points/PointDataGrid.h:751:64: error: expected primary-expression before ‘>’ token
  751 |     AttributeSet::UniquePtr ptr = std::make_unique<AttributeSet>();
      |                                                                ^
/usr/include/openvdb/points/PointDataGrid.h:751:66: error: expected primary-expression before ‘)’ token
  751 |     AttributeSet::UniquePtr ptr = std::make_unique<AttributeSet>();
      |                                                                  ^
Idclip commented 4 years ago

Please see https://github.com/AcademySoftwareFoundation/openvdb/issues/795 - in summary, you need to make sure you are specifying C++14. Closing as duplicate, if you think this is a different issue please re-open.