The system library libheif required by crate libheif-sys was not found.
The file libheif.pc needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
PKG_CONFIG_PATH contains the following:
/usr/lib/x86_64-linux-gnu/pkgconfig
HINT: you may need to install a package such as libheif, libheif-dev or libheif-devel.
When a user import an animated image on his iphone or some android device, the photo upload is not displayed.
This is due to the image crate not supporting it. https://docs.rs/image/latest/image/index.html
It is solvable by using libheif-rs. But I had some linking problems when I tried.
error: failed to run custom build command for
libheif-sys v2.1.1+1.17.4
Caused by: process didn't exit successfully:
/app/target/debug/build/libheif-sys-d581d88088fc7a1a/build-script-build
(exit status: 1) --- stdout cargo:rerun-if-env-changed=LIBHEIF_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=LIBHEIF_STATIC cargo:rerun-if-env-changed=LIBHEIF_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-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu 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-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu 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-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR cargo:warning= pkg-config exited with status code 1The system library
libheif
required by cratelibheif-sys
was not found. The filelibheif.pc
needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory. PKG_CONFIG_PATH contains the following:/usr/lib/x86_64-linux-gnu/pkgconfig
HINT: you may need to install a package such as libheif, libheif-dev or libheif-devel.