I have:
conda version 4.10.3
Python version 3.8.12
Trying to compile any Geant4 examples on Linux Mint 19.2 I get:
– The C compiler identification is GNU 9.3.0
– The CXX compiler identification is GNU 9.3.0
– Check for working C compiler: /home/peter/anaconda3/bin/x86_64-conda-linux-gnu-cc
– Check for working C compiler: /home/peter/anaconda3/bin/x86_64-conda-linux-gnu-cc - works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /home/peter/anaconda3/bin/x86_64-conda-linux-gnu-c++
– Check for working CXX compiler: /home/peter/anaconda3/bin/x86_64-conda-linux-gnu-c++ - works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found EXPAT: /home/peter/anaconda3/lib/libexpat.so (found suitable version “2.4.1”, minimum required is “2.4.1”)
– Found ZLIB: /home/peter/anaconda3/lib/libz.so (found suitable version “1.2.11”, minimum required is “1.2.11”)
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
– Check if compiler accepts -pthread
– Check if compiler accepts -pthread - yes
– Found Threads: TRUE
– Found XercesC: /home/peter/anaconda3/lib/libxerces-c.so (found suitable version “3.2.3”, minimum required is “3.2.3”)
– Found Freetype: /home/peter/anaconda3/lib/libfreetype.so (found suitable version “2.10.4”, minimum required is “2.10.4”)
– Found X11: /home/peter/anaconda3/include
– Looking for XOpenDisplay in /home/peter/anaconda3/lib/libX11.so;/home/peter/anaconda3/lib/libXext.so
– Looking for XOpenDisplay in /home/peter/anaconda3/lib/libX11.so;/home/peter/anaconda3/lib/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: /home/peter/anaconda3/x86_64-conda-linux-gnu/sysroot/usr/lib/libGL.so
– Configuring done
– Generating done
– Build files have been written to: /home/peter/anaconda3/share/Geant4-10.7.2/examples/basic/B1
(base) peter@Beta:~/anaconda3/share/Geant4-10.7.2/examples/basic/B1$ make
Scanning dependencies of target exampleB1
[ 12%] Building CXX object CMakeFiles/exampleB1.dir/exampleB1.cc.o
In file included from /home/peter/anaconda3/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/locale_facets_nonio.h:39,
from /home/peter/anaconda3/x86_64-conda-linux-gnu/include/c++/9.3.0/locale:41,
from /home/peter/anaconda3/x86_64-conda-linux-gnu/include/c++/9.3.0/iomanip:43,
from /home/peter/anaconda3/include/Geant4/G4EnvironmentUtils.hh:45,
from /home/peter/anaconda3/include/Geant4/globals.hh:59,
from /home/peter/anaconda3/include/Geant4/G4VUserDetectorConstruction.hh:37,
from /home/peter/anaconda3/share/Geant4-10.7.2/examples/basic/B1/include/B1DetectorConstruction.hh:33,
from /home/peter/anaconda3/share/Geant4-10.7.2/examples/basic/B1/exampleB1.cc:30:
/home/peter/anaconda3/x86_64-conda-linux-gnu/include/c++/9.3.0/ctime:80:11: error: ‘::timespec_get’ has not been declared
** 80 | using ::timespec_get;**
| ^~~~~~~~~~~~
CMakeFiles/exampleB1.dir/build.make:82: recipe for target ‘CMakeFiles/exampleB1.dir/exampleB1.cc.o’ failed
make[2]: *** [CMakeFiles/exampleB1.dir/exampleB1.cc.o] Error 1
CMakeFiles/Makefile2:96: recipe for target ‘CMakeFiles/exampleB1.dir/all’ failed
make[1]: *** [CMakeFiles/exampleB1.dir/all] Error 2
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2
You can trace error: ‘::timespec_get’ has not been declared
** 80 | using ::timespec_get;**
to ctime in /anaconda3/x86_64-conda-linux-gnu/include/c++/9.3.0
and the lines:
#if __cplusplus >= 201703L && defined(_GLIBCXX_HAVE_TIMESPEC_GET)
#undef timespec_get
namespace std
{
using ::timespec;
using ::timespec_get;
} // namespace std
#endif
where timespec_get is undefined?
Can anybody help?