0

I'm building a imageconverter with tauri rust (and typescript react). One of the dependencies is:

  • image-convert = "0.13.0"

It needs Rust dependency under the hood to work.

I followed the instructions from the guide i found on the link.

That's my error log:

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> pic_flip@0.0.0 dev
> vite


  VITE v4.2.1  ready in 854 ms

  ➜  Local:   http://127.0.0.1:1420/
  ➜  Network: use --host to expose
        Info Watching C:\deskapps\PicFlip\pic_flip\src-tauri for changes...
   Compiling magick_rust v0.17.0
error: failed to run custom build command for `magick_rust v0.17.0`

Caused by:
  process didn't exit successfully: `C:\deskapps\PicFlip\pic_flip\src-tauri\target\debug\build\magick_rust-2f3dc1457e94e45e\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=IMAGE_MAGICK_LIB_DIRS
  cargo:rerun-if-env-changed=IMAGE_MAGICK_DIR
  cargo:rerun-if-env-changed=MAGICKWAND_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=MAGICKWAND_STATIC
  cargo:rerun-if-env-changed=MAGICKWAND_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
  cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: `"pkg-config" "--libs" "--cflags" "MagickWand" "MagickWand >= 7.0"` did not exit successfully: exit code: 1
  error: could not find system library 'MagickWand' required by the 'magick_rust' crate

  --- stderr
  Package MagickWand was not found in the pkg-config search path.
  Perhaps you should add the directory containing `MagickWand.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'MagickWand' found
  Package MagickWand was not found in the pkg-config search path.
  Perhaps you should add the directory containing `MagickWand.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'MagickWand' found
  ', C:\Users\41764\.cargo\registry\src\github.com-1ecc6299db9ec823\magick_rust-0.17.0\build.rs:263:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
PS C:\deskapps\PicFlip\pic_flip>

                                        
cafce25
  • 15,907
  • 4
  • 25
  • 31
  • Also worth to mention: In the windows binary for Image Magick doesn't exist a .pc file. Also i tried many other (Bruteforcing) approaches with installing with chocolately and setting the variable manualy. My app can't compile still. Yesterday I started building my app on MacOS and installed it with brew without any problems. I don't get it why windows is making so much trouble. – Maksim Momcilovic Apr 12 '23 at 13:49
  • In the link you provided they write you "need to set the `IMAGE_MAGICK_DIR` environment variable" it doesn't seem you did so, or maybe you have to restart your PC for the changes to take effect. – cafce25 Apr 12 '23 at 14:50
  • Probably a restart is not required but a restart of the terminal/console if the change was done in System properties. – aled Apr 12 '23 at 20:39
  • I restarted my computer and I set the path through the cmd in admin mode and once in the settings directly. The error log can't be correct. That's why I'm asking for help here. Going crazy over here… – Maksim Momcilovic Apr 12 '23 at 21:39

0 Answers0