Cykooz / libheif-sys

Rust bindings to libheif-dev
MIT License
10 stars 9 forks source link

Decrease minimum supported version of libheif #2

Closed qarmin closed 1 year ago

qarmin commented 1 year ago

1.14.2 version of this crate supported 1.12.0 libheif version available on Ubuntu 22.04, but commit https://github.com/Cykooz/libheif-sys/commit/32945e7261bf21b2f3058fae41f98db17a45398f changed this and now I got this error

 The following warnings were emitted during compilation:

warning: `PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "pkg-config" "--libs" "--cflags" "libheif" "libheif >= 1.14"` did not exit successfully: exit status: 1

error: failed to run custom build command for `libheif-sys v1.14.3`

Caused by:
  process didn't exit successfully: `/home/runner/work/czkawka/czkawka/target/debug/build/libheif-sys-8ce37a5972be52d4/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_ALLOW_SYSTEM_CFLAGS="1" PKG_CONFIG_ALLOW_SYSTEM_LIBS="1" "pkg-config" "--libs" "--cflags" "libheif" "libheif >= 1.14"` did not exit successfully: exit status: 1
  error: could not find system library 'libheif' required by the 'libheif-sys' crate

  --- stderr
  Requested 'libheif >= 1.14' but version of libheif is 1.12.0
  You may find new versions of libheif at https://github.com/strukturag/libheif

warning: build failed, waiting for other jobs to finish...

I know that in readme there is minimal version 1.14.0, but can "real" minimal version be restored at least for 1.14 version of libheif-sys?

Cykooz commented 1 year ago

Version of libheif-sys depends on version of libheif for which it was created. Use libheif-sys v1.12 if you have libheif v1.12 installed.

libheif-sys v1.14 has new functions, structures and "enum" values that are absent in libheif v1.12

PS: you can install libheif 1.14 from Ubuntu PPA