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

error when target is i686-pc-windows-msvc #18

Open
QiWei opened this issue Sep 10, 2021 · 4 comments
Open

error when target is i686-pc-windows-msvc #18

QiWei opened this issue Sep 10, 2021 · 4 comments

Comments

@QiWei
Copy link

QiWei commented Sep 10, 2021

  = note: liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_alloc_decompressor referenced in function __ZN11libdeflater12Decompressor3new17hf31a74519cf4bcd1E
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_gzip_decompress referenced in function __ZN11libdeflater12Decompressor15gzip_decompress17hde9a1276df679f8cE
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_zlib_decompress referenced in function __ZN11libdeflater12Decompressor15zlib_decompress17hce9268d56b6995e5E
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_deflate_decompress referenced in function __ZN11libdeflater12Decompressor18deflate_decompress17h5546d5b293d64f6cE
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_free_decompressor referenced in function __ZN67_$LT$libdeflater..Decompressor$u20$as$u20$core..ops..drop..Drop$GT$4drop17h9c4c188330724ceeE
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_alloc_compressor referenced in function __ZN11libdeflater10Compressor3new17h9374eb469501ac7aE
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_deflate_compress_bound referenced in function __ZN11libdeflater10Compressor22deflate_compress_bound17h4313659dcc1e1e3fE
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_deflate_compress referenced in function __ZN11libdeflater10Compressor16deflate_compress17hae2d861b3dc9d63dE
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_zlib_compress_bound referenced in function __ZN11libdeflater10Compressor19zlib_compress_bound17h047ad95075c7dac8E
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_zlib_compress referenced in function __ZN11libdeflater10Compressor13zlib_compress17h5c62d3f235f4ec27E
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_gzip_compress_bound referenced in function __ZN11libdeflater10Compressor19gzip_compress_bound17h03ff8ed43415946cE
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_gzip_compress referenced in function __ZN11libdeflater10Compressor13gzip_compress17h9aee05245d69c40aE
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_free_compressor referenced in function __ZN65_$LT$libdeflater..Compressor$u20$as$u20$core..ops..drop..Drop$GT$4drop17hf882442a05e00411E
          liblibdeflater-a26db91458bc2d2e.rlib(libdeflater-a26db91458bc2d2e.libdeflater.c676b24c-cgu.3.rcgu.o) : error LNK2019: unresolved external symbol _libdeflate_crc32 referenced in function __ZN11libdeflater3Crc6update17h1dbd33df57087956E
@sstadick
Copy link
Owner

@sstadick
Copy link
Owner

@QiWei thanks for making an issue! I've started looking into this but don't have a good windows setup to debug this on at the moment outside of CI. I've opened an issue in the libdeflater crate, which is where the fix will likely need to happen.

In the meantime you can disable default features for gzp and set the "deflate_default,snappy_default" features manually and everything should "just work", with a bit of a performance hit because libdeflater is so fast (but it is slower on 32 bit...).

Passing CI for i686-pc-windows-msvc with the above mentioned features: https://github.com/sstadick/gzp/runs/3569445386?check_suite_focus=true

@nh13
Copy link
Contributor

nh13 commented Feb 23, 2023

@sstadick hit this recently for the same target, and your suggestion fixed it! Perhaps this should be added to the README?

@sstadick
Copy link
Owner

Link added in the README! Thanks for the call out 👍

An issue to keep half an eye is this one: #44

zune should be able to replace libdeflate, and be as or more performant, while being pure rust. I haven't had time to get into it yet, but it seems very promising. Currently the impl is asymmetrical and I may not support it till it can both compress and decompress.

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

3 participants