Issues for the installation

When I installed Allpix2 in my virtual machine, I ran into trouble:
when i :

cmake …

I meet the problem as follow:

– Source tarball build - no repository present, appending last commit for reference.
– Building Allpix^2 version v2.0.0-1515-gf4e21ae64-tar.
– Building “RelWithDebInfo”
– Installing to “/home/geant4/geant4_workspace/allpix-squared-master”
– Unit tests: 20 examples
– Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
– Found Python: /usr/bin/python3.8 (found version “3.8.10”) found components: Interpreter
– Could NOT find Pandoc (missing: PANDOC_EXECUTABLE)
– Could NOT find Latexmk (missing: LATEXMK_EXECUTABLE)
– Could NOT find Lualatex (missing: LUALATEX_EXECUTABLE)
– Could NOT find Biber (missing: BIBER_EXECUTABLE)
– Could NOT find Pygmentize (missing: PYGMENTIZE_EXECUTABLE)
– The CXX compiler identification is GNU 9.4.0
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– The C compiler identification is GNU 9.4.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Found PkgConfig: /usr/bin/pkg-config (found version “0.29.1”)
– Performing Test CXX_FLAG_WORKS__pedantic
– Performing Test CXX_FLAG_WORKS__pedantic - Success
– Performing Test CXX_FLAG_WORKS__Wall
– Performing Test CXX_FLAG_WORKS__Wall - Success
– Performing Test CXX_FLAG_WORKS__Wextra
– Performing Test CXX_FLAG_WORKS__Wextra - Success
– Performing Test CXX_FLAG_WORKS__Wcast_align
– Performing Test CXX_FLAG_WORKS__Wcast_align - Success
– Performing Test CXX_FLAG_WORKS__Wcast_qual
– Performing Test CXX_FLAG_WORKS__Wcast_qual - Success
– Performing Test CXX_FLAG_WORKS__Wconversion
– Performing Test CXX_FLAG_WORKS__Wconversion - Success
– Performing Test CXX_FLAG_WORKS__Wuseless_cast
– Performing Test CXX_FLAG_WORKS__Wuseless_cast - Success
– Performing Test CXX_FLAG_WORKS__Wctor_dtor_privacy
– Performing Test CXX_FLAG_WORKS__Wctor_dtor_privacy - Success
– Performing Test CXX_FLAG_WORKS__Wzero_as_null_pointer_constant
– Performing Test CXX_FLAG_WORKS__Wzero_as_null_pointer_constant - Success
– Performing Test CXX_FLAG_WORKS__Wdisabled_optimization
– Performing Test CXX_FLAG_WORKS__Wdisabled_optimization - Success
– Performing Test CXX_FLAG_WORKS__WformatE2
– Performing Test CXX_FLAG_WORKS__WformatE2 - Success
– Performing Test CXX_FLAG_WORKS__Winit_self
– Performing Test CXX_FLAG_WORKS__Winit_self - Success
– Performing Test CXX_FLAG_WORKS__Wlogical_op
– Performing Test CXX_FLAG_WORKS__Wlogical_op - Success
– Performing Test CXX_FLAG_WORKS__Wmissing_declarations
– Performing Test CXX_FLAG_WORKS__Wmissing_declarations - Success
– Performing Test CXX_FLAG_WORKS__Wmissing_include_dirs
– Performing Test CXX_FLAG_WORKS__Wmissing_include_dirs - Success
– Performing Test CXX_FLAG_WORKS__Wnoexcept
– Performing Test CXX_FLAG_WORKS__Wnoexcept - Success
– Performing Test CXX_FLAG_WORKS__Wold_style_cast
– Performing Test CXX_FLAG_WORKS__Wold_style_cast - Success
– Performing Test CXX_FLAG_WORKS__Wredundant_decls
– Performing Test CXX_FLAG_WORKS__Wredundant_decls - Success
– Performing Test CXX_FLAG_WORKS__Wsign_conversion
– Performing Test CXX_FLAG_WORKS__Wsign_conversion - Success
– Performing Test CXX_FLAG_WORKS__Wsign_promo
– Performing Test CXX_FLAG_WORKS__Wsign_promo - Success
– Performing Test CXX_FLAG_WORKS__Wstrict_null_sentinel
– Performing Test CXX_FLAG_WORKS__Wstrict_null_sentinel - Success
– Performing Test CXX_FLAG_WORKS__Wstrict_overflowE5
– Performing Test CXX_FLAG_WORKS__Wstrict_overflowE5 - Success
– Performing Test CXX_FLAG_WORKS__Wswitch_default
– Performing Test CXX_FLAG_WORKS__Wswitch_default - Success
– Performing Test CXX_FLAG_WORKS__Wundef
– Performing Test CXX_FLAG_WORKS__Wundef - Success
– Performing Test CXX_FLAG_WORKS__Wshadow
– Performing Test CXX_FLAG_WORKS__Wshadow - Success
– Performing Test CXX_FLAG_WORKS__Wformat_security
– Performing Test CXX_FLAG_WORKS__Wformat_security - Success
– Performing Test CXX_FLAG_WORKS__Wdeprecated
– Performing Test CXX_FLAG_WORKS__Wdeprecated - Success
– Performing Test CXX_FLAG_WORKS__fdiagnostics_colorEauto
– Performing Test CXX_FLAG_WORKS__fdiagnostics_colorEauto - Success
– Performing Test CXX_FLAG_WORKS__Wheader_hygiene
– Performing Test CXX_FLAG_WORKS__Wheader_hygiene - Failed
– NOT adding -Wheader-hygiene to CXX_FLAGS - unsupported flag
– Performing Test CXX_FLAG_WORKS__Wno_overloaded_virtual
– Performing Test CXX_FLAG_WORKS__Wno_overloaded_virtual - Success
– Performing Test SUPPORT_STD_CXX17
– Performing Test SUPPORT_STD_CXX17 - Success
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version “1.71.0”, minimum required is “1.64.0”) found components: random
CMake Error at CMakeLists.txt:307 (MESSAGE):
ROOT was built with an unsupported C++ version, C++17 is required:
-std=c++14 -pipe -fsigned-char -pthread

