Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstd linking problem #72

Open
MightyPork opened this issue Jun 29, 2021 · 1 comment
Open

zstd linking problem #72

MightyPork opened this issue Jun 29, 2021 · 1 comment

Comments

@MightyPork
Copy link

MightyPork commented Jun 29, 2021

Building on Arch Linux I get this error:

 = note: /usr/bin/ld: /home/ondra/rust/flowbox/target/debug/deps/libmongoc_sys-a203a8004de42198.rlib(mongoc-compression.c.o): in function `mongoc_uncompress':
          /home/ondra/rust/flowbox/target/debug/build/mongoc-sys-5ce01294740c27db/out/mongo-c-driver-1.17.5/src/libmongoc/src/mongoc/mongoc-compression.c:197: undefined reference to `ZSTD_decompress'
          /usr/bin/ld: /home/ondra/rust/flowbox/target/debug/build/mongoc-sys-5ce01294740c27db/out/mongo-c-driver-1.17.5/src/libmongoc/src/mongoc/mongoc-compression.c:202: undefined reference to `ZSTD_isError'
          /usr/bin/ld: /home/ondra/rust/flowbox/target/debug/build/mongoc-sys-5ce01294740c27db/out/mongo-c-driver-1.17.5/src/libmongoc/src/mongoc/mongoc-compression.c:206: undefined reference to `ZSTD_isError'
          /usr/bin/ld: /home/ondra/rust/flowbox/target/debug/deps/libmongoc_sys-a203a8004de42198.rlib(mongoc-compression.c.o): in function `mongoc_compress':
          /home/ondra/rust/flowbox/target/debug/build/mongoc-sys-5ce01294740c27db/out/mongo-c-driver-1.17.5/src/libmongoc/src/mongoc/mongoc-compression.c:267: undefined reference to `ZSTD_compress'
          /usr/bin/ld: /home/ondra/rust/flowbox/target/debug/build/mongoc-sys-5ce01294740c27db/out/mongo-c-driver-1.17.5/src/libmongoc/src/mongoc/mongoc-compression.c:273: undefined reference to `ZSTD_isError'
          /usr/bin/ld: /home/ondra/rust/flowbox/target/debug/build/mongoc-sys-5ce01294740c27db/out/mongo-c-driver-1.17.5/src/libmongoc/src/mongoc/mongoc-compression.c:276: undefined reference to `ZSTD_isError'
          /usr/bin/ld: /home/ondra/rust/flowbox/target/debug/deps/libmongoc_sys-a203a8004de42198.rlib(mongoc-compression.c.o): in function `mongoc_compressor_max_compressed_length':
          /home/ondra/rust/flowbox/target/debug/build/mongoc-sys-5ce01294740c27db/out/mongo-c-driver-1.17.5/src/libmongoc/src/mongoc/mongoc-compression.c:57: undefined reference to `ZSTD_compressBound'
          collect2: error: ld returned 1 exit status

for now I'll revert back to 0.12. Guess updating to 0.13 was still too ambitious


Edit: Gonna be related to #71, adding this at the end of build.rs fixes the problem.

println!("cargo:rustc-link-lib=zstd");
@MightyPork
Copy link
Author

This still doesn't work, I need to upgrade the driver for newer mongodb and it doesn't link ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant