paul_c
1
After write cpp extension code. The build process(setup.py) is correct. However, when I import the _C file, there is an error as following:
_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at5ErrorC1ENS_14SourceLocationERKSs
SourceLocationError???
thank you.
albanD
(Alban D)
2
Hi,
Are you using mac? If so use clang as a compiler by setting CXX=clang
.
If not, which OS / compiler do you use?
paul_c
3
thank you for your reply @albanD .
I use Ubuntu, and the default compiler is gcc-4.9.4 ( extra_compile_args = {"cxx": []}
)
I use pytorch 1.0.0a0+e25b886, is this possible due to this “old version”?
albanD
(Alban D)
4
I am not sure It should not.
The missing symbol is at::Error:SourceLocation. So maybe it’s actually missing from your install.