ROOT6.24.02 VecGeom Build Error

I am getting this error when compiling with vecgeom.

 from /home/user/ROOT-6.24.02/ROOT-Build/geom/vecgeom/G__ConverterVG.cxx:14:
/usr/include/c++/10/bits/unique_ptr.h: In instantiation of ‘constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t) [with _Del = std::default_delete<TInterpreterValue>; <template-parameter-2-2> = void; _Tp = TInterpreterValue; _Dp = std::default_delete<TInterpreterValue>; std::nullptr_t = std::nullptr_t]’:
/home/user/ROOT-6.24.02/ROOT-Build/include/TInterpreter.h:278:85:   required from here
/usr/include/c++/10/bits/unique_ptr.h:321:9: error: no matching function for call to ‘std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data()’
  321 |  : _M_t()
      |         ^

I have tried to make sure everything is c++14 following on from other posts but to no avail. Any help will be greatly appreciated
ROOT Version: 6.24.02
Platform: Debian 11
Compiler: CC


Hi @ParticleTruthSeeker ,
I have a machine with Debian 11 too, can you please provide a sequence of commands that reproduces the problem?

Cheers,
Enrico

Hello! I can provide the CmakeCache.txt as a seperate attachment if its useful. I simply run the cmake-gui enabling vecgeom and veccore which have been installed in /usr/local/lib. VecGeom has been compiled with cuda 11.4 and the Vc backend to enable vectorisation support as I am interested to see what performance benefits might be had.

In the cmake-gui I have also changed:
clang_exectuable_version =14
cuda_nvcc_flags=-std=c++14
CXX_STANDARD_STRING=14
LIBCLANG_LIBRARY_VERSION=14
llvm_CXX_STD=c++14
veccore, vc builtins have all been disabled and to the best of my ability compiled with c++14

apart from that. I configure and generate then run make -j31 resulting in the error above. I have crawled several error posts so if there is anything else I can provide to help you understand please let me know.

Cheers!

Ok, a few more questions sorry :slight_smile:

How did you install veccore and vc?
Are you sure they were built with C++14?
if you build with make VERBOSE=1 does that confirm that the compilation is using C++14?

I will provide everything I can.
veccore vc and vecgeom installed by, sudo make install
vc build verbose

[ 94%] Linking CXX executable linkTest
/usr/bin/c++ -std=c++14 -std=c++14 -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef -Wold-style-cast -ftemplate-depth=128 -O3 -DNDEBUG -rdynamic CMakeFiles/gather_sse.dir/gather.cpp.o -o gather_sse  ../libVc.a 
cd /home/user/Vc/build/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/linkTest.dir/link.txt --verbose=1
/usr/bin/c++ -std=c++14 -std=c++14 -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef -Wold-style-cast -ftemplate-depth=128 -O3 -DNDEBUG -rdynamic CMakeFiles/scatterinterleavedmemory_scalar.dir/scatterinterleavedmemory.cpp.o -o scatterinterleavedmemory_scalar  ../libVc.a 
/usr/bin/c++ -std=c++14 -std=c++14 -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef -Wold-style-cast -ftemplate-depth=128 -O3 -DNDEBUG -rdynamic CMakeFiles/random_scalar.dir/random.cpp.o -o random_scalar  ../libVc.a 
make[2]: Leaving directory '/home/user/Vc/build'
/usr/bin/c++ -std=c++14 -std=c++14 -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef -Wold-style-cast -ftemplate-depth=128 -O3 -DNDEBUG -rdynamic CMakeFiles/type_traits_avx.dir/type_traits.cpp.o -o type_traits_avx  ../libVc.a 
/usr/bin/c++ -std=c++14 -std=c++14 -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef -Wold-style-cast -ftemplate-depth=128 -O3 -DNDEBUG -rdynamic CMakeFiles/casts_Vc_DEFAULT_TYPES_sse.dir/casts.cpp.o -o casts_Vc_DEFAULT_TYPES_sse  ../libVc.a 
/usr/bin/c++ -std=c++14 -std=c++14 -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef -Wold-style-cast -ftemplate-depth=128 -O3 -DNDEBUG -rdynamic CMakeFiles/scatterinterleavedmemory_avx2.dir/scatterinterleavedmemory.cpp.o -o scatterinterleavedmemory_avx2  ../libVc.a 
/usr/bin/c++ -std=c++14 -std=c++14 -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wshadow -Wundef -Wold-style-cast -ftemplate-depth=128 -O3 -DNDEBUG -rdynamic CMakeFiles/linkTest.dir/linkTest0.cpp.o CMakeFiles/linkTest.dir/linkTest1.cpp.o -o linkTest  -Wl,-rpath,/home/user/Vc/build/tests ../libVc.a liblinkTestLibDynamic1.so liblinkTestLibDynamic2.so liblinkTestLibStatic.a ../libVc.a 
[ 94%] Built target utils_sse

