Skip to content

Commit 84ea359

Browse files
committed
fix: build pgvector with OPTFLAGS="" for portable ARM64 binaries
pgvector's Makefile defaults to -march=native, which emits CPU-specific SIMD instructions. On ARM64 this can produce illegal instructions depending on the host CPU features. Using OPTFLAGS="" matches pgvector's official Dockerfile and produces portable binaries that work across all ARM64 variants.
1 parent c327be2 commit 84ea359

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN set -eux \
3838
"postgresql-${PG_MAJOR}-postgis-${POSTGIS_MAJOR}-scripts=${POSTGIS_VERSION}+dfsg*" \
3939
&& git clone --branch "v${PGVECTOR_VERSION}" --depth 1 https://github.com/pgvector/pgvector.git /usr/src/pgvector \
4040
&& cd /usr/src/pgvector \
41-
&& make \
41+
&& make OPTFLAGS="" \
4242
&& make install \
4343
&& apt-get purge -y --auto-remove \
4444
build-essential \

0 commit comments

Comments
 (0)