zstd-rs: Build failures with zstd-0.11.2 on Linux
We’ve been using zstd-0.11.1 for a while very successfully. We just moved to 0.11.2 after you released it, and got 12 lines with the theme:
/var/twsvcscm/cargo-target-ci/debug/deps/libzstd_safe-1c2b20d8128233c4.rlib(zstd_safe-1c2b20d8128233c4.zstd_safe.d0b350dc-cgu.3.rcgu.o): In function `<zstd_safe::DCtx as core::ops::drop::Drop>::drop':
/var/twsvcscm/.cargo/registry/src/github.com-1ecc6299db9ec823/zstd-safe-5.0.2+zstd.1.5.2/src/lib.rs:993: undefined reference to `ZSTD_freeDCtx'
Only happens on Linux, not Mac, which is fine.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 17 (5 by maintainers)
I think I found the issue.
We were using
-flto=thin
which doesn’t exist on GCC (but somehow still goes throughadd_flag_if_supported
). It looks like cross is using GCC, which exposes the issue.I yanked 2.0.2 and published 2.0.3 with a fix for GCC. At least I can now compile with cross locally.