Skip to content

Commit ac4370a

Browse files
committed
Fix clang/llvm
Base for Postgres 14-18 was bumped from alpine v3.23 to v3.24 in docker-library/official-images@769849f Alpine v3.24 dropped support for clang19/llvm19, which caused pgvector-build to fail for versions 14 and up. On investigation, it turns out that it was impossible to use just one version of clang and llvm because in alpine-12 the highest version is still clang19. The simplest solution is to just loop over the versions from the top down. I even added version 23, which does not exist yet, but will defer the necessity of doing this again for a while
1 parent 5a3dcfc commit ac4370a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ ENV CERTS="{}" \
2020
HBA_EXTRA_RULES=""
2121
RUN apk add --no-cache python3 py3-netifaces \
2222
&& if [ "${PG_MAJOR:-0}" -ge 12 ]; then \
23-
apk add --no-cache --virtual .pgvector-build build-base clang19 llvm19 linux-headers ca-certificates; \
24-
wget -qO- "https://github.com/pgvector/pgvector/archive/refs/tags/v${PGVECTOR_VERSION}.tar.gz" \
23+
apk add --no-cache --virtual .pgvector-build build-base linux-headers ca-certificates \
24+
&& for v in 23 22 21 20 19; do \
25+
apk add --no-cache --virtual .pgvector-build clang${v} llvm${v} && break; \
26+
done \
27+
&& wget -qO- "https://github.com/pgvector/pgvector/archive/refs/tags/v${PGVECTOR_VERSION}.tar.gz" \
2528
| tar -xz -C /tmp; \
2629
cd "/tmp/pgvector-${PGVECTOR_VERSION}" \
2730
&& make PG_CONFIG=/usr/local/bin/pg_config \

0 commit comments

Comments
 (0)