VecCore Build Verbose

make -j31
/usr/bin/cmake -S/home/user/VecCore/veccore -B/home/user/VecCore/Build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/user/VecCore/Build/CMakeFiles /home/user/VecCore/Build//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/user/VecCore/Build'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/user/VecCore/Build'
/usr/bin/cmake -E cmake_progress_start /home/user/VecCore/Build/CMakeFiles 0

vecgeom with cmake option verbose boolean = 1

[ 93%] Linking CXX executable TestMap
cd /home/user/VecGeom/Build/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/TestMap.dir/link.txt --verbose=1
/usr/bin/c++  -O3 -DNDEBUG  -Wall -fmax-errors=20 -ftree-vectorize -finline-limit=10000000 -fdiagnostics-color=auto  -faligned-new -mavx2 -O3 -DNDEBUG CMakeFiles/BooleanConvexityTest.dir/core/BooleanConvexityTest.cpp.o -o BooleanConvexityTest  -Wl,-rpath,/home/user/VecGeom/Build ../libvecgeom.a ../persistency/gdml/source/libvgdml.a ../libcudauserlib.so -ldl ../libvecgeomcuda.so ../persistency/gdml/source/libvgdml.a ../libvecgeom.a /usr/local/lib/libVc.a -lrt -lpthread /usr/lib/x86_64-linux-gnu/libxerces-c.so /usr/local/cuda/lib64/libcudart_static.a -ldl -pthread /usr/lib/x86_64-linux-gnu/librt.so 
/usr/bin/c++  -O3 -DNDEBUG  -Wall -fmax-errors=20 -ftree-vectorize -finline-limit=10000000 -fdiagnostics-color=auto  -faligned-new -mavx2 -O3 -DNDEBUG CMakeFiles/TestMap.dir/core/TestMap.cpp.o -o TestMap  -Wl,-rpath,/home/user/VecGeom/Build ../libvecgeom.a ../persistency/gdml/source/libvgdml.a ../libcudauserlib.so -ldl ../libvecgeomcuda.so ../persistency/gdml/source/libvgdml.a ../libvecgeom.a /usr/local/lib/libVc.a -lrt -lpthread /usr/lib/x86_64-linux-gnu/libxerces-c.so /usr/local/cuda/lib64/libcudart_static.a -ldl -pthread /usr/lib/x86_64-linux-gnu/librt.so 
make[2]: Leaving directory '/home/user/VecGeom/Build'

root build

[ 63%] Building CXX object interpreter/llvm/src/tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ExternalASTMerger.cpp.o
cd /home/user/ROOT-6.24.02/ROOT-Build/interpreter/llvm/src/tools/clang/lib/AST && /usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/user/ROOT-6.24.02/ROOT-Build/interpreter/llvm/src/tools/clang/lib/AST -I/home/user/ROOT-6.24.02/root-6.24.02/interpreter/llvm/src/tools/clang/lib/AST -I/home/user/ROOT-6.24.02/root-6.24.02/interpreter/llvm/src/tools/clang/include -I/home/user/ROOT-6.24.02/ROOT-Build/interpreter/llvm/src/tools/clang/include -I/usr/include/libxml2 -I/home/user/ROOT-6.24.02/ROOT-Build/interpreter/llvm/src/include -I/home/user/ROOT-6.24.02/root-6.24.02/interpreter/llvm/src/include -std=c++14 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -fno-semantic-interposition  -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++14 -w -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -g  -fvisibility=hidden -fvisibility-inlines-hidden   -UNDEBUG  -fno-exceptions -fno-rtti -std=c++14 -o CMakeFiles/obj.clangAST.dir/ExternalASTMerger.cpp.o -c /home/user/ROOT-6.24.02/root-6.24.02/interpreter/llvm/src/tools/clang/lib/AST/ExternalASTMerger.cpp

