h2non / bimg

Go package for fast high-level image processing powered by libvips C library
https://pkg.go.dev/github.com/h2non/bimg?tab=doc
MIT License
2.68k stars 337 forks source link

Alpine Linux ld link error when using libheif 1.12 #372

Open Qubitium opened 3 years ago

Qubitium commented 3 years ago

After this alpine linux upgrade which upgrade libheif from 1.11 to 1.12 and go from 1.16.4 to 1.16.5, the github.com/h2non/bimg package cannot no longer compile due to LD/linking error?

bash-5.1# apk upgrade
(1/7) Upgrading libcurl (7.76.1-r0 -> 7.77.0-r0)
(2/7) Upgrading go (1.16.4-r0 -> 1.16.5-r0)
(3/7) Upgrading libxml2 (2.9.10-r6 -> 2.9.10-r7)
(4/7) Upgrading libheif (1.11.0-r0 -> 1.12.0-r0)
(5/7) Upgrading libheif-dev (1.11.0-r0 -> 1.12.0-r0)
(6/7) Upgrading libxml2-dev (2.9.10-r6 -> 2.9.10-r7)
(7/7) Upgrading libxml2-utils (2.9.10-r6 -> 2.9.10-r7)
# github.com/h2non/bimg
/usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/libheif.so.1: undefined reference to `de265_get_image_full_range_flag'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/libheif.so.1: undefined reference to `de265_get_image_transfer_characteristics'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/libheif.so.1: undefined reference to `de265_get_image_colour_primaries'
/usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/libheif.so.1: undefined reference to `de265_get_image_matrix_coefficients'
collect2: error: ld returned 1 exit status

I checked the libheif 1.12 change log and it not see major updates to the code.

Any help is appreciated. Thanks.

Cross posted to libheif issues since not sure if issue is libheif or bimg https://github.com/strukturag/libheif/issues/518