– Configuring incomplete, errors occurred!
See also “/home/geant4/geant4_workspace/allpix-squared-master/build/CMakeFiles/CMakeOutput.log”.
See also “/home/geant4/geant4_workspace/allpix-squared-master/build/CMakeFiles/CMakeError.log”.

Hi @Newyean

the answer is in the error listing:

 ROOT was built with an unsupported C++ version, C++17 is required:

Your ROOT version in the Virtual Machine has been built with C++14 only, but Allpix Squared needs C++17. This means you need to rebuild ROOT using cmake -DCMAKE_CXX_STANDARD=17 .

Cheers,
Simon

Thanks for your reply~! I’ve compiled successfully.
By the following:

cmake …

we can find:

– Source tarball build - no repository present, appending last commit for reference.
– Building Allpix^2 version v2.3.0-tar.
– Building “RelWithDebInfo”
– Found Doxygen: /usr/bin/doxygen (found version “1.8.17”) found components: doxygen missing components: dot
– Found LATEX: /usr/bin/latex
– Found LaTeX compiler.
– Found UnixCommands: /usr/bin/bash
– Manual: adding 28 module descriptions
– Manual: adding 13 example descriptions
– The CXX compiler identification is GNU 9.4.0
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Performing Test CXX_FLAG_WORKS__pedantic
– Performing Test CXX_FLAG_WORKS__pedantic - Success
– Performing Test CXX_FLAG_WORKS__Wall
– Performing Test CXX_FLAG_WORKS__Wall - Success
– Performing Test CXX_FLAG_WORKS__Wextra
– Performing Test CXX_FLAG_WORKS__Wextra - Success
– Performing Test CXX_FLAG_WORKS__Wcast_align
– Performing Test CXX_FLAG_WORKS__Wcast_align - Success
– Performing Test CXX_FLAG_WORKS__Wcast_qual
– Performing Test CXX_FLAG_WORKS__Wcast_qual - Success
– Performing Test CXX_FLAG_WORKS__Wconversion
– Performing Test CXX_FLAG_WORKS__Wconversion - Success
– Performing Test CXX_FLAG_WORKS__Wuseless_cast
– Performing Test CXX_FLAG_WORKS__Wuseless_cast - Success
– Performing Test CXX_FLAG_WORKS__Wctor_dtor_privacy
– Performing Test CXX_FLAG_WORKS__Wctor_dtor_privacy - Success
– Performing Test CXX_FLAG_WORKS__Wzero_as_null_pointer_constant
– Performing Test CXX_FLAG_WORKS__Wzero_as_null_pointer_constant - Success
– Performing Test CXX_FLAG_WORKS__Wdisabled_optimization
– Performing Test CXX_FLAG_WORKS__Wdisabled_optimization - Success
– Performing Test CXX_FLAG_WORKS__WformatE2
– Performing Test CXX_FLAG_WORKS__WformatE2 - Success
– Performing Test CXX_FLAG_WORKS__Winit_self
– Performing Test CXX_FLAG_WORKS__Winit_self - Success
– Performing Test CXX_FLAG_WORKS__Wlogical_op
– Performing Test CXX_FLAG_WORKS__Wlogical_op - Success
– Performing Test CXX_FLAG_WORKS__Wmissing_declarations
– Performing Test CXX_FLAG_WORKS__Wmissing_declarations - Success
– Performing Test CXX_FLAG_WORKS__Wmissing_include_dirs
– Performing Test CXX_FLAG_WORKS__Wmissing_include_dirs - Success
– Performing Test CXX_FLAG_WORKS__Wnoexcept
– Performing Test CXX_FLAG_WORKS__Wnoexcept - Success
– Performing Test CXX_FLAG_WORKS__Wold_style_cast
– Performing Test CXX_FLAG_WORKS__Wold_style_cast - Success
– Performing Test CXX_FLAG_WORKS__Wredundant_decls
– Performing Test CXX_FLAG_WORKS__Wredundant_decls - Success
– Performing Test CXX_FLAG_WORKS__Wsign_conversion
– Performing Test CXX_FLAG_WORKS__Wsign_conversion - Success
– Performing Test CXX_FLAG_WORKS__Wsign_promo
– Performing Test CXX_FLAG_WORKS__Wsign_promo - Success
– Performing Test CXX_FLAG_WORKS__Wstrict_null_sentinel
– Performing Test CXX_FLAG_WORKS__Wstrict_null_sentinel - Success
– Performing Test CXX_FLAG_WORKS__Wstrict_overflowE5
– Performing Test CXX_FLAG_WORKS__Wstrict_overflowE5 - Success
– Performing Test CXX_FLAG_WORKS__Wswitch_default
– Performing Test CXX_FLAG_WORKS__Wswitch_default - Success
– Performing Test CXX_FLAG_WORKS__Wundef
– Performing Test CXX_FLAG_WORKS__Wundef - Success
– Performing Test CXX_FLAG_WORKS__Wshadow
– Performing Test CXX_FLAG_WORKS__Wshadow - Success
– Performing Test CXX_FLAG_WORKS__Wformat_security
– Performing Test CXX_FLAG_WORKS__Wformat_security - Success
– Performing Test CXX_FLAG_WORKS__Wdeprecated
– Performing Test CXX_FLAG_WORKS__Wdeprecated - Success
– Performing Test CXX_FLAG_WORKS__fdiagnostics_colorEauto
– Performing Test CXX_FLAG_WORKS__fdiagnostics_colorEauto - Success
– Performing Test CXX_FLAG_WORKS__Wheader_hygiene
– Performing Test CXX_FLAG_WORKS__Wheader_hygiene - Failed
– NOT adding -Wheader-hygiene to CXX_FLAGS - unsupported flag
– Performing Test CXX_FLAG_WORKS__Wno_overloaded_virtual
– Performing Test CXX_FLAG_WORKS__Wno_overloaded_virtual - Success
– Performing Test SUPPORT_STD_CXX17
– Performing Test SUPPORT_STD_CXX17 - Success
– Looking for C++ include pthread.h
– Looking for C++ include pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version “1.71.0”, minimum required is “1.64.0”) found components: random
– Found /usr/bin/clang-format-12 version 12, adding formatting targets
– Could NOT check for clang-tidy, wrong compiler: GNU
– Unit tests: 17 examples
– Building module ON - CSADigitizer
– Building module ON - CapacitiveTransfer
– Found PkgConfig: /usr/bin/pkg-config (found version “0.29.1”)
– Checking for module ‘eigen3’
– Found eigen3, version 3.3.7
– Building module ON - CorryvreckanWriter
– Building module OFF - DatabaseWriter
– Building module ON - DefaultDigitizer
– Building module ON - DepositionCosmics
– The C compiler identification is GNU 9.4.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Found EXPAT: /usr/lib/x86_64-linux-gnu/libexpat.so (found suitable version “2.2.9”, minimum required is “2.2.9”)
– Check if compiler accepts -pthread
– Check if compiler accepts -pthread - yes
– Found X11: /usr/include
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
– Looking for gethostbyname
– Looking for gethostbyname - found
– Looking for connect
– Looking for connect - found
– Looking for remove
– Looking for remove - found
– Looking for shmat
– Looking for shmat - found
– Looking for IceConnectionNumber in ICE
– Looking for IceConnectionNumber in ICE - found
– Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
– Building module ON - DepositionGeant4
– Building module ON - DepositionPointCharge
– Building module ON - DepositionReader
– Building module ON - DetectorHistogrammer
– Building module ON - DopingProfileReader
– Building module ON - Dummy
– Building module ON - ElectricFieldReader
– Building module ON - GDMLOutputWriter
– Building module ON - GenericPropagation
– Building module ON - GeometryBuilderGeant4
– Building module ON - InducedTransfer
– Building module OFF - LCIOWriter
– Building module ON - MagneticFieldReader
– Building module ON - ProjectionPropagation
– Building module ON - PulseTransfer
– Building module ON - RCEWriter
– Building module ON - ROOTObjectReader
– Building module ON - ROOTObjectWriter
– Building module ON - SimpleTransfer
– Building module ON - TextWriter
– Building module ON - TransientPropagation
– Building module ON - VisualizationGeant4
– Building module ON - WeightingPotentialReader
– Building Geant4 Interface
– Unit tests: 70 framework core functionality tests
– Unit tests: 107 module functionality tests
– Modules without functionality tests:
– Dummy
– GDMLOutputWriter
– InducedTransfer
– TransientPropagation
– VisualizationGeant4
– Unit tests: 5 performance tests
– Configuring done
– Generating done
– Build files have been written to: /home/geant4/allpix-squared-v2.3.0/build