Thanks,
for the ROOT build and the VecCore build with just that part of the output it’s not possible to tell which C++ standard is being used, we need to see an invocation of the compiler (/usr/bin/c++ or similar).

Vc was definitely compiled with C++14, vecgeom was compiled without explicitly passing a c++ standard to the compiler, which should get you -std=gnu++14 which is the default (the GNU dialect of C++14, which should be compatible with C++14).

I deleted the contents of the veccore build directory but it wont output even with verbose the build options.

This is the fresh build of VecGeom.

[ 38%] Building CXX object CMakeFiles/vecgeom.dir/source/benchmarking/VolumePointers.cpp.o
/usr/bin/c++ -DVECCORE_ENABLE_CUDA -DVECCORE_ENABLE_VC -I/home/user/VecGeom/VecGeom -I/home/user/VecGeom/Build -isystem /usr/local/cuda/include -std=c++14 -O3 -DNDEBUG  -Wall -fmax-errors=20 -ftree-vectorize -finline-limit=10000000 -fdiagnostics-color=auto  -faligned-new -mavx2 -O3 -DNDEBUG -fPIC -std=c++14 -o CMakeFiles/vecgeom.dir/source/benchmarking/VolumePointers.cpp.o -c /home/user/VecGeom/VecGeom/source/benchmarking/VolumePointers.cpp
Generated /home/user/VecGeom/Build/CMakeFiles/vecgeomcuda.dir/cuda_src/./vecgeomcuda_generated_ReducedPolycone.cu.o successfully.
Generated /home/user/VecGeom/Build/CMakeFiles/vecgeomcuda.dir/cuda_src/./vecgeomcuda_generated_UnplacedPolyhedron.cu.o successfully.
cd /home/user/VecGeom/Build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/user/VecGeom/VecGeom /home/user/VecGeom/VecGeom /home/user/VecGeom/Build /home/user/VecGeom/Build /home/user/VecGeom/Build/CMakeFiles/vecgeomcuda_static.dir/DependInfo.cmake --color=
Scanning dependencies of target vecgeomcuda_static
make[2]: Leaving directory '/home/user/VecGeom/Build'
make  -f CMakeFiles/vecgeomcuda_static.dir/build.make CMakeFiles/vecgeomcuda_static.dir/build
make[2]: Entering directory '/home/user/VecGeom/Build'
[ 38%] Linking CXX static library libvecgeomcuda_static.a

the end of the build of VecGeom

[100%] Linking CXX executable TestConvexity
cd /home/user/VecGeom/Build/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/TestConvexity.dir/link.txt --verbose=1
/usr/bin/c++ -std=c++14 -O3 -DNDEBUG  -Wall -fmax-errors=20 -ftree-vectorize -finline-limit=10000000 -fdiagnostics-color=auto  -faligned-new -mavx2 -O3 -DNDEBUG CMakeFiles/TestConvexity.dir/core/TestConvexity.cpp.o -o TestConvexity  -Wl,-rpath,/home/user/VecGeom/Build ../libvecgeom.a ../persistency/gdml/source/libvgdml.a ../libcudauserlib.so -ldl ../libvecgeomcuda.so ../persistency/gdml/source/libvgdml.a ../libvecgeom.a /usr/local/lib/libVc.a -lrt -lpthread /usr/lib/x86_64-linux-gnu/libxerces-c.so /usr/local/cuda/lib64/libcudart_static.a -ldl -pthread /usr/lib/x86_64-linux-gnu/librt.so 
make[2]: Leaving directory '/home/user/VecGeom/Build'
[100%] Built target TestConvexity
make[1]: Leaving directory '/home/user/VecGeom/Build'
/usr/bin/cmake -E cmake_progress_start /home/user/VecGeom/Build/CMakeFiles 0

following this the last successful build step of root is this :

