GLIBC linker errors when linking against libtorch on Ubuntu 18.04

Hello,

I spent a few hours on this but stuck now. I’m getting these errors below when running make in my project:

/home/t/libtorch/lib/libgomp-753e6e92.so.1: undefined reference to `clock_gettime@GLIBC_2.17’

/home/t/libtorch/lib/libgomp-753e6e92.so.1: undefined reference to `clock_getres@GLIBC_2.17’

/home/t/libtorch/lib/libtorch.so: undefined reference to `memcpy@GLIBC_2.14’

/home/t/libtorch/lib/libtorch.so: undefined reference to `lgammaf@GLIBC_2.23’

/home/t/libtorch/lib/libtorch.so: undefined reference to `lgamma@GLIBC_2.23’

Thank you!

@tiger17 Could you provide us the output of ldd --version and g++ --version? And did you download the old-ABI version or new-ABI version of libtorch?

Answering your questions:

ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27

g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0

https://download.pytorch.org/libtorch/cu100/libtorch-cxx11-abi-shared-with-deps-1.2.0.zip