After merging PR #42 there is an error during build on Ubuntu Docker (in Vapor application). Seems like there is missing something in Linux connected with gdImageCreateFromAvifPtr.
#18 94.04 /build/.build/checkouts/SwiftGD/Sources/SwiftGD/Format.swift:225:88: error: cannot find 'gdImageCreateFromAvifPtr' in scope
#18 94.04 fileprivate let importFunction: (Int32, UnsafeMutableRawPointer) -> gdImagePtr? = gdImageCreateFromAvifPtr
#18 94.04 ^~~~~~~~~~~~~~~~~~~~~~~~
#18 94.04 /build/.build/checkouts/SwiftGD/Sources/SwiftGD/Format.swift:228:110: error: cannot find 'gdImageAvifPtr' in scope
#18 94.04 fileprivate let exportFunction: (gdImagePtr, UnsafeMutablePointer<Int32>) -> UnsafeMutableRawPointer? = gdImageAvifPtr
#18 94.04 ^~~~~~~~~~~~~~
#18 94.04 error: fatalError
#18 ERROR: process "/bin/sh -c swift build -c release --static-swift-stdlib" did not complete successfully: exit code: 1
------
> [build 7/14] RUN swift build -c release --static-swift-stdlib:
92.36 [103/1418] Compiling CVaporBcrypt blf.c
93.21 [105/1420] Compiling _NIOBase64 Base64.swift
94.04 [106/1421] Compiling SwiftGD Color.swift
94.04 /build/.build/checkouts/SwiftGD/Sources/SwiftGD/Format.swift:225:88: error: cannot find 'gdImageCreateFromAvifPtr' in scope
94.04 fileprivate let importFunction: (Int32, UnsafeMutableRawPointer) -> gdImagePtr? = gdImageCreateFromAvifPtr
94.04 ^~~~~~~~~~~~~~~~~~~~~~~~
94.04 /build/.build/checkouts/SwiftGD/Sources/SwiftGD/Format.swift:228:110: error: cannot find 'gdImageAvifPtr' in scope
94.04 fileprivate let exportFunction: (gdImagePtr, UnsafeMutablePointer<Int32>) -> UnsafeMutableRawPointer? = gdImageAvifPtr
94.04 ^~~~~~~~~~~~~~
94.04 error: fatalError
My Dockerfile:
FROM swift:5.10-jammy as build
# Install OS updates and, if needed, sqlite3
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
&& apt-get -q dist-upgrade -y \
&& apt-get install -y libgd-dev \
&& rm -rf /var/lib/apt/lists/*
# Set up a build area
WORKDIR /build
# Copy entire repo into container
COPY . .
# Clean the packages cache.
RUN swift package clean
# Build everything, with optimizations
RUN swift build -c release --static-swift-stdlib
Probably can be also reproduced on regular Ubuntu (not Docker), but I have no way to check it.
After merging PR #42 there is an error during build on Ubuntu Docker (in Vapor application). Seems like there is missing something in Linux connected with
gdImageCreateFromAvifPtr.My Dockerfile:
Probably can be also reproduced on regular Ubuntu (not Docker), but I have no way to check it.