[ 84%] Building CXX object geom/vecgeom/CMakeFiles/G__ConverterVG.dir/G__ConverterVG.cxx.o
cd /home/user/ROOT-6.24.02/ROOT-Build/geom/vecgeom && /usr/bin/c++ -DVECCORE_ENABLE_CUDA -DVECCORE_ENABLE_VC -I/home/user/ROOT-6.24.02/root-6.24.02/geom/vecgeom/inc -I/home/user/ROOT-6.24.02/ROOT-Build/include -I/usr/local/cuda/include -I/home/user/ROOT-6.24.02/root-6.24.02/core/unix/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/foundation/v7/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/base/v7/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/clingutils/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/textinput/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/thread/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/zip/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/rint/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/clib/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/meta/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/gui/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/cont/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/foundation/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/base/inc -I/home/user/ROOT-6.24.02/ROOT-Build/ginclude -I/home/user/ROOT-6.24.02/root-6.24.02/geom/geom/inc -I/home/user/ROOT-6.24.02/root-6.24.02/io/io/v7/inc -I/home/user/ROOT-6.24.02/root-6.24.02/io/io/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/clib/res -I/home/user/ROOT-6.24.02/root-6.24.02/builtins -I/home/user/ROOT-6.24.02/root-6.24.02/math/mathcore/v7/inc -I/home/user/ROOT-6.24.02/root-6.24.02/math/mathcore/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/imt/inc -I/home/user/ROOT-6.24.02/root-6.24.02/core/multiproc/inc -I/home/user/ROOT-6.24.02/root-6.24.02/hist/hist/inc -I/home/user/ROOT-6.24.02/root-6.24.02/math/matrix/inc -I/home/user/ROOT-6.24.02/root-6.24.02/net/net/inc -std=c++14 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -fabi-version=6 -O3 -g -DNDEBUG -fPIC -std=c++14 -o CMakeFiles/G__ConverterVG.dir/G__ConverterVG.cxx.o -c /home/user/ROOT-6.24.02/ROOT-Build/geom/vecgeom/G__ConverterVG.cxx
cd /home/user/ROOT-6.24.02/ROOT-Build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/user/ROOT-6.24.02/root-6.24.02 /home/user/ROOT-6.24.02/root-6.24.02/geom/gdml /home/user/ROOT-6.24.02/ROOT-Build /home/user/ROOT-6.24.02/ROOT-Build/geom/gdml /home/user/ROOT-6.24.02/ROOT-Build/geom/gdml/CMakeFiles/G__Gdml.dir/DependInfo.cmake --color=
Scanning dependencies of target G__Gdml
make[2]: Leaving directory '/home/user/ROOT-6.24.02/ROOT-Build'
make  -f geom/gdml/CMakeFiles/G__Gdml.dir/build.make geom/gdml/CMakeFiles/G__Gdml.dir/build
make[2]: Entering directory '/home/user/ROOT-6.24.02/ROOT-Build'
[ 84%] Building CXX object geom/gdml/CMakeFiles/G__Gdml.dir/G__Gdml.cxx.o

then fails in the same way

iris/ROOT-6.24.02/ROOT-Build/include/TString.h:30,
                 from /home/user/ROOT-6.24.02/ROOT-Build/include/TNamed.h:26,
                 from /home/user/ROOT-6.24.02/ROOT-Build/include/TDictionary.h:44,
                 from /home/user/ROOT-6.24.02/ROOT-Build/include/TClass.h:23,
                 from /home/user/ROOT-6.24.02/ROOT-Build/geom/vecgeom/G__ConverterVG.cxx:14:
/usr/include/c++/10/bits/unique_ptr.h: In instantiation of ‘constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t) [with _Del = std::default_delete<TInterpreterValue>; <template-parameter-2-2> = void; _Tp = TInterpreterValue; _Dp = std::default_delete<TInterpreterValue>; std::nullptr_t = std::nullptr_t]’:
/home/user/ROOT-6.24.02/ROOT-Build/include/TInterpreter.h:278:85:   required from here
/usr/include/c++/10/bits/unique_ptr.h:321:9: error: no matching function for call to ‘std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data()’
  321 |  : _M_t()
      |         ^
/usr/include/c++/10/bits/unique_ptr.h:210:40: note: candidate: ‘std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data(std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >::pointer) [inherited from std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >]’
  210 |       using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
      |                                        ^~~~~~~~~~~~~~~
/usr/include/c++/10/bits/unique_ptr.h:210:40: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/10/bits/unique_ptr.h:210:40: note: candidate: ‘template<class _Del> std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data(std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >::pointer, _Del&&) [inherited from std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >]’
/usr/include/c++/10/bits/unique_ptr.h:210:40: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/unique_ptr.h:321:9: note:   candidate expects 2 arguments, 0 provided
  321 |  : _M_t()
      |         ^