But i met other question:
when I

make install

I found :

[ 2%] Built target fetch_cry_data
[ 2%] Building CXX object src/objects/CMakeFiles/AllpixObjectsDictionary.dir/AllpixObjectsDictionary.cxx.o
[ 4%] Built target apf_dump
[ 7%] Building CXX object tools/mesh_converter/CMakeFiles/mesh_plotter.dir/MeshPlotter.cpp.o
[ 9%] Built target field_converter
[ 9%] Building CXX object src/modules/CorryvreckanWriter/CMakeFiles/CorryvreckanWriterObjects.dir/corryvreckan/Object.cpp.o
[ 9%] Building CXX object src/modules/CorryvreckanWriter/CMakeFiles/CorryvreckanWriterObjects.dir/corryvreckan/Pixel.cpp.o
[ 12%] Building CXX object src/modules/CorryvreckanWriter/CMakeFiles/CorryvreckanWriterObjects.dir/corryvreckan/Event.cpp.o
[ 12%] Building CXX object tools/weightingpotential_generator/CMakeFiles/generate_potential.dir///src/core/config/ConfigReader.cpp.o
[ 12%] Building CXX object tools/weightingpotential_generator/CMakeFiles/generate_potential.dir/WeightingPotentialGenerator.cpp.o
[ 12%] Building CXX object tools/mesh_converter/CMakeFiles/mesh_converter.dir/MeshConverter.cpp.o
In file included from /opt/root/include/TString.h:29,
from /opt/root/include/TNamed.h:26,
from /opt/root/include/TDictionary.h:44,
from /opt/root/include/TClass.h:23,
from /opt/root/include/TTree.h:36,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/opt/root/include/ROOT/RStringView.hxx:32:10: error: conflicting declaration of template ‘template<class _CharT, class _Traits> using basic_string_view = std::experimental::fundamentals_v1::basic_string_view<_CharT, _Traits>’
32 | using basic_string_view = ::std::experimental::basic_string_view<_CharT,_Traits>;
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/basic_string.h:48,
from /usr/include/c++/9/string:55,
from /opt/root/include/TSchemaHelper.h:17,
from /opt/root/include/TGenericClassInfo.h:21,
from /opt/root/include/Rtypes.h:191,
from /opt/root/include/ROOT/TIOFeatures.hxx:14,
from /opt/root/include/TTree.h:30,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/string_view:90:11: note: previous declaration ‘template<class _CharT, class _Traits> class std::basic_string_view’
90 | class basic_string_view
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:74,
from /opt/root/include/ROOT/TypeTraits.hxx:15,
from /opt/root/include/TString.h:30,
from /opt/root/include/TNamed.h:26,
from /opt/root/include/TDictionary.h:44,
from /opt/root/include/TClass.h:23,
from /opt/root/include/TTree.h:36,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/ext/concurrence.h:53:16: error: ‘_Lock_policy’ does not name a type
53 | static const _Lock_policy __default_lock_policy =
| ^~~~~~~~~~~~
In file included from /usr/include/c++/9/cstddef:49,
from /opt/root/include/RtypesCore.h:28,
from /opt/root/include/Compression.h:15,
from /opt/root/include/TTree.h:29,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/ext/concurrence.h: In function ‘void std::__throw_concurrence_lock_error()’:
/usr/include/c++/9/ext/concurrence.h:99:5: error: ‘__concurrence_lock_error’ was not declared in this scope; did you mean ‘__gnu_cxx::__concurrence_lock_error’?
99 | { _GLIBCXX_THROW_OR_ABORT(__concurrence_lock_error()); }
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:74,
from /opt/root/include/ROOT/TypeTraits.hxx:15,
from /opt/root/include/TString.h:30,
from /opt/root/include/TNamed.h:26,
from /opt/root/include/TDictionary.h:44,
from /opt/root/include/TClass.h:23,
from /opt/root/include/TTree.h:36,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/ext/concurrence.h:64:9: note: ‘__gnu_cxx::__concurrence_lock_error’ declared here
64 | class __concurrence_lock_error : public std::exception
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/cstddef:49,
from /opt/root/include/RtypesCore.h:28,
from /opt/root/include/Compression.h:15,
from /opt/root/include/TTree.h:29,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/ext/concurrence.h: In function ‘void std::__throw_concurrence_unlock_error()’:
/usr/include/c++/9/ext/concurrence.h:103:5: error: ‘__concurrence_unlock_error’ was not declared in this scope; did you mean ‘__gnu_cxx::__concurrence_unlock_error’?
103 | { _GLIBCXX_THROW_OR_ABORT(__concurrence_unlock_error()); }
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:74,
from /opt/root/include/ROOT/TypeTraits.hxx:15,
from /opt/root/include/TString.h:30,
from /opt/root/include/TNamed.h:26,
from /opt/root/include/TDictionary.h:44,
from /opt/root/include/TClass.h:23,
from /opt/root/include/TTree.h:36,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/ext/concurrence.h:72:9: note: ‘__gnu_cxx::__concurrence_unlock_error’ declared here
72 | class __concurrence_unlock_error : public std::exception
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/cstddef:49,
from /opt/root/include/RtypesCore.h:28,
from /opt/root/include/Compression.h:15,
from /opt/root/include/TTree.h:29,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/ext/concurrence.h: In function ‘void std::__throw_concurrence_broadcast_error()’:
/usr/include/c++/9/ext/concurrence.h:108:5: error: ‘__concurrence_broadcast_error’ was not declared in this scope; did you mean ‘__gnu_cxx::__concurrence_broadcast_error’?
108 | { _GLIBCXX_THROW_OR_ABORT(__concurrence_broadcast_error()); }
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:74,
from /opt/root/include/ROOT/TypeTraits.hxx:15,
from /opt/root/include/TString.h:30,
from /opt/root/include/TNamed.h:26,
from /opt/root/include/TDictionary.h:44,
from /opt/root/include/TClass.h:23,
from /opt/root/include/TTree.h:36,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/ext/concurrence.h:80:9: note: ‘__gnu_cxx::__concurrence_broadcast_error’ declared here
80 | class __concurrence_broadcast_error : public std::exception
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/cstddef:49,
from /opt/root/include/RtypesCore.h:28,
from /opt/root/include/Compression.h:15,
from /opt/root/include/TTree.h:29,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/ext/concurrence.h: In function ‘void std::__throw_concurrence_wait_error()’:
/usr/include/c++/9/ext/concurrence.h:112:5: error: ‘__concurrence_wait_error’ was not declared in this scope; did you mean ‘__gnu_cxx::__concurrence_wait_error’?
112 | { _GLIBCXX_THROW_OR_ABORT(__concurrence_wait_error()); }
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/memory:74,
from /opt/root/include/ROOT/TypeTraits.hxx:15,
from /opt/root/include/TString.h:30,
from /opt/root/include/TNamed.h:26,
from /opt/root/include/TDictionary.h:44,
from /opt/root/include/TClass.h:23,
from /opt/root/include/TTree.h:36,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.cpp:11:
/usr/include/c++/9/ext/concurrence.h:88:9: note: ‘__gnu_cxx::__concurrence_wait_error’ declared here
88 | class __concurrence_wait_error : public std::exception
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/ext/concurrence.h: In member function ‘void __gnu_cxx::__mutex::lock()’:
/usr/include/c++/9/ext/concurrence.h:150:6: error: ‘__throw_concurrence_lock_error’ was not declared in this scope; did you mean ‘std::__throw_concurrence_lock_error’?
150 | __throw_concurrence_lock_error();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| std::__throw_concurrence_lock_error
/usr/include/c++/9/ext/concurrence.h:98:3: note: ‘std::__throw_concurrence_lock_error’ declared here
98 | __throw_concurrence_lock_error()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/ext/concurrence.h: In member function ‘void __gnu_cxx::__mutex::unlock()’:
/usr/include/c++/9/ext/concurrence.h:161:6: error: ‘__throw_concurrence_unlock_error’ was not declared in this scope; did you mean ‘std::__throw_concurrence_unlock_error’?
161 | __throw_concurrence_unlock_error();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| std::__throw_concurrence_unlock_error
/usr/include/c++/9/ext/concurrence.h:102:3: note: ‘std::__throw_concurrence_unlock_error’ declared here
102 | __throw_concurrence_unlock_error()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/root/include/TString.h:29,
from /opt/root/include/TNamed.h:26,
from /opt/root/include/TDictionary.h:44,
from /opt/root/include/TClass.h:23,
from /opt/root/include/TTree.h:36,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Event.hpp:4,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Event.cpp:11:
/opt/root/include/ROOT/RStringView.hxx:32:10: error: conflicting declaration of template ‘template<class _CharT, class _Traits> using basic_string_view = std::experimental::fundamentals_v1::basic_string_view<_CharT, _Traits>’
32 | using basic_string_view = ::std::experimental::basic_string_view<_CharT,_Traits>;
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/bits/basic_string.h:48,
from /usr/include/c++/9/string:55,
from /opt/root/include/TSchemaHelper.h:17,
from /opt/root/include/TGenericClassInfo.h:21,
from /opt/root/include/Rtypes.h:191,
from /opt/root/include/ROOT/TIOFeatures.hxx:14,
from /opt/root/include/TTree.h:30,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Object.hpp:19,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Event.hpp:4,
from /home/geant4/allpix-squared-v2.3.0/src/modules/CorryvreckanWriter/corryvreckan/Event.cpp:11:
/usr/include/c++/9/string_view:90:11: note: previous declaration ‘template<class _CharT, class _Traits> class std::basic_string_view’
90 | class basic_string_view
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/9/ext/concurrence.h: In member function ‘void __gnu_cxx::__recursive_mutex::lock()’:
/usr/include/c++/9/ext/concurrence.h:205:6: error: ‘__throw_concurrence_lock_error’ was not declared in this scope; did you mean ‘std::__throw_concurrence_lock_error’?
205 | __throw_concurrence_lock_error();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| std::__throw_concurrence_lock_error
/usr/include/c++/9/ext/concurrence.h:98:3: note: ‘std::__throw_concurrence_lock_error’ declared here
98 | __throw_concurrence_lock_error()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/ext/concurrence.h: In member function ‘void __gnu_cxx::__recursive_mutex::unlock()’:
/usr/include/c++/9/ext/concurrence.h:216:6: error: ‘__throw_concurrence_unlock_error’ was not declared in this scope; did you mean ‘std::__throw_concurrence_unlock_error’?
216 | __throw_concurrence_unlock_error();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| std::__throw_concurrence_unlock_error
/usr/include/c++/9/ext/concurrence.h:102:3: note: ‘std::__throw_concurrence_unlock_error’ > declared here
102 | __throw_concurrence_unlock_error()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/ext/concurrence.h: At global scope:
/usr/include/c++/9/ext/concurrence.h:231:13: error: ‘__mutex’ does not name a type
231 | typedef __mutex __mutex_type;
| ^~~~~~~
In file included from /usr/include/c++/9/memory:74,

