Skip to content

Commit

Permalink
Merge pull request #1077 from infosiftr/llvm-fix
Browse files Browse the repository at this point in the history
Downgrade llvm to 15 to fix jit support
  • Loading branch information
tianon committed May 12, 2023
2 parents 1c1e4ff + a3b0bb6 commit 18c1bef
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 16 deletions.
13 changes: 12 additions & 1 deletion 11/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion 12/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion 13/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion 14/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion 15/alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ ENV PG_MAJOR {{ env.version }}
ENV PG_VERSION {{ .version }}
ENV PG_SHA256 {{ .sha256 }}

{{ def llvmver: "15" -}}
ENV DOCKER_PG_LLVM_DEPS \
llvm{{ llvmver }}-dev \
clang{{ llvmver }}

RUN set -eux; \
\
wget -O postgresql.tar.bz2 "https://ftp.postgresql.org/pub/source/v$PG_VERSION/postgresql-$PG_VERSION.tar.bz2"; \
Expand All @@ -34,20 +39,19 @@ RUN set -eux; \
rm postgresql.tar.bz2; \
\
apk add --no-cache --virtual .build-deps \
$DOCKER_PG_LLVM_DEPS \
bison \
coreutils \
dpkg-dev dpkg \
flex \
g++ \
gcc \
krb5-dev \
libc-dev \
libedit-dev \
libxml2-dev \
libxslt-dev \
linux-headers \
{{ if .major >= 11 then ( -}}
llvm-dev clang g++ \
{{ ) else "" end -}}
make \
openldap-dev \
openssl-dev \
Expand Down Expand Up @@ -80,6 +84,12 @@ RUN set -eux; \
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
wget -O config/config.guess 'https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=7d3d27baf8107b630586c962c057e22149653deb'; \
wget -O config/config.sub 'https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=7d3d27baf8107b630586c962c057e22149653deb'; \
\
# https://git.alpinelinux.org/aports/tree/community/postgresql12/APKBUILD?h=3.18-stable&id=a470294e6d6ca7059e41c54769b7c3c26ec901d4#n158
export LLVM_CONFIG="/usr/lib/llvm{{ llvmver }}/bin/llvm-config"; \
# https://git.alpinelinux.org/aports/tree/community/postgresql12/APKBUILD?h=3.18-stable&id=a470294e6d6ca7059e41c54769b7c3c26ec901d4#n163
export CLANG=clang-{{ llvmver }}; \
\
# configure options taken from:
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
./configure \
Expand Down Expand Up @@ -110,9 +120,7 @@ RUN set -eux; \
--with-libxml \
--with-libxslt \
--with-icu \
{{ if .major >= 11 then ( -}}
--with-llvm \
{{ ) else "" end -}}
{{ if .major >= 14 then ( -}}
--with-lz4 \
{{ ) else "" end -}}
Expand Down Expand Up @@ -169,9 +177,6 @@ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 1777 "$P
VOLUME /var/lib/postgresql/data

COPY docker-entrypoint.sh /usr/local/bin/
{{ if .major >= 11 then "" else ( -}}
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
{{ ) end -}}
ENTRYPOINT ["docker-entrypoint.sh"]

# We set the default STOPSIGNAL to SIGINT, which corresponds to what PostgreSQL
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PG
VOLUME /var/lib/postgresql/data

COPY docker-entrypoint.sh /usr/local/bin/
{{ if .major >= 11 then "" else ( -}}
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
{{ ) end -}}
ENTRYPOINT ["docker-entrypoint.sh"]

# We set the default STOPSIGNAL to SIGINT, which corresponds to what PostgreSQL
Expand Down

0 comments on commit 18c1bef

Please sign in to comment.