/usr/include/c++/10/bits/unique_ptr.h:211:7: note: candidate: ‘std::__uniq_ptr_data<_Tp, _Dp, <anonymous>, <anonymous> >::__uniq_ptr_data(std::__uniq_ptr_data<_Tp, _Dp, <anonymous>, <anonymous> >&&) [with _Tp = TInterpreterValue; _Dp = std::default_delete<TInterpreterValue>; bool <anonymous> = true; bool <anonymous> = true]’
  211 |       __uniq_ptr_data(__uniq_ptr_data&&) = default;
      |       ^~~~~~~~~~~~~~~
/usr/include/c++/10/bits/unique_ptr.h:211:7: note:   candidate expects 1 argument, 0 provided
make[2]: *** [geom/vecgeom/CMakeFiles/G__ConverterVG.dir/build.make:100: geom/vecgeom/CMakeFiles/G__ConverterVG.dir/G__ConverterVG.cxx.o] Error 1
make[2]: Leaving directory '/home/user/ROOT-6.24.02/ROOT-Build'
make[1]: *** [CMakeFiles/Makefile2:37735: geom/vecgeom/CMakeFiles/G__ConverterVG.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

these people seem to think that -fabi-version=6 seen in the last successful step of root being built has something to do with this error.

If there is anything else I can try please let me know!

recompiled VecGeom and Root with cxx_flags -fabi-version=0 and -fabi-version=14

No change, error remains the same

I have “good” news, this Dockerfile reproduces the issue:

FROM debian:11

RUN apt-get -y -q update && apt-get -y -q upgrade
RUN apt-get -y -q install vim git cmake make dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev \
libxft-dev libxext-dev python libssl-dev gfortran libpcre3-dev \
xlibmesa-glu-dev libglew1.5-dev libftgl-dev \
libmariadb-dev libfftw3-dev libcfitsio-dev \
graphviz-dev libavahi-compat-libdnssd-dev \
libldap2-dev python-dev libxml2-dev libkrb5-dev \
libgsl0-dev
RUN mkdir repos
RUN git clone https://github.com/root-project/root.git repos/root
RUN git clone https://gitlab.cern.ch/VecGeom/VecGeom.git repos/vecgeom
RUN git clone https://github.com/VcDevel/Vc.git repos/vc
RUN git clone https://gitlab.cern.ch/VecGeom/VecCore.git repos/veccore
RUN cd repos/vc && git submodule update --init && mkdir build && \
    cd build && cmake -DCMAKE_INSTALL_PREFIX=/opt/Vc -DBUILD_TESTING=OFF .. && \
    make -j16 && make install
RUN cd repos/veccore && mkdir build && cd build && cmake .. && make -j16 install
RUN cd repos/vecgeom && mkdir build && cd build && cmake .. && make -j16 install
RUN cd repos/root && mkdir _build && cd _build && \
    cmake -Dfail-on-missing=ON -Dsqlite=OFF -Dpgsql=OFF -Doracle=OFF -Dbuiltin_gl2ps=ON -Dbuiltin_afterimage=ON \
          -Dbuiltin_lz4=ON -Dbuiltin_zstd=ON -Dbuiltin_xxhash=ON -Dbuiltin_lzma=ON -Dbuiltin_nlohmannjson=ON \
          -Dbuiltin_xrootd=ON -Dpythia6=OFF -Dpythia8=OFF -Dgfal=OFF -Ddavix=OFF -Dbuiltin_tbb=ON -Dbuiltin_vdt=ON\
          -Dvc=ON -Dveccore=ON -Dvecgeom=ON -Dtmva-pymva=OFF .. && \
    make -j4

The ROOT build failes with the following compilation error:

In file included from /usr/include/c++/10/memory:83,
                 from /repos/root/_build/include/ROOT/TypeTraits.hxx:15,
                 from /repos/root/_build/include/TString.h:30,
                 from /repos/root/_build/include/TNamed.h:26,
                 from /repos/root/_build/include/TDictionary.h:44,
                 from /repos/root/_build/include/TClass.h:23,
                 from /repos/root/_build/geom/vecgeom/G__ConverterVG.cxx:14:
/usr/include/c++/10/bits/unique_ptr.h: In instantiation of 'constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t) [with _Del = std::default_delete<TInterpreterValue>; <template-parameter-2-2> = void; _Tp = TInterpreterValue; _Dp = std::default_delete<TInterpreterValue>; std::nullptr_t = std::nullptr_t]':
/repos/root/_build/include/TInterpreter.h:278:85:   required from here
/usr/include/c++/10/bits/unique_ptr.h:321:9: error: no matching function for call to 'std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data()'
  321 |  : _M_t()
      |         ^
/usr/include/c++/10/bits/unique_ptr.h:210:40: note: candidate: 'std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data(std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >::pointer) [inherited from std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >]'
  210 |       using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
      |                                        ^~~~~~~~~~~~~~~
/usr/include/c++/10/bits/unique_ptr.h:210:40: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/10/bits/unique_ptr.h:210:40: note: candidate: 'template<class _Del> std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data(std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >::pointer, _Del&&) [inherited from std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >]'
/usr/include/c++/10/bits/unique_ptr.h:210:40: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/unique_ptr.h:321:9: note:   candidate expects 2 arguments, 0 provided
  321 |  : _M_t()
      |         ^
/usr/include/c++/10/bits/unique_ptr.h:211:7: note: candidate: 'std::__uniq_ptr_data<_Tp, _Dp, <anonymous>, <anonymous> >::__uniq_ptr_data(std::__uniq_ptr_data<_Tp, _Dp, <anonymous>, <anonymous> >&&) [with _Tp = TInterpreterValue; _Dp = std::default_delete<TInterpreterValue>; bool <anonymous> = true; bool <anonymous> = true]'
  211 |       __uniq_ptr_data(__uniq_ptr_data&&) = default;
      |       ^~~~~~~~~~~~~~~
/usr/include/c++/10/bits/unique_ptr.h:211:7: note:   candidate expects 1 argument, 0 provided

I still can’t tell why or how to work around it, work in progress :slight_smile: (@amadio @oshadura @bellenot does this ring a bell by any chance?)
Cheers,
Enrico

Thank you for the continued effort. At least its not just me haha.

I have never encountered this problem myself. What I can see that may be a problem is that VecGeom is compiled with AVX2, but ROOT is not, and that can probably cause issues. Please make sure that the SIMD flags are equivalent for VecGeom and ROOT.

I deleted everything and removed as far as I can see any mention to any simd flags.
This is the output from vecgeom.

[ 97%] Linking CXX executable TessellatedBenchmark
cd /home/user/VecGeom/Build/test && /usr/bin/cmake -E cmake_link_script CMakeFiles/TessellatedBenchmark.dir/link.txt --verbose=1
ccache /usr/bin/c++ -std=c++14 -fabi-version=0 -O3 -DNDEBUG  -Wall -fmax-errors=20 -ftree-vectorize -finline-limit=10000000 -fdiagnostics-color=auto  -faligned-new -O3 -DNDEBUG CMakeFiles/shape_testOrb.dir/shape_tester/shape_testOrb.cpp.o -o shape_testOrb  ../libvecgeom.a ../persistency/gdml/source/libvgdml.a -ldl ../libvecgeom.a /usr/local/lib/libVc.a -lrt -lpthread -ldl /usr/lib/x86_64-linux-gnu/libxerces-c.so 
ccache /usr/bin/c++ -std=c++14 -fabi-version=0 -O3 -DNDEBUG  -Wall -fmax-errors=20 -ftree-vectorize -finline-limit=10000000 -fdiagnostics-color=auto  -faligned-new -O3 -DNDEBUG CMakeFiles/TestVecGeomPolycone.dir/unit_tests/TestVecGeomPolycone.cpp.o -o TestVecGeomPolycone  ../libvecgeom.a ../persistency/gdml/source/libvgdml.a -ldl ../libvecgeom.a /usr/local/lib/libVc.a -lrt -lpthread -ldl /usr/lib/x86_64-linux-gnu/libxerces-c.so 
[ 98%] Building CXX object test/CMakeFiles/TestConvexity.dir/core/TestConvexity.cpp.o


This is the output from ROOT

 83%] Building CXX object geom/gdml/CMakeFiles/G__Gdml.dir/G__Gdml.cxx.o
