"error: '::timespec_get' has not been declared" with conda root package

Hi @eguiraud,

Thank you for looking into it. As far as I can tell, your docker image does exactly the same as I do. I also managed to get everything to work when manually typing commands into a continuumio/anaconda3 container.

So it must be something from my system leaking into the conda environment. I will try to investigate further.

Given that this is specific to my setup, I will try to investigate further myself. But I put some extra notes I found below for completeness.

I got one more hint. When instantiating a TH1F instead of TFile in main.cpp, the compilation works. However the linker fails with

[ 50%] Linking CXX executable main
/global/cfs/cdirs/atlas/kkrizka/conda/myroot/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /global/cfs/projectdirs/atlas/kkrizka/conda/myroot/lib/libstdc++.so: undefined reference to `aligned_alloc@GLIBC_2.16'
/global/cfs/cdirs/atlas/kkrizka/conda/myroot/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /global/cfs/projectdirs/atlas/kkrizka/conda/myroot/lib/libpcre.so.1: undefined reference to `memcpy@GLIBC_2.14'
/global/cfs/cdirs/atlas/kkrizka/conda/myroot/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /global/cfs/projectdirs/atlas/kkrizka/conda/myroot/lib/libstdc++.so: undefined reference to `clock_gettime@GLIBC_2.17'

Line 80 of the ctime header from the original error is potentially also glibc related.

#if __cplusplus >= 201703L && defined(_GLIBCXX_HAVE_TIMESPEC_GET)
#undef timespec_get
namespace std
{
  using ::timespec;
  using ::timespec_get;
} // namespace std
#endif

I’ve also attached the conda list output in my failing environment (myroot.txt (12.8 KB)). The compilers do seem to get picked up from conda-forge.

One more thing worth noting is that root via conda used to work in my setup. This problem only came up recently after I updated the root package. Downgrading root did not fix it though.


Karol Krizka