informationsea / xlsxwriter-rs

Excel file writer for Rust
https://crates.io/crates/xlsxwriter
Apache License 2.0
265 stars 44 forks source link

libxslxwriter-sys 1.0.6 not compiling due to multiple function definitions #21

Closed FelixMoelder closed 3 years ago

FelixMoelder commented 3 years ago

When compiling a project which depends on libxlsxwriter-sys 1.0.6 and openssl-sys building fails with the following error:

  = note: /usr/bin/ld: /home/runner/work/rust-bio-tools/rust-bio-tools/target/debug/deps/libopenssl_sys-
00c19b0094657d7d.rlib(md5_dgst.o): in function `MD5_Update':
 /home/runner/work/rust-bio-tools/rust-bio-tools/target/debug/build/openssl-sys-a8fd2f9e3cbc8819/out/openssl-
build/build/src/include/crypto/md32_common.h:129:
multiple definition of `MD5_Update';
/home/runner/work/rust-bio-tools/rust-bio-tools/target/debug/deps/liblibxlsxwriter_sys-
efe54190b1af2eaf.rlib(md5.o):
/usr/share/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/libxlsxwriter-sys-
1.0.6/third_party/libxlsxwriter/third_party/md5/md5.c:219: first defined here

It appears as if it would be possible to directly use openssl instead of the included code.

So would it be possible to set the included code as an optional feature for libxlsxwriter-sys?

informationsea commented 3 years ago

I added two optional features no-md5 and use-openssl-md5 to solve this problem, and released as v0.3.5. Please try this new version.

FelixMoelder commented 3 years ago

Thanks for resolving this. We just tried the latest release and everything works fine now.