Skip to content

Commit 18c1bef

Browse files
authored
Merge pull request #1077 from infosiftr/llvm-fix
Downgrade llvm to 15 to fix jit support
2 parents 1c1e4ff + a3b0bb6 commit 18c1bef

File tree

7 files changed

+73
-16
lines changed

7 files changed

+73
-16
lines changed

11/alpine/Dockerfile

+12-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

12/alpine/Dockerfile

+12-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

13/alpine/Dockerfile

+12-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

14/alpine/Dockerfile

+12-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

15/alpine/Dockerfile

+12-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-alpine.template

+13-8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ ENV PG_MAJOR {{ env.version }}
2020
ENV PG_VERSION {{ .version }}
2121
ENV PG_SHA256 {{ .sha256 }}
2222

23+
{{ def llvmver: "15" -}}
24+
ENV DOCKER_PG_LLVM_DEPS \
25+
llvm{{ llvmver }}-dev \
26+
clang{{ llvmver }}
27+
2328
RUN set -eux; \
2429
\
2530
wget -O postgresql.tar.bz2 "https://ftp.postgresql.org/pub/source/v$PG_VERSION/postgresql-$PG_VERSION.tar.bz2"; \
@@ -34,20 +39,19 @@ RUN set -eux; \
3439
rm postgresql.tar.bz2; \
3540
\
3641
apk add --no-cache --virtual .build-deps \
42+
$DOCKER_PG_LLVM_DEPS \
3743
bison \
3844
coreutils \
3945
dpkg-dev dpkg \
4046
flex \
47+
g++ \
4148
gcc \
4249
krb5-dev \
4350
libc-dev \
4451
libedit-dev \
4552
libxml2-dev \
4653
libxslt-dev \
4754
linux-headers \
48-
{{ if .major >= 11 then ( -}}
49-
llvm-dev clang g++ \
50-
{{ ) else "" end -}}
5155
make \
5256
openldap-dev \
5357
openssl-dev \
@@ -80,6 +84,12 @@ RUN set -eux; \
8084
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
8185
wget -O config/config.guess 'https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=7d3d27baf8107b630586c962c057e22149653deb'; \
8286
wget -O config/config.sub 'https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=7d3d27baf8107b630586c962c057e22149653deb'; \
87+
\
88+
# https://git.alpinelinux.org/aports/tree/community/postgresql12/APKBUILD?h=3.18-stable&id=a470294e6d6ca7059e41c54769b7c3c26ec901d4#n158
89+
export LLVM_CONFIG="/usr/lib/llvm{{ llvmver }}/bin/llvm-config"; \
90+
# https://git.alpinelinux.org/aports/tree/community/postgresql12/APKBUILD?h=3.18-stable&id=a470294e6d6ca7059e41c54769b7c3c26ec901d4#n163
91+
export CLANG=clang-{{ llvmver }}; \
92+
\
8393
# configure options taken from:
8494
# https://anonscm.debian.org/cgit/pkg-postgresql/postgresql.git/tree/debian/rules?h=9.5
8595
./configure \
@@ -110,9 +120,7 @@ RUN set -eux; \
110120
--with-libxml \
111121
--with-libxslt \
112122
--with-icu \
113-
{{ if .major >= 11 then ( -}}
114123
--with-llvm \
115-
{{ ) else "" end -}}
116124
{{ if .major >= 14 then ( -}}
117125
--with-lz4 \
118126
{{ ) else "" end -}}
@@ -169,9 +177,6 @@ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 1777 "$P
169177
VOLUME /var/lib/postgresql/data
170178

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

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

Dockerfile-debian.template

-3
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ RUN mkdir -p "$PGDATA" && chown -R postgres:postgres "$PGDATA" && chmod 777 "$PG
181181
VOLUME /var/lib/postgresql/data
182182

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

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

0 commit comments

Comments
 (0)