cd /home/user/ROOT-6.24.04/ROOT-Build/geom/gdml && /usr/bin/c++ -DVECCORE_ENABLE_VC -I/home/user/ROOT-6.24.04/root-6.24.04/geom/gdml/inc -I/home/user/ROOT-6.24.04/ROOT-Build/include -I/home/user/ROOT-6.24.04/root-6.24.04/core/unix/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/foundation/v7/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/base/v7/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/clingutils/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/textinput/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/thread/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/zip/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/rint/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/clib/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/meta/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/gui/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/cont/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/foundation/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/base/inc -I/home/user/ROOT-6.24.04/ROOT-Build/ginclude -I/home/user/ROOT-6.24.04/root-6.24.04/geom/geom/inc -I/home/user/ROOT-6.24.04/root-6.24.04/io/io/v7/inc -I/home/user/ROOT-6.24.04/root-6.24.04/io/io/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/clib/res -I/home/user/ROOT-6.24.04/root-6.24.04/builtins -I/home/user/ROOT-6.24.04/root-6.24.04/math/mathcore/v7/inc -I/home/user/ROOT-6.24.04/root-6.24.04/math/mathcore/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/imt/inc -I/home/user/ROOT-6.24.04/root-6.24.04/core/multiproc/inc -I/home/user/ROOT-6.24.04/root-6.24.04/hist/hist/inc -I/home/user/ROOT-6.24.04/root-6.24.04/math/matrix/inc -I/home/user/ROOT-6.24.04/root-6.24.04/io/xml/inc -I/home/user/ROOT-6.24.04/root-6.24.04/net/net/inc -fabi-version=0 -I/usr/local/cuda/include -std=c++14 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG -fPIC -std=c++14 -o CMakeFiles/G__Gdml.dir/G__Gdml.cxx.o -c /home/user/ROOT-6.24.04/ROOT-Build/geom/gdml/G__Gdml.cxx
In file included from /usr/include/c++/10/memory:83,
                 from /home/user/ROOT-6.24.04/ROOT-Build/include/ROOT/TypeTraits.hxx:15,
                 from /home/user/ROOT-6.24.04/ROOT-Build/include/TString.h:30,
                 from /home/user/ROOT-6.24.04/ROOT-Build/include/TNamed.h:26,
                 from /home/user/ROOT-6.24.04/ROOT-Build/include/TDictionary.h:44,
                 from /home/user/ROOT-6.24.04/ROOT-Build/include/TClass.h:23,
                 from /home/user/ROOT-6.24.04/ROOT-Build/geom/vecgeom/G__ConverterVG.cxx:14:
