Skip to content

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

Merged
david-banon-tecnativa merged 1 commit into
Tecnativa:masterfrom
moduon:pgvector-arch
Jul 14, 2026
Merged

fix(pgvector): target x86-64-v2 for CPU portability#38
david-banon-tecnativa merged 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 3 times, most recently from febe13e to ca35a06 Compare June 15, 2026 08:29
@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.

@david-banon-tecnativa

Copy link
Copy Markdown
Contributor

Same here, mind rebasing now that CI is working?

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 Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, rebased.

@david-banon-tecnativa david-banon-tecnativa merged commit 0e87caf into Tecnativa:master Jul 14, 2026
11 checks passed
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.

2 participants