Skip to content

fix(pgvector): target x86-64-v2 for CPU portability#38

Open
yajo wants to merge 1 commit into
Tecnativa:masterfrom
moduon:pgvector-arch
Open

fix(pgvector): target x86-64-v2 for CPU portability#38
yajo wants to merge 1 commit into
Tecnativa:masterfrom
moduon:pgvector-arch

Conversation

@yajo

@yajo yajo commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Without explicit CFLAGS, make detects the host CPU features (e.g. AVX-512) and generates a .so that crashes with "signal 4: Illegal instruction" on older x86-64 CPUs.

Pinning -march=x86-64-v2 ensures compatibility with any x86-64 processor from the last ~15 years.

@moduon MT-14612

@yajo yajo marked this pull request as draft June 12, 2026 11:27
@yajo yajo marked this pull request as ready for review June 15, 2026 08:02
@yajo yajo force-pushed the pgvector-arch branch 2 times, most recently from bdbd11c to febe13e Compare June 15, 2026 08:28
Without explicit CFLAGS, make detects the host CPU features (e.g. AVX-512)
and generates a .so that crashes with "signal 4: Illegal instruction"
on older x86-64 CPUs.

Pinning -march=x86-64-v2 ensures compatibility with any x86-64
processor from the last ~15 years.

Without this patch, for example you cannot install PGVector if your server
runs an Intel® i9-13900 processor.

ARM64 builds are not affected.

@moduon MT-14612
@yajo

yajo commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

After deploying on production machines I can confirm this fix makes pgvector installable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant