Closed Miezhiko closed 2 years ago
Let me try and figure out how cargo test makes them visible to the tests, because if you run cargo test
it links to it, but then if you take the generated test binary and run it afterwards it will fail with the linker issue unless the correct path is part of the LD_LIBRARY_PATH. And that's the issue tarpaulin is having
yes, cargo somehow adds proper libs paths to -sys
crates using bundled libs when you do cargo run
or cargo test
I've got a PR branch for this, tested it on a small torch project and I'll check it on Amadeus later this evening https://github.com/xd009642/tarpaulin/pull/904
It worked on Amadeus, so I've merged the PR. I'll aim to do a release next week most likely, but until then if you install via the develop branch or if you use docker the next develop image to be pushed out will have the fix in :+1:
with
torch-sys
in cargo deps by default if torch is not installed system-wide cargo will build and install libtorch by itself somewhere totarget/
and application if run withcargo run
will find and link with it.with
cargo-tarpaulin
library is not searched on those paths and it fails with missing libtorchmy example: https://github.com/Miezhiko/Amadeus/blob/mawa/.github/workflows/codecov.yml