/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:43: error: ‘allpix::Log’ has not been declared
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:43: note: in definition of macro ‘LOG’
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:80: error: ‘allpix::Log’ has not been declared
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:80: note: in definition of macro ‘LOG’
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:257:13: error: ‘Log’ is not a member of ‘allpix’
257 | allpix::Log().getStream(
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:257:13: note: in definition of macro ‘LOG’
257 | allpix::Log().getStream(
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:43: error: ‘allpix::Log’ has not been declared
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:43: note: in definition of macro ‘LOG’
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:80: error: ‘allpix::Log’ has not been declared
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:80: note: in definition of macro ‘LOG’
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:257:13: error: ‘Log’ is not a member of ‘allpix’
257 | allpix::Log().getStream(
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:257:13: note: in definition of macro ‘LOG’
257 | allpix::Log().getStream(
| ^~~
/home/geant4/allpix-squared-v2.3.0/tools/mesh_converter/MeshConverter.cpp:513:25: error: ‘class allpix::ConfigurationError’ has no member named ‘what’
513 | << e.what() << std::endl
| ^~~~
In file included from /home/geant4/allpix-squared-v2.3.0/tools/mesh_converter/MeshConverter.cpp:22:
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:43: error: ‘allpix::Log’ has not been declared
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:43: note: in definition of macro ‘LOG’
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:80: error: ‘allpix::Log’ has not been declared
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:256:80: note: in definition of macro ‘LOG’
256 | if(allpix::LogLevel::level <= allpix::Log::getReportingLevel() && !allpix::Log::getStreams().empty())
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:257:13: error: ‘Log’ is not a member of ‘allpix’
257 | allpix::Log().getStream(
| ^~~
/home/geant4/allpix-squared-v2.3.0/src/core/utils/log.h:257:13: note: in definition of macro ‘LOG’
257 | allpix::Log().getStream(
| ^~~
/home/geant4/allpix-squared-v2.3.0/tools/mesh_converter/MeshConverter.cpp:522:5: error: ‘Log’ has not been declared
522 | Log::finish();
| ^~~
In file included from /usr/include/c++/9/algorithm:62,
from /home/geant4/allpix-squared-v2.3.0/tools/mesh_converter/MeshConverter.cpp:1:
/usr/include/c++/9/bits/stl_algo.h: At global scope:
/usr/include/c++/9/bits/stl_algo.h:5674:5: warning: ‘constexpr _FIter std::min_element(_FIter, _FIter, _Compare) [with _FIter = __gnu_cxx::__normal_iterator<mesh_converter::Point*, std::vector<mesh_converter::Point> >; _Compare = std::main(int, char**)::<lambda(auto:29&, auto:30&)>]’ used but never defined
5674 | min_element(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/9/bits/stl_algo.h:5738:5: warning: ‘constexpr _FIter std::max_element(_FIter, _FIter, _Compare) [with _FIter = __gnu_cxx::__normal_iterator<mesh_converter::Point*, std::vector<mesh_converter::Point> >; _Compare = std::main(int, char**)::<lambda(auto:27&, auto:28&)>]’ used but never defined
5738 | max_element(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/9/bits/stl_algo.h:5674:5: warning: ‘constexpr _FIter std::min_element(_FIter, _FIter, _Compare) [with _FIter = __gnu_cxx::__normal_iterator<mesh_converter::Point*, std::vector<mesh_converter::Point> >; _Compare = std::main(int, char**)::<lambda(auto:25&, auto:26&)>]’ used but never defined
5674 | min_element(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/9/bits/stl_algo.h:5738:5: warning: ‘constexpr _FIter std::max_element(_FIter, _FIter, _Compare) [with _FIter = __gnu_cxx::__normal_iterator<mesh_converter::Point*, std::vector<mesh_converter::Point> >; _Compare = std::main(int, char**)::<lambda(auto:23&, auto:24&)>]’ used but never defined
5738 | max_element(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/9/bits/stl_algo.h:5674:5: warning: ‘constexpr _FIter std::min_element(_FIter, _FIter, _Compare) [with _FIter = __gnu_cxx::__normal_iterator<mesh_converter::Point*, std::vector<mesh_converter::Point> >; _Compare = std::main(int, char**)::<lambda(auto:21&, auto:22&)>]’ used but never defined
5674 | min_element(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
make[2]: *** [tools/mesh_converter/CMakeFiles/mesh_converter.dir/build.make:76:tools/mesh_converter/CMakeFiles/mesh_converter.dir/MeshConverter.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:2464:tools/mesh_converter/CMakeFiles/mesh_converter.dir/all] 错误 2

Hi @Newyean

the CMake output looks fine, but the make error indicates there still seems to be an issue with the ROOT C++ version. It only declares std::basic_string_view if it is not present in the C++ STL, and there it is since C++11. Does ROOT work otherwise if you try to run and use it? What are the options you set when compiling ROOT?

Cheers,
Simon

Very thanks for your reply! When I try to run and use ROOT, it works very well. And since it took a long time to install ROOT, and my level is relatively low, I’m not sure what special options I set during the ROOT compilation process, but I think it’s just plain Settings.

Sorry, typo form my side, std::string_view is C++17 - can you make sure you are compiling everything with C++17?

Oh! Maybe I didn’t use the C++17 when compiling ROOT. Very thanks~

In principle we should be able to detector this, and we do have a check to make sure ROOT is compiled with C++17 - that’s why I find this issue strange and don’t know a solution right away… :confused:

This requires me to install and compile ROOT again :sob:. I will try it out. Thanks again for your help. :grinning:

Yeah, I know, it’s no fun… :grimacing: You can however switch off many of the components of ROOT and therefore reduce the compilation time significantly.