Open cruvie opened 1 year ago
I have the same problem when trying to build my program in docker
ERROR:
Step 7/12 : RUN go build -o /go/bin/scaler ./cmd/app/
---> Running in 5a65d127345a
# github.com/strukturag/libheif/go/heif
vendor/github.com/strukturag/libheif/go/heif/heif.go:55:25: could not determine kind of name for C.heif_compression_EVC
vendor/github.com/strukturag/libheif/go/heif/heif.go:53:25: could not determine kind of name for C.heif_compression_JPEG2000
vendor/github.com/strukturag/libheif/go/heif/heif.go:54:25: could not determine kind of name for C.heif_compression_VVC
vendor/github.com/strukturag/libheif/go/heif/heif.go:159:28: could not determine kind of name for C.heif_error_Plugin_loading_error
vendor/github.com/strukturag/libheif/go/heif/heif.go:234:38: could not determine kind of name for C.heif_suberror_Cannot_read_plugin_directory
vendor/github.com/strukturag/libheif/go/heif/heif.go:317:27: could not determine kind of name for C.heif_suberror_Encoder_cleanup
vendor/github.com/strukturag/libheif/go/heif/heif.go:315:28: could not determine kind of name for C.heif_suberror_Encoder_encoding
vendor/github.com/strukturag/libheif/go/heif/heif.go:313:34: could not determine kind of name for C.heif_suberror_Encoder_initialization
vendor/github.com/strukturag/libheif/go/heif/heif.go:228:30: could not determine kind of name for C.heif_suberror_Plugin_is_not_loaded
vendor/github.com/strukturag/libheif/go/heif/heif.go:230:31: could not determine kind of name for C.heif_suberror_Plugin_loading_error
vendor/github.com/strukturag/libheif/go/heif/heif.go:282:38: could not determine kind of name for C.heif_suberror_Unknown_NCLX_color_primaries
vendor/github.com/strukturag/libheif/go/heif/heif.go:286:42: could not determine kind of name for C.heif_suberror_Unknown_NCLX_matrix_coefficients
vendor/github.com/strukturag/libheif/go/heif/heif.go:284:47: could not determine kind of name for C.heif_suberror_Unknown_NCLX_transfer_characteristics
vendor/github.com/strukturag/libheif/go/heif/heif.go:303:47: could not determine kind of name for C.heif_suberror_Unsupported_header_compression_method
DOCKERFILE
FROM golang:1.19-alpine as builder
RUN apk update
RUN apk add build-base libavif libheif-dev pkgconfig
RUN pkg-config libheif --modversion
ADD . /scaler
WORKDIR /scaler
RUN go build -o /scaler ./cmd/app/
FROM alpine:latest
RUN apk-add libavif
COPY --from=builder /go/bin/scaler /usr/local/bin/scaler
CMD [ "/usr/local/bin/scaler" ]
EXPOSE 8080
I do not know much about go, but these are all new enums. Hence, my guess is that you have an old version of libheif installed in the system and those old headers are used instead of the new libheif version.
Hi , when I run
libheif-master/examples/heif-test.go
I encounter this errorI try to add
import "C"
and run again encounter thisCan you help me , I have no idea about this and I'm not familiar with C, thank you!