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

how to use with image magick installed with MSYS2 #77

Open
Xephobia opened this issue Mar 10, 2021 · 5 comments
Open

how to use with image magick installed with MSYS2 #77

Xephobia opened this issue Mar 10, 2021 · 5 comments

Comments

@Xephobia
Copy link

Hello, I am on Windows and use the gnu toolchain for multiple reasons, but when I try to compile I get this panic :

thread 'main' panicked at 'ImageMagick libdirs at `["D:/msys/mingw64/bin/../lib"]` do not contain the required files to either statically
or dynamically link ImageMagick', D:\.cargo\registry\src\github.com-1ecc6299db9ec823\magick_rust-0.14.0\build.rs:220:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

How can I fix this?

@nlfiedler
Copy link
Owner

Did you try setting IMAGE_MAGICK_DIR or any of the related settings described in the README? That would be the first thing I would try. Otherwise, I don't know as I have never tried using the GNU toolchain. But that doesn't mean you shouldn't ask, I'll try to help as best I can.

@Xephobia
Copy link
Author

the msys2 "emulates" an unix/linux file structure, there is some files located on /bin and some on /lib

@Xephobia
Copy link
Author

i could try specifying with IMAGE_MAGICK_LIB_DIRS but there is an : after the disk name

@MolotovCherry
Copy link

MolotovCherry commented Sep 22, 2021

I'm getting this error on Windows using MSVC, and I set IMAGE_MAGICK_LIBS, IMAGE_MAGICK_DIR, and even IMAGE_MAGICK_LIB_DIRS. Even though the lib dir was pointing to the exact dir containing the file it was trying to link to (I checked the output), for some reason it's "not found"

Edit:: Got it to work cross compiling to Android by setting appropriate env vars. Setting appropriate Windows env vars still fails to build

I do want to note though that now it's not getting stuck at "does not contain the required files", but is now getting stuck at linking with "error LNK2019: unresolved external symbol SetMagickResourceLimit"

@liyunde
Copy link

liyunde commented May 20, 2022

this error reproduce on windows10
magick_rust: 0.15,0.16.0
rustc:1.61.0
lib:ImageMagick-7.1.0-Q16-HDRI
Community2019\VC\Tools\MSVC\14.29.30133

note: libmagick_rust-ee64cd36e16e1432.rlib(magick_rust-ee64cd36e16e1432.magick_rust.a42cf69e-cgu.1.rcgu.o) : error LNK2019: unresolved external symbol SetMagickResourceLimit referenced in function _ZN11magick_rust4wand6magick10MagickWand18set_resource_limit17h78a39bf86e3801fdE
target\debug\deps\rust_microservice.exe : fatal error LNK1120: 1 unresolved externals

error LNK2019: unresolved external symbol SetMagickResourceLimit referenced in function _ZN11magick_rust4wand6magick10MagickWand18set_resource_limit17hae73b655b83b1af0E

same code buid pass on centos7,centos8

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

4 participants