tch-rs: Linking error tch 0.1.1 & Centos 7
When I try to run a binary using tch = 0.1.1 on centos 7, I get a linking error:
/usr/bin/ld: warning: libgomp-8bba0e50.so.1, needed by /home/maxence/zezima/market-analytics/target/release/build/torch-sys-c846cc9c89b11e6f/out/libtorch/libtorch/lib/libc10.so, not found (try using -rpath or -rpath-link). Note that I’m not installing libtorch manually.
When I look at the content of the OUT_DIR of the build script, I can see libgomp-8bba0e50.so.1. So the lib is not missing, just not linked.
See the full error output https://gist.github.com/jean-airoldie/c908704722181f2d0dfc27bf64bcf668.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (14 by maintainers)
Commits related to this issue
- Remove libgomp dependency from torch-sys. This workaround originates from #99. This was meant to solve #95, which was ultimately found to be caused by an incorrect shared library name. In fact the cu... — committed to senokay/tch-rs by lifthrasiir 3 months ago
- Remove libgomp dependency from torch-sys. This workaround originates from #99. This was meant to solve #95, which was ultimately found to be caused by an incorrect shared library name. In fact the cu... — committed to senokay/tch-rs by lifthrasiir 3 months ago
I wonder if it could be some gcc C++11 ABI incompatibility rather than the issue described earlier in this thread. To check this, maybe you could download the pre-cxx11 abi version of libtorch here. Once you’ve extracted the content of the zip file, adjust your environment variables via:
And try a
cargo cleanthen to recompile.