/usr/include/c++/10/bits/unique_ptr.h: In instantiation of ‘constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t) [with _Del = std::default_delete<TInterpreterValue>; <template-parameter-2-2> = void; _Tp = TInterpreterValue; _Dp = std::default_delete<TInterpreterValue>; std::nullptr_t = std::nullptr_t]’:
/home/user/ROOT-6.24.04/ROOT-Build/include/TInterpreter.h:278:85:   required from here
/usr/include/c++/10/bits/unique_ptr.h:321:9: error: no matching function for call to ‘std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data()’
  321 |  : _M_t()
      |         ^
/usr/include/c++/10/bits/unique_ptr.h:210:40: note: candidate: ‘std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data(std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >::pointer) [inherited from std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >]’
  210 |       using __uniq_ptr_impl<_Tp, _Dp>::__uniq_ptr_impl;
      |                                        ^~~~~~~~~~~~~~~
/usr/include/c++/10/bits/unique_ptr.h:210:40: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/10/bits/unique_ptr.h:210:40: note: candidate: ‘template<class _Del> std::__uniq_ptr_data<TInterpreterValue, std::default_delete<TInterpreterValue>, true, true>::__uniq_ptr_data(std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >::pointer, _Del&&) [inherited from std::__uniq_ptr_impl<TInterpreterValue, std::default_delete<TInterpreterValue> >]’
/usr/include/c++/10/bits/unique_ptr.h:210:40: note:   template argument deduction/substitution failed:
/usr/include/c++/10/bits/unique_ptr.h:321:9: note:   candidate expects 2 arguments, 0 provided
  321 |  : _M_t()
      |         ^
/usr/include/c++/10/bits/unique_ptr.h:211:7: note: candidate: ‘std::__uniq_ptr_data<_Tp, _Dp, <anonymous>, <anonymous> >::__uniq_ptr_data(std::__uniq_ptr_data<_Tp, _Dp, <anonymous>, <anonymous> >&&) [with _Tp = TInterpreterValue; _Dp = std::default_delete<TInterpreterValue>; bool <anonymous> = true; bool <anonymous> = true]’
  211 |       __uniq_ptr_data(__uniq_ptr_data&&) = default;
      |       ^~~~~~~~~~~~~~~
