tch-rs icon indicating copy to clipboard operation
tch-rs copied to clipboard

error LNK2038

Open qdwang opened this issue 1 year ago • 0 comments

When cargo build my project with only two deps:

[dependencies]
tch = "0.10.3"
tokenizers = "0.13.2"

This error came out: = note: libtorch_sys-6c1049f81ce711d6.rlib(torch_api.o) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in libesaxx_rs-325b40a662eef64d.rlib(esaxx.o)

complete error info here: https://gist.github.com/qdwang/6b12cad56e6e68e52264c9c0c6c0e5b0

BUT the most weird thing is, build in release mode has no errors at all. And the built exe file works perfectly. Don't know what's going on...

Debug build with only tch or only tokenizers won't cause any problem. The issue only comes at both dependencies are added. And running a cargo clean won't help.

I also posted the issue in the tokenizer's repo: https://github.com/huggingface/tokenizers/issues/1178

qdwang avatar Mar 11 '23 14:03 qdwang