Skip to content

Fix clang/llvm#40

Merged
david-banon-tecnativa merged 1 commit into
Tecnativa:masterfrom
Pyxiris:fix-clang
Jul 6, 2026
Merged

Fix clang/llvm#40
david-banon-tecnativa merged 1 commit into
Tecnativa:masterfrom
Pyxiris:fix-clang

Conversation

@ljmnoonan

Copy link
Copy Markdown
Contributor

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

@david-banon-tecnativa david-banon-tecnativa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for putting the work into this, i would rather search for existing pks than use a hardcoded loop. ¿Do you see any issue with searching the pkg with something like this?

Comment thread Dockerfile Outdated
@ljmnoonan

Copy link
Copy Markdown
Contributor Author

@david-banon-tecnativa, please take another look. I discovered that there was a lot more to this problem and have done the best I could to fix it

@david-banon-tecnativa david-banon-tecnativa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some minor comments before approving and merging.

Comment thread Dockerfile
Comment thread Dockerfile
RUN apk add --no-cache python3 py3-netifaces \
&& if [ "${PG_MAJOR:-0}" -ge 12 ]; then \
apk add --no-cache --virtual .pgvector-build build-base clang19 llvm19 linux-headers ca-certificates; \
&& if [ "${PG_MAJOR:-0}" -ge 13 ]; then \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the PG version bump go in a separate commit? Thanks for catching this, PGVector 8.x no longer supports pg 12

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done @ 311d76e

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.

As it turns out, using hardcoded clang19/llvm19 was already not the best idea
as it did not match the version used by postgres itself. Only postgres 13
uses clang19 and llvm19, everything above uses clang21 and llvm21.

Also, pgvector 0.8.1 does not support pg12
https://github.com/pgvector/pgvector/blob/fb1b8966ebb9254032b6d0e7a594fdcc86f8efcc/CHANGELOG.md?plain=1#L34

Ultimately, I beleive pgvector was only properly installed in a few versions.
This commit makes sure it is installed from 13 upwards and also tests that
it is installed and working.
@david-banon-tecnativa david-banon-tecnativa merged commit 6c0a19c into Tecnativa:master Jul 6, 2026
2 checks passed
@ljmnoonan ljmnoonan deleted the fix-clang branch July 6, 2026 15:37
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