/usr/include/c++/10/bits/unique_ptr.h:211:7: note:   candidate expects 1 argument, 0 provided
make[2]: *** [geom/vecgeom/CMakeFiles/G__ConverterVG.dir/build.make:100: geom/vecgeom/CMakeFiles/G__ConverterVG.dir/G__ConverterVG.cxx.o] Error 1
make[2]: Leaving directory '/home/user/ROOT-6.24.04/ROOT-Build'
make[1]: *** [CMakeFiles/Makefile2:36271: geom/vecgeom/CMakeFiles/G__ConverterVG.dir/all] Error 2

But I think Enrico’s docker script showed this behaviour above with no additional flags.

I am wondering if this has something to do with gcc10 and the clang that root builds?

This may be the cause, maybe try to compile ROOT with that as well to make sure that the ABI is compatible. I don’t know why VecGeom is adding that flag, it should probably be removed.

I added that flag as the default was -fabi-version=6 which has the same problem and ofcourse i use it in all builds but I can try again.

If you are adding the flag yourself, try removing it. The fact that it’s unique_ptr causing issues is indicative of an ABI mismatch somewhere.

That’s what FAQ: CMake Build Problems · Macaulay2/M2 Wiki · GitHub suggests, too. (Sorry I hadn’t shared that publicly yet.) IIUC that’s an issue with Debian 11’s default build flags?

I tried adding -DCMAKE_CXX_FLAGS="-fabi-version=0" in all four builds but the Dockerfile still reproduces the issue:

FROM debian:11

RUN apt-get -y -q update && apt-get -y -q upgrade
RUN apt-get -y -q install vim git cmake make dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev \
libxft-dev libxext-dev python libssl-dev gfortran libpcre3-dev \
xlibmesa-glu-dev libglew1.5-dev libftgl-dev \
libmariadb-dev libfftw3-dev libcfitsio-dev \
graphviz-dev libavahi-compat-libdnssd-dev \
libldap2-dev python-dev libxml2-dev libkrb5-dev \
libgsl0-dev
RUN mkdir repos
RUN git clone https://github.com/root-project/root.git repos/root
RUN git clone https://gitlab.cern.ch/VecGeom/VecGeom.git repos/vecgeom
RUN git clone https://github.com/VcDevel/Vc.git repos/vc
RUN git clone https://gitlab.cern.ch/VecGeom/VecCore.git repos/veccore
RUN cd repos/vc && git submodule update --init && mkdir build && \
    cd build && cmake -DCMAKE_CXX_FLAGS="-fabi-version=0" -DCMAKE_INSTALL_PREFIX=/opt/Vc -DBUILD_TESTING=OFF .. && \
    make -j16 && make install
RUN cd repos/veccore && mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS="-fabi-version=0" .. && make -j16 install
RUN cd repos/vecgeom && mkdir build && cd build && cmake -DCMAKE_CXX_FLAGS="-fabi-version=0" .. && make -j16 install
RUN cd repos/root && mkdir _build && cd _build && \
    cmake -Dfail-on-missing=ON -Dsqlite=OFF -Dpgsql=OFF -Doracle=OFF -Dbuiltin_gl2ps=ON -Dbuiltin_afterimage=ON \
          -Dbuiltin_lz4=ON -Dbuiltin_zstd=ON -Dbuiltin_xxhash=ON -Dbuiltin_lzma=ON -Dbuiltin_nlohmannjson=ON \
          -Dbuiltin_xrootd=ON -Dpythia6=OFF -Dpythia8=OFF -Dgfal=OFF -Ddavix=OFF -Dbuiltin_tbb=ON -Dbuiltin_vdt=ON\
          -Dvc=ON -Dveccore=ON -Dvecgeom=ON -Dtmva-pymva=OFF -DCMAKE_CXX_FLAGS="-fabi-version=0" .. && \
    make VERBOSE=1 -j4

This was my experience also.

/usr/include/c++/10.1.0/bits/unique_ptr.h:594:9: error: no matching function for call to std::__uniq_ptr_data when using GCC 10 or Clang 10

This issue is due to an old version of FFLAS_FFPACK or Givaro libraries inserting an unnecessary -fabi-version=6 flag to the compile command. Use the following command to tell CMake to build those libraries:

cmake -DBUILD_LIBRARIES="Givaro;FFLAS_FFPACK" .

I will try the above, as it seems the other blog mentions these libraries too. Probably required in all builds as well?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.