From 399a2bca78ead96e22263b89917faad3a7c5a726 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Fri, 13 Dec 2024 17:34:58 -0500 Subject: [PATCH] Fix configure and install errors Configure postgres for extensions that need it, properly install vectorize, change into the correct directory to install emaj, and remove a comment from the emaj control file. --- contrib/earthdistance/Dockerfile | 1 + contrib/emaj/Dockerfile | 1 + contrib/emaj/Trunk.toml | 2 +- contrib/hstore/Dockerfile | 1 + contrib/hstore_plperl/Dockerfile | 1 + contrib/hstore_plperlu/Dockerfile | 1 + contrib/vectorscale/Trunk.toml | 3 +-- 7 files changed, 7 insertions(+), 3 deletions(-) diff --git a/contrib/earthdistance/Dockerfile b/contrib/earthdistance/Dockerfile index e07ddab9..afe1ddb2 100644 --- a/contrib/earthdistance/Dockerfile +++ b/contrib/earthdistance/Dockerfile @@ -19,4 +19,5 @@ RUN apt-get update && apt-get install -y \ ARG EXTENSION_NAME ARG PG_RELEASE RUN git clone --depth 1 --branch "${PG_RELEASE}" https://github.com/postgres/postgres.git \ + && (cd postgres && ./configure --datarootdir "$(pg_config --sharedir)" --libdir "$(pg_config --pkglibdir)") \ && make -C postgres/contrib/${EXTENSION_NAME} USE_PGXS=1 diff --git a/contrib/emaj/Dockerfile b/contrib/emaj/Dockerfile index 7e6ab8c8..b477f523 100644 --- a/contrib/emaj/Dockerfile +++ b/contrib/emaj/Dockerfile @@ -6,4 +6,5 @@ ARG RELEASE=4.5.0 RUN curl -O https://api.pgxn.org/dist/e-maj/${RELEASE}/e-maj-${RELEASE}.zip \ && unzip e-maj-${RELEASE}.zip \ && cd e-maj-${RELEASE} \ + && perl -i -pe 's/#directory/directory/' emaj.control \ && make diff --git a/contrib/emaj/Trunk.toml b/contrib/emaj/Trunk.toml index 1e58e7c3..6a91d613 100644 --- a/contrib/emaj/Trunk.toml +++ b/contrib/emaj/Trunk.toml @@ -14,4 +14,4 @@ apt = ["libstdc++6", "libgcc-s1", "libc6"] postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = "cd emaj-4.5.0 && make install" +install_command = "cd e-maj-4.5.0 && make install" diff --git a/contrib/hstore/Dockerfile b/contrib/hstore/Dockerfile index e07ddab9..afe1ddb2 100644 --- a/contrib/hstore/Dockerfile +++ b/contrib/hstore/Dockerfile @@ -19,4 +19,5 @@ RUN apt-get update && apt-get install -y \ ARG EXTENSION_NAME ARG PG_RELEASE RUN git clone --depth 1 --branch "${PG_RELEASE}" https://github.com/postgres/postgres.git \ + && (cd postgres && ./configure --datarootdir "$(pg_config --sharedir)" --libdir "$(pg_config --pkglibdir)") \ && make -C postgres/contrib/${EXTENSION_NAME} USE_PGXS=1 diff --git a/contrib/hstore_plperl/Dockerfile b/contrib/hstore_plperl/Dockerfile index 48710968..553ec341 100644 --- a/contrib/hstore_plperl/Dockerfile +++ b/contrib/hstore_plperl/Dockerfile @@ -21,4 +21,5 @@ RUN apt-get update && apt-get install -y \ ARG EXTENSION_NAME ARG PG_RELEASE RUN git clone --depth 1 --branch "${PG_RELEASE}" https://github.com/postgres/postgres.git \ + && (cd postgres && ./configure --with-perl --datarootdir "$(pg_config --sharedir)" --libdir "$(pg_config --pkglibdir)") \ && make -C postgres/contrib/${EXTENSION_NAME} USE_PGXS=1 diff --git a/contrib/hstore_plperlu/Dockerfile b/contrib/hstore_plperlu/Dockerfile index 658fedb0..a5bdbd54 100644 --- a/contrib/hstore_plperlu/Dockerfile +++ b/contrib/hstore_plperlu/Dockerfile @@ -21,4 +21,5 @@ RUN apt-get update && apt-get install -y \ # ARG EXTENSION_NAME ARG PG_RELEASE RUN git clone --depth 1 --branch "${PG_RELEASE}" https://github.com/postgres/postgres.git \ + && (cd postgres && ./configure --with-perl --datarootdir "$(pg_config --sharedir)" --libdir "$(pg_config --pkglibdir)") \ && make -C postgres/contrib/hstore_plperl USE_PGXS=1 diff --git a/contrib/vectorscale/Trunk.toml b/contrib/vectorscale/Trunk.toml index 5f6cb919..225c65b3 100644 --- a/contrib/vectorscale/Trunk.toml +++ b/contrib/vectorscale/Trunk.toml @@ -17,6 +17,5 @@ platform = "linux/amd64" dockerfile = "Dockerfile" install_command = """ cd pgvectorscale/pgvectorscale - mv target/release/vectorscale-pg17/usr/lib/postgresql/15/lib/* /usr/lib/postgresql/15/lib - mv target/release/vectorscale-pg17/usr/share/postgresql/15/extension/* /usr/share/postgresql/15/extension + RUSTFLAGS="-C target-feature=+avx2,+fma" cargo pgrx install --release """