Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Hawaiii opened this issue Jul 8, 2021 · 0 comments
Closed

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

Hawaiii opened this issue Jul 8, 2021 · 0 comments

Comments

@Hawaiii
Copy link

Hawaiii commented Jul 8, 2021

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!`

@Hawaiii Hawaiii closed this as completed Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant