-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rather than letting the Git repo build it from a submodule. Otherwise the pg_duckdb builder installs it into the Postgres lib directory, which isn't included in `ld`'s path, so Postgres can't find it. Update to `trunk-test-tembo:4436f19`, which includes the supported version of `libduckdb.so`. Also configure it to be added to `shared_preload_libraries` and needing to restart. Copy the same `libduckdb.so` to build `duckdb_fdw`, too, and explicitly set its version, since it may diverge from `duckdb_fdw`'s own version. The build is successful, but `duckdb_fdw` does not load with the `libduckdb.so` built by `pg_duckdb`, so skip testing it for now. Will fix once duckdb/pg_duckdb#554 or its successor resolves thing such that both extensions can use the same DSO.
- Loading branch information
Showing
5 changed files
with
13 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
ARG PG_VERSION=17 | ||
# Set up image to copy libduckdb from. | ||
FROM quay.io/tembo/standard-cnpg:${PG_VERSION}-f9c2075 AS std | ||
FROM quay.io/coredb/c-builder:pg${PG_VERSION} | ||
|
||
# Download and install the DuckDB DSO. | ||
ARG EXTENSION_VERSION | ||
ENV DUCKDB_VERSION=${EXTENSION_VERSION} | ||
# Copy the DuckDB DSO. | ||
USER root | ||
# Funky naming expectations: https://github.com/alitrack/duckdb_fdw/issues/64 | ||
RUN curl -LO https://github.com/duckdb/duckdb/releases/download/v${DUCKDB_VERSION}/libduckdb-linux-amd64.zip \ | ||
&& unzip -d . libduckdb-linux-amd64.zip \ | ||
&& install -m 755 libduckdb.so "/usr/local/lib/libduckdb.${DUCKDB_VERSION}.so" \ | ||
&& (cd /usr/local/lib && ln -s "libduckdb.${DUCKDB_VERSION}.so" "libduckdb.so") | ||
COPY --from=std "/usr/local/lib/libduckdb.*.so" /usr/local/lib | ||
RUN cd /usr/local/lib && ln -s "libduckdb.*.so" "libduckdb.so" | ||
|
||
# Clone and build the extension. | ||
ARG EXTENSION_NAME | ||
ARG EXTENSION_VERSION | ||
ENV DUCKDB_VERSION=1.1.3 | ||
RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/alitrack/${EXTENSION_NAME}.git \ | ||
&& perl -i -pe 's/^install:/#/' "${EXTENSION_NAME}/Makefile" \ | ||
&& make -C ${EXTENSION_NAME} USE_PGXS=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters