tiger17
September 4, 2019, 8:49pm
1
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!
yf225
(PyTorch Developer, Meta)
September 4, 2019, 8:58pm
2
@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?
tiger17
September 4, 2019, 9:04pm
3
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
tiger17
September 27, 2019, 7:44pm
4
Wondering if there are any updates on this?
yf225
(PyTorch Developer, Meta)
September 27, 2019, 7:58pm
5
@tiger17 Do you mind trying to compile libtorch from source following the instructions at https://github.com/pytorch/pytorch#from-source ? Then you can link to the compiled libtorch using cmake -DCMAKE_PREFIX_PATH=/absolute/path/to/pytorch/folder ..
try add ‘-lrt’ to CMakeLists.txt
SET(GCC_COVERAGE_LINK_FLAGS "-lrt")
tiger17
September 27, 2019, 11:21pm
7
When compiling from source following the referenced page and in the new conda env,
“python setup.py install” fails.
Part of error message:
Makefile:25: recipe for target ‘src.build’ failed
tiger17
September 27, 2019, 11:34pm
8
I think I tried this already.
Oktai15
(Oktai Tatanov)
November 29, 2019, 11:21pm
10
I got the same problem (@tiger17 , @yf225 ). What could we do with it? g++ version is 6.3.0 and ldd version is 2.24.
Oktai15
(Oktai Tatanov)
November 29, 2019, 11:33pm
11
@tiger17 @Oktai15 , I am having the same issue with libtorch nightly build only (https://download.pytorch.org/libtorch/nightly/cu101/libtorch-cxx11-abi-shared-with-deps-latest.zip ). What is the solution exactly? I checked issue 27834 and it seems like the solution is to change gcc compiler?
tiger17
January 6, 2020, 10:43pm
13
Yes, changing compiler actually worked for me.
Specifically,
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
1 Like
@tiger17 May I ask your gcc version?