mitsuba-renderer / enoki

Enoki: structured vectorization and differentiation on modern processor architectures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build issues: undefined reference to `clock_gettime@GLIBC_2.17'

Hawaiii opened this issue · comments

Hi, I'm trying to build Enoki with cuda, autodiff and python binding. I've been getting errors like "undefined reference to `clock_gettime@GLIBC_2.17'".
Does Enoki require a specific version of glibc?

I'm building from /home/yhua1/enoki/build/ with
cmake -DCMAKE_CUDA_RUNTIME_LIBRARY=ON -DCMAKE_BUILD_TYPE=Debug -DENOKI_CUDA=ON -DENOKI_AUTODIFF=ON -DENOKI_PYTHON=ON ..

I'm building on ubuntu 18.4, with make 3.12.2, and glibc 2.27 (Ubuntu GLIBC 2.27-3ubuntu1.2).

Below is the message from cmake:

`CMake Error at CMakeLists.txt:88 (message):
Failed to compile 'archflags' binary: Change Dir:
/home/yhua1/enoki/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_53017/fast"

/usr/bin/make -f CMakeFiles/cmTC_53017.dir/build.make
CMakeFiles/cmTC_53017.dir/build

make[1]: Entering directory '/home/yhua1/enoki/build/CMakeFiles/CMakeTmp'

Building CXX object CMakeFiles/cmTC_53017.dir/archflags_unix.cpp.o

/home/yhua1/anaconda3/envs/sgdcam-psdr/bin/x86_64-conda_cos6-linux-gnu-g++
-Wl,--no-as-needed -lrt -march=native -o
CMakeFiles/cmTC_53017.dir/archflags_unix.cpp.o -c
/home/yhua1/enoki/resources/archflags_unix.cpp

Linking CXX executable cmTC_53017

/home/yhua1/anaconda3/envs/sgdcam-psdr/bin/cmake -E cmake_link_script
CMakeFiles/cmTC_53017.dir/link.txt --verbose=1

/home/yhua1/anaconda3/envs/sgdcam-psdr/bin/x86_64-conda_cos6-linux-gnu-g++
-Wl,--no-as-needed -lrt -march=native -Wl,-O2 -Wl,--sort-common
-Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags
-Wl,--gc-sections -Wl,-rpath,/home/yhua1/anaconda3/envs/sgdcam-psdr/lib
-Wl,-rpath-link,/home/yhua1/anaconda3/envs/sgdcam-psdr/lib
-L/home/yhua1/anaconda3/envs/sgdcam-psdr/lib -rdynamic
CMakeFiles/cmTC_53017.dir/archflags_unix.cpp.o -o cmTC_53017 -Wl,-O2
-Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now
-Wl,--disable-new-dtags -Wl,--gc-sections
-Wl,-rpath,/home/yhua1/anaconda3/envs/sgdcam-psdr/lib
-Wl,-rpath-link,/home/yhua1/anaconda3/envs/sgdcam-psdr/lib
-L/home/yhua1/anaconda3/envs/sgdcam-psdr/lib

/home/yhua1/anaconda3/envs/sgdcam-psdr/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
/home/yhua1/anaconda3/envs/sgdcam-psdr/lib/libstdc++.so: undefined
reference to `aligned_alloc@GLIBC_2.16'

/home/yhua1/anaconda3/envs/sgdcam-psdr/bin/../lib/gcc/x86_64-conda-linux-gnu/9.3.0/../../../../x86_64-conda-linux-gnu/bin/ld:
/home/yhua1/anaconda3/envs/sgdcam-psdr/lib/libstdc++.so: undefined
reference to `clock_gettime@GLIBC_2.17'

collect2: error: ld returned 1 exit status

CMakeFiles/cmTC_53017.dir/build.make:86: recipe for target 'cmTC_53017'
failed

make[1]: *** [cmTC_53017] Error 1

make[1]: Leaving directory '/home/yhua1/enoki/build/CMakeFiles/CMakeTmp'

Makefile:121: recipe for target 'cmTC_53017/fast' failed

make: *** [cmTC_53017/fast] Error 2

-- Configuring incomplete, errors occurred!`