Build log4cplus from source archives instead of git clone
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
766d039a12
commit
7f34cfcf9c
5 files changed
+20
-7
No files matched your search
@@ -9,7 +9,7 @@
|
|||||||
- Add each dependency as a separate, reviewable build step so its source and version remain visible.
|
- Add each dependency as a separate, reviewable build step so its source and version remain visible.
|
||||||
- Append new dependency build steps after all existing dependency build steps. Do not insert or reorder steps in the existing build sequence, so previously successful build layers remain unchanged.
|
- Append new dependency build steps after all existing dependency build steps. Do not insert or reorder steps in the existing build sequence, so previously successful build layers remain unchanged.
|
||||||
- The DuckDB `ui` extension (`duckdb-ui`) is built in the same step as DuckDB instead of a separate step. It is statically linked into the DuckDB shell and can only be compiled as part of the DuckDB source tree (via `-DDUCKDB_EXTENSION_CONFIGS`), against the matching DuckDB version. Keep its pinned commit in the same `RUN` as DuckDB and update the two together. Because DuckDB is built from a tarball, pass `-DOVERRIDE_GIT_DESCRIBE` with the DuckDB version so the extension selects the correct API.
|
- The DuckDB `ui` extension (`duckdb-ui`) is built in the same step as DuckDB instead of a separate step. It is statically linked into the DuckDB shell and can only be compiled as part of the DuckDB source tree (via `-DDUCKDB_EXTENSION_CONFIGS`), against the matching DuckDB version. Keep its pinned commit in the same `RUN` as DuckDB and update the two together. Because DuckDB is built from a tarball, pass `-DOVERRIDE_GIT_DESCRIBE` with the DuckDB version so the extension selects the correct API.
|
||||||
- The log4cplus build is allowed to fetch its required `ThreadPool` submodule as a shallow repository pinned by `REL_2_0_5` to commit `cc0b6371d3963f7028c2da5fc007733f9f3bf205`. Do not fetch unused log4cplus submodules.
|
- The log4cplus build also takes its required `ThreadPool` dependency in the same step, as a second source archive extracted into `src/threadpool`. log4cplus `REL_2_0_5` pins `ThreadPool` to commit `cc0b6371d3963f7028c2da5fc007733f9f3bf205`; keep the two in sync and do not fetch unused log4cplus submodules.
|
||||||
|
|
||||||
## System Development Packages
|
## System Development Packages
|
||||||
|
|
||||||
|
|||||||
@@ -108,8 +108,11 @@ RUN --mount=type=bind,from=sources,source=protobuf-v3.21.12.tar.gz,target=/tmp/p
|
|||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& rm -rf build src
|
&& rm -rf build src
|
||||||
|
|
||||||
RUN git clone --branch=REL_2_0_5 --depth=1 https://github.com/log4cplus/log4cplus.git src \
|
RUN --mount=type=bind,from=sources,source=log4cplus-REL_2_0_5.tar.gz,target=/tmp/log4cplus.tar.gz \
|
||||||
&& git -C src submodule update --init --depth=1 threadpool \
|
--mount=type=bind,from=sources,source=ThreadPool-cc0b6371d3963f7028c2da5fc007733f9f3bf205.tar.gz,target=/tmp/threadpool.tar.gz \
|
||||||
|
mkdir src \
|
||||||
|
&& tar --extract --gzip --file=/tmp/log4cplus.tar.gz --directory=src --strip-components=1 \
|
||||||
|
&& tar --extract --gzip --file=/tmp/threadpool.tar.gz --directory=src/threadpool --strip-components=1 \
|
||||||
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
|
|||||||
+5
-2
@@ -117,8 +117,11 @@ RUN --mount=type=bind,from=sources,source=protobuf-v3.21.12.tar.gz,target=/tmp/p
|
|||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& rm -rf build src
|
&& rm -rf build src
|
||||||
|
|
||||||
RUN git clone --branch=REL_2_0_5 --depth=1 https://github.com/log4cplus/log4cplus.git src \
|
RUN --mount=type=bind,from=sources,source=log4cplus-REL_2_0_5.tar.gz,target=/tmp/log4cplus.tar.gz \
|
||||||
&& git -C src submodule update --init --depth=1 threadpool \
|
--mount=type=bind,from=sources,source=ThreadPool-cc0b6371d3963f7028c2da5fc007733f9f3bf205.tar.gz,target=/tmp/threadpool.tar.gz \
|
||||||
|
mkdir src \
|
||||||
|
&& tar --extract --gzip --file=/tmp/log4cplus.tar.gz --directory=src --strip-components=1 \
|
||||||
|
&& tar --extract --gzip --file=/tmp/threadpool.tar.gz --directory=src/threadpool --strip-components=1 \
|
||||||
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
-DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu \
|
-DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu \
|
||||||
|
|||||||
@@ -148,3 +148,7 @@ fetch gitlab-libxml2-v2.15.3.tar.gz \
|
|||||||
https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.15.3/libxml2-v2.15.3.tar.gz
|
https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.15.3/libxml2-v2.15.3.tar.gz
|
||||||
fetch makeself-release-2.7.1.tar.gz \
|
fetch makeself-release-2.7.1.tar.gz \
|
||||||
https://wangguofang.net/github.com/megastep/makeself/archive/release-2.7.1.tar.gz
|
https://wangguofang.net/github.com/megastep/makeself/archive/release-2.7.1.tar.gz
|
||||||
|
fetch log4cplus-REL_2_0_5.tar.gz \
|
||||||
|
https://wangguofang.net/github.com/log4cplus/log4cplus/archive/REL_2_0_5.tar.gz
|
||||||
|
fetch ThreadPool-cc0b6371d3963f7028c2da5fc007733f9f3bf205.tar.gz \
|
||||||
|
https://wangguofang.net/github.com/log4cplus/ThreadPool/archive/cc0b6371d3963f7028c2da5fc007733f9f3bf205.tar.gz
|
||||||
+5
-2
@@ -128,8 +128,11 @@ RUN --mount=type=bind,from=sources,source=protobuf-v3.21.12.tar.gz,target=/tmp/p
|
|||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& rm -rf build src
|
&& rm -rf build src
|
||||||
|
|
||||||
RUN git clone --branch=REL_2_0_5 --depth=1 https://github.com/log4cplus/log4cplus.git src \
|
RUN --mount=type=bind,from=sources,source=log4cplus-REL_2_0_5.tar.gz,target=/tmp/log4cplus.tar.gz \
|
||||||
&& git -C src submodule update --init --depth=1 threadpool \
|
--mount=type=bind,from=sources,source=ThreadPool-cc0b6371d3963f7028c2da5fc007733f9f3bf205.tar.gz,target=/tmp/threadpool.tar.gz \
|
||||||
|
mkdir src \
|
||||||
|
&& tar --extract --gzip --file=/tmp/log4cplus.tar.gz --directory=src --strip-components=1 \
|
||||||
|
&& tar --extract --gzip --file=/tmp/threadpool.tar.gz --directory=src/threadpool --strip-components=1 \
|
||||||
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
|
|||||||
Reference in new issue
Block a user