Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c120c47891 |
No files matched your search
@@ -21,8 +21,6 @@
|
|||||||
- On Rocky Linux 9, `glibc-devel`, `kernel-headers`, and `libstdc++-devel` may be installed directly or as compiler dependencies because they are foundational C/C++ platform and toolchain components.
|
- On Rocky Linux 9, `glibc-devel`, `kernel-headers`, and `libstdc++-devel` may be installed directly or as compiler dependencies because they are foundational C/C++ platform and toolchain components.
|
||||||
- On Alpine Linux, `musl-dev` and `linux-headers` may be installed directly or as compiler dependencies because they are foundational C/C++ platform and toolchain components.
|
- On Alpine Linux, `musl-dev` and `linux-headers` may be installed directly or as compiler dependencies because they are foundational C/C++ platform and toolchain components.
|
||||||
|
|
||||||
- The `rocky9-system` image is the exception to the rules above: it deliberately installs third-party libraries and their `-devel` packages from the Rocky Linux 9, CRB and EPEL repositories instead of building them from source, with Protobuf (`v3.21.12`, installed under `/usr/local`) as the only library built from source. Other libraries use distribution versions and are not pinned. Libraries missing from those repositories (for example `magic_enum`) are skipped, not built from source.
|
|
||||||
|
|
||||||
## Meta Libraries
|
## Meta Libraries
|
||||||
|
|
||||||
- Pin all Meta/Facebook ecosystem libraries to the same date-based release tag.
|
- Pin all Meta/Facebook ecosystem libraries to the same date-based release tag.
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
| CZMQ | `4.2.1` |
|
| CZMQ | `4.2.1` |
|
||||||
| JsonCpp | `1.9.8` |
|
| JsonCpp | `1.9.8` |
|
||||||
| librdkafka | `2.15.0` |
|
| librdkafka | `2.15.0` |
|
||||||
| json-c | `0.18` |
|
| json-c | `0.19` |
|
||||||
| RapidJSON | `1.1.0` |
|
| RapidJSON | `1.1.0` |
|
||||||
| curl | `8.21.0` |
|
| curl | `8.21.0` |
|
||||||
| hiredis | `1.4.1` |
|
| hiredis | `1.4.1` |
|
||||||
@@ -50,7 +50,6 @@
|
|||||||
| Snappy | `1.2.2` |
|
| Snappy | `1.2.2` |
|
||||||
| LZ4 | `v1.10.0` |
|
| LZ4 | `v1.10.0` |
|
||||||
| Apache Arrow / Parquet | `25.0.1` |
|
| Apache Arrow / Parquet | `25.0.1` |
|
||||||
| SQLite | `3.54.1` |
|
|
||||||
|
|
||||||
The image includes position-independent static builds of these libraries. Protobuf and libxml2 enable zlib support, and LibDwarf enables compressed debug section support using zlib and Zstd. ZeroMQ enables CURVE security using static libsodium. CZMQ enables UUID support using static util-linux libuuid while disabling undeclared optional integrations. librdkafka includes SSL, zlib, Zstd, and bundled LZ4 support while disabling undeclared optional integrations. spdlog uses external fmt, glog uses gflags, and all Meta libraries share the same release tag. Apache Arrow is built with Parquet (including OpenSSL-based Parquet encryption) and Snappy, LZ4, zlib, and Zstd compression using only the pinned system dependencies above (`ARROW_DEPENDENCY_SOURCE=SYSTEM`), with the bundled jemalloc and mimalloc allocators disabled. Apache Thrift only builds its C++ library, and its headers sit next to fbthrift's under `include/thrift` without overlapping.
|
The image includes position-independent static builds of these libraries. Protobuf and libxml2 enable zlib support, and LibDwarf enables compressed debug section support using zlib and Zstd. ZeroMQ enables CURVE security using static libsodium. CZMQ enables UUID support using static util-linux libuuid while disabling undeclared optional integrations. librdkafka includes SSL, zlib, Zstd, and bundled LZ4 support while disabling undeclared optional integrations. spdlog uses external fmt, glog uses gflags, and all Meta libraries share the same release tag. Apache Arrow is built with Parquet (including OpenSSL-based Parquet encryption) and Snappy, LZ4, zlib, and Zstd compression using only the pinned system dependencies above (`ARROW_DEPENDENCY_SOURCE=SYSTEM`), with the bundled jemalloc and mimalloc allocators disabled. Apache Thrift only builds its C++ library, and its headers sit next to fbthrift's under `include/thrift` without overlapping.
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ Each build script automatically selects Docker or Podman:
|
|||||||
./build-all.sh
|
./build-all.sh
|
||||||
./debian13/build.sh
|
./debian13/build.sh
|
||||||
./rocky9/build.sh
|
./rocky9/build.sh
|
||||||
./rocky9-system/build.sh
|
|
||||||
./alpine3.24/build.sh
|
./alpine3.24/build.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -20,20 +19,10 @@ Use environment variables to select the container engine or override image names
|
|||||||
CONTAINER_ENGINE=podman IMAGE_NAME=my-build-env ./rocky9/build.sh
|
CONTAINER_ENGINE=podman IMAGE_NAME=my-build-env ./rocky9/build.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
The Debian 13 and Rocky Linux 9 images install every library under `/opt/local` by default. Set `PREFIX` to install them elsewhere; the build environment variables (`PATH`, `PKG_CONFIG_PATH`, `CMAKE_PREFIX_PATH`, `CMAKE_INSTALL_PREFIX`, and so on) follow it. Rust is a build tool rather than a library, so it always lives under `/usr/local` and is not affected by `PREFIX`. The Alpine image does not support `PREFIX`.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
PREFIX=/opt/stack ./debian13/build.sh
|
|
||||||
PREFIX=/opt/stack ./rocky9/build.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
The `rocky9-system` image uses the libraries shipped by Rocky Linux 9 (BaseOS, AppStream, CRB and EPEL) instead of building them from source, except Protobuf, which is built from source (`v3.21.12`, under `/usr/local`). Libraries that those repositories do not provide are simply left out.
|
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run --rm -it debian13-source-stack
|
docker run --rm -it debian13-source-stack
|
||||||
docker run --rm -it rocky9-source-stack
|
docker run --rm -it rocky9-source-stack
|
||||||
docker run --rm -it rocky9-system-stack
|
|
||||||
docker run --rm -it alpine3.24-source-stack
|
docker run --rm -it alpine3.24-source-stack
|
||||||
```
|
```
|
||||||
+1
-11
@@ -388,7 +388,7 @@ RUN --mount=type=bind,from=sources,source=librdkafka-v2.15.0.tar.gz,target=/tmp/
|
|||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& rm -rf build src
|
&& rm -rf build src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=json-c-json-c-0.18-20240915.tar.gz,target=/tmp/json-c.tar.gz \
|
RUN --mount=type=bind,from=sources,source=json-c-json-c-0.19-20260627.tar.gz,target=/tmp/json-c.tar.gz \
|
||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --gzip --file=/tmp/json-c.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/json-c.tar.gz --directory=src --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 \
|
||||||
@@ -607,14 +607,4 @@ RUN --mount=type=bind,from=sources,source=makeself-release-2.7.1.tar.gz,target=/
|
|||||||
&& ln -s makeself.sh /usr/local/bin/makeself \
|
&& ln -s makeself.sh /usr/local/bin/makeself \
|
||||||
&& rm -rf src
|
&& rm -rf src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=sqlite-autoconf-3540100.tar.gz,target=/tmp/sqlite.tar.gz \
|
|
||||||
mkdir src \
|
|
||||||
&& tar --extract --gzip --file=/tmp/sqlite.tar.gz --directory=src --strip-components=1 \
|
|
||||||
&& cd src \
|
|
||||||
&& CFLAGS="-O2 -fPIC" ./configure --prefix=/usr/local --libdir=/usr/local/lib --disable-shared --enable-static \
|
|
||||||
&& make --jobs="$(nproc)" \
|
|
||||||
&& make install \
|
|
||||||
&& cd .. \
|
|
||||||
&& rm -rf src
|
|
||||||
|
|
||||||
CMD ["/bin/sh"]
|
CMD ["/bin/sh"]
|
||||||
@@ -6,5 +6,4 @@ SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|||||||
|
|
||||||
"$SCRIPT_DIR/debian13/build.sh"
|
"$SCRIPT_DIR/debian13/build.sh"
|
||||||
"$SCRIPT_DIR/rocky9/build.sh"
|
"$SCRIPT_DIR/rocky9/build.sh"
|
||||||
"$SCRIPT_DIR/rocky9-system/build.sh"
|
|
||||||
"$SCRIPT_DIR/alpine3.24/build.sh"
|
"$SCRIPT_DIR/alpine3.24/build.sh"
|
||||||
+4
-15
@@ -23,11 +23,11 @@ RUN sed -i 's|deb.debian.org|mirrors.ustc.edu.cn|g' /etc/apt/sources.list.d/debi
|
|||||||
|
|
||||||
# Install prefix of every dependency, and the Debian multiarch directory name (`gcc -dumpmachine`)
|
# Install prefix of every dependency, and the Debian multiarch directory name (`gcc -dumpmachine`)
|
||||||
# its libraries are installed under; build.sh derives the latter from `uname -m`.
|
# its libraries are installed under; build.sh derives the latter from `uname -m`.
|
||||||
ARG PREFIX=/opt/local
|
ARG PREFIX=/usr/local
|
||||||
ARG MULTIARCH=x86_64-linux-gnu
|
ARG MULTIARCH=x86_64-linux-gnu
|
||||||
|
|
||||||
# Make the compiler, CMake, pkg-config and the shell find earlier dependencies under a prefix other
|
# Make the compiler, CMake, pkg-config and the shell find earlier dependencies under a prefix other
|
||||||
# than the default /opt/local. CMake (>= 3.29) takes its default install prefix from the environment.
|
# than the default /usr/local. CMake (>= 3.29) takes its default install prefix from the environment.
|
||||||
ENV PATH=${PREFIX}/bin:${PATH} \
|
ENV PATH=${PREFIX}/bin:${PATH} \
|
||||||
C_INCLUDE_PATH=${PREFIX}/include \
|
C_INCLUDE_PATH=${PREFIX}/include \
|
||||||
CPLUS_INCLUDE_PATH=${PREFIX}/include \
|
CPLUS_INCLUDE_PATH=${PREFIX}/include \
|
||||||
@@ -38,11 +38,10 @@ ENV PATH=${PREFIX}/bin:${PATH} \
|
|||||||
|
|
||||||
RUN test "$(cmake --version | sed -n '1s/[^0-9]*//p' | cut -d. -f2)" -ge 29
|
RUN test "$(cmake --version | sed -n '1s/[^0-9]*//p' | cut -d. -f2)" -ge 29
|
||||||
|
|
||||||
# Rust is a build tool, not a library, so it is installed under /usr/local regardless of ${PREFIX}.
|
|
||||||
RUN --mount=type=bind,from=sources,source=rust,target=/tmp/rust \
|
RUN --mount=type=bind,from=sources,source=rust,target=/tmp/rust \
|
||||||
mkdir rust-src \
|
mkdir rust-src \
|
||||||
&& tar -xJf "/tmp/rust/rust-1.99.1-$(uname -m)-unknown-linux-gnu.tar.xz" -C rust-src --strip-components=1 \
|
&& tar -xJf "/tmp/rust/rust-1.99.1-$(uname -m)-unknown-linux-gnu.tar.xz" -C rust-src --strip-components=1 \
|
||||||
&& rust-src/install.sh --prefix=/usr/local --without=rust-docs \
|
&& rust-src/install.sh --prefix=${PREFIX} --without=rust-docs \
|
||||||
&& rm -rf rust-src
|
&& rm -rf rust-src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=boost_1_83_0.tar.bz2,target=/tmp/boost.tar.bz2 \
|
RUN --mount=type=bind,from=sources,source=boost_1_83_0.tar.bz2,target=/tmp/boost.tar.bz2 \
|
||||||
@@ -493,7 +492,7 @@ RUN --mount=type=bind,from=sources,source=librdkafka-v2.15.0.tar.gz,target=/tmp/
|
|||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& rm -rf build src
|
&& rm -rf build src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=json-c-json-c-0.18-20240915.tar.gz,target=/tmp/json-c.tar.gz \
|
RUN --mount=type=bind,from=sources,source=json-c-json-c-0.19-20260627.tar.gz,target=/tmp/json-c.tar.gz \
|
||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --gzip --file=/tmp/json-c.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/json-c.tar.gz --directory=src --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 \
|
||||||
@@ -819,16 +818,6 @@ RUN --mount=type=bind,from=sources,source=duckdb-v1.5.6.tar.gz,target=/tmp/duckd
|
|||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& rm -rf build src ui-src
|
&& rm -rf build src ui-src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=sqlite-autoconf-3540100.tar.gz,target=/tmp/sqlite.tar.gz \
|
|
||||||
mkdir src \
|
|
||||||
&& tar --extract --gzip --file=/tmp/sqlite.tar.gz --directory=src --strip-components=1 \
|
|
||||||
&& cd src \
|
|
||||||
&& CFLAGS="-O2 -fPIC" ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib/$(gcc -dumpmachine) --disable-shared --enable-static \
|
|
||||||
&& make --jobs="$(nproc)" \
|
|
||||||
&& make install \
|
|
||||||
&& cd .. \
|
|
||||||
&& rm -rf src
|
|
||||||
|
|
||||||
COPY source-stack.cmake.in /tmp/
|
COPY source-stack.cmake.in /tmp/
|
||||||
RUN mkdir -p ${PREFIX}/share/source-stack \
|
RUN mkdir -p ${PREFIX}/share/source-stack \
|
||||||
&& sed "s|@MULTIARCH@|$(gcc -dumpmachine)|" /tmp/source-stack.cmake.in \
|
&& sed "s|@MULTIARCH@|$(gcc -dumpmachine)|" /tmp/source-stack.cmake.in \
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
IMAGE_NAME="${IMAGE_NAME:-debian13-source-stack}"
|
IMAGE_NAME="${IMAGE_NAME:-debian13-source-stack}"
|
||||||
PREFIX="${PREFIX:-/opt/local}"
|
PREFIX="${PREFIX:-/usr/local}"
|
||||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||||
|
|
||||||
# CLAUDE_CODE_OAUTH_TOKEN encrypted with AES-256-CBC (PBKDF2, base64). Generate with --encrypt.
|
# CLAUDE_CODE_OAUTH_TOKEN encrypted with AES-256-CBC (PBKDF2, base64). Generate with --encrypt.
|
||||||
|
|||||||
+2
-4
@@ -96,8 +96,8 @@ fetch jsoncpp-1.9.8.tar.gz \
|
|||||||
https://wangguofang.net/github.com/open-source-parsers/jsoncpp/archive/1.9.8.tar.gz
|
https://wangguofang.net/github.com/open-source-parsers/jsoncpp/archive/1.9.8.tar.gz
|
||||||
fetch librdkafka-v2.15.0.tar.gz \
|
fetch librdkafka-v2.15.0.tar.gz \
|
||||||
https://wangguofang.net/github.com/confluentinc/librdkafka/archive/v2.15.0.tar.gz
|
https://wangguofang.net/github.com/confluentinc/librdkafka/archive/v2.15.0.tar.gz
|
||||||
fetch json-c-json-c-0.18-20240915.tar.gz \
|
fetch json-c-json-c-0.19-20260627.tar.gz \
|
||||||
https://wangguofang.net/github.com/json-c/json-c/archive/json-c-0.18-20240915.tar.gz
|
https://wangguofang.net/github.com/json-c/json-c/archive/json-c-0.19-20260627.tar.gz
|
||||||
fetch rapidjson-v1.1.0.tar.gz \
|
fetch rapidjson-v1.1.0.tar.gz \
|
||||||
https://wangguofang.net/github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz
|
https://wangguofang.net/github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz
|
||||||
fetch curl-curl-8_21_0.tar.gz \
|
fetch curl-curl-8_21_0.tar.gz \
|
||||||
@@ -162,5 +162,3 @@ fetch log4cplus-REL_2_0_5.tar.gz \
|
|||||||
https://wangguofang.net/github.com/log4cplus/log4cplus/archive/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 \
|
fetch ThreadPool-cc0b6371d3963f7028c2da5fc007733f9f3bf205.tar.gz \
|
||||||
https://wangguofang.net/github.com/log4cplus/ThreadPool/archive/cc0b6371d3963f7028c2da5fc007733f9f3bf205.tar.gz
|
https://wangguofang.net/github.com/log4cplus/ThreadPool/archive/cc0b6371d3963f7028c2da5fc007733f9f3bf205.tar.gz
|
||||||
fetch sqlite-autoconf-3540100.tar.gz \
|
|
||||||
https://www.sqlite.org/2026/sqlite-autoconf-3540100.tar.gz
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
FROM docker.io/library/rockylinux:9
|
|
||||||
|
|
||||||
# Toolchain and build tools, same as the rocky9 image.
|
|
||||||
RUN dnf install --assumeyes --enablerepo=crb \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
bzip2 \
|
|
||||||
ca-certificates \
|
|
||||||
cmake \
|
|
||||||
curl-minimal \
|
|
||||||
gcc \
|
|
||||||
gcc-c++ \
|
|
||||||
libasan \
|
|
||||||
gcc-toolset-15-gcc-c++ \
|
|
||||||
gcc-toolset-15-libasan-devel \
|
|
||||||
git \
|
|
||||||
libtool \
|
|
||||||
make \
|
|
||||||
ninja-build \
|
|
||||||
patch \
|
|
||||||
perl-core \
|
|
||||||
pkgconf-pkg-config \
|
|
||||||
rpm-build \
|
|
||||||
tar \
|
|
||||||
xz \
|
|
||||||
which \
|
|
||||||
epel-release \
|
|
||||||
&& sed \
|
|
||||||
-e 's!^metalink=!#metalink=!g' \
|
|
||||||
-e 's!^#baseurl=!baseurl=!g' \
|
|
||||||
-e 's!https\?://download\.example/pub/epel!https://mirrors.ustc.edu.cn/epel!g' \
|
|
||||||
-i /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel-testing.repo \
|
|
||||||
&& dnf install --assumeyes \
|
|
||||||
makeself \
|
|
||||||
&& dnf upgrade --assumeyes \
|
|
||||||
&& dnf clean all \
|
|
||||||
&& rm -rf /var/cache/dnf
|
|
||||||
|
|
||||||
RUN git config --global url."https://wangguofang.net/github.com/".insteadOf "https://github.com/"
|
|
||||||
|
|
||||||
RUN test "$(cmake --version | sed -n '1s/[^0-9]*//p' | cut -d. -f2)" -ge 29
|
|
||||||
|
|
||||||
# Libraries come from the distribution (Rocky Linux 9, CRB and EPEL) instead of being built from
|
|
||||||
# source, except Protobuf (below). A package that is not available in these repositories is skipped, not an error.
|
|
||||||
RUN dnf install --assumeyes --enablerepo=crb,epel \
|
|
||||||
--setopt=skip_missing_names_on_install=True \
|
|
||||||
--skip-broken \
|
|
||||||
boost-devel \
|
|
||||||
cyrus-sasl-devel \
|
|
||||||
fast_float-devel \
|
|
||||||
fmt-devel \
|
|
||||||
folly-devel \
|
|
||||||
gflags-devel \
|
|
||||||
glog-devel \
|
|
||||||
gmock-devel \
|
|
||||||
gmp-devel \
|
|
||||||
gnutls-devel \
|
|
||||||
gtest-devel \
|
|
||||||
hiredis-devel \
|
|
||||||
jsoncpp-devel \
|
|
||||||
json-c-devel \
|
|
||||||
libaio-devel \
|
|
||||||
libcurl-devel \
|
|
||||||
libdwarf-devel \
|
|
||||||
libevent-devel \
|
|
||||||
libmaxminddb-devel \
|
|
||||||
libsodium-devel \
|
|
||||||
liburing-devel \
|
|
||||||
libuuid-devel \
|
|
||||||
libxml2-devel \
|
|
||||||
libyaml-devel \
|
|
||||||
libzstd-devel \
|
|
||||||
log4cplus-devel \
|
|
||||||
lz4-devel \
|
|
||||||
magic_enum-devel \
|
|
||||||
nettle-devel \
|
|
||||||
numactl-devel \
|
|
||||||
openssl-devel \
|
|
||||||
rapidjson-devel \
|
|
||||||
librdkafka-devel \
|
|
||||||
snappy-devel \
|
|
||||||
spdlog-devel \
|
|
||||||
sqlite-devel \
|
|
||||||
thrift-devel \
|
|
||||||
tsl-sparse-map-devel \
|
|
||||||
xsimd-devel \
|
|
||||||
xxhash-devel \
|
|
||||||
zeromq-devel \
|
|
||||||
czmq-devel \
|
|
||||||
zlib-devel \
|
|
||||||
libarrow-devel \
|
|
||||||
parquet-libs-devel \
|
|
||||||
&& dnf clean all \
|
|
||||||
&& rm -rf /var/cache/dnf
|
|
||||||
|
|
||||||
# Protobuf is the only library built from source; it is installed under /usr/local, which takes
|
|
||||||
# precedence over the system packages in /usr.
|
|
||||||
RUN --mount=type=bind,from=sources,source=protobuf-v3.21.12.tar.gz,target=/tmp/protobuf.tar.gz \
|
|
||||||
mkdir src \
|
|
||||||
&& tar --extract --gzip --file=/tmp/protobuf.tar.gz --directory=src --strip-components=1 \
|
|
||||||
&& cmake -G Ninja -S src -B build -Dprotobuf_BUILD_TESTS=OFF \
|
|
||||||
-Dprotobuf_BUILD_SHARED_LIBS=OFF \
|
|
||||||
-Dprotobuf_WITH_ZLIB=ON \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DBUILD_SHARED_LIBS=OFF \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
|
||||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
|
||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
|
||||||
&& rm -rf build src
|
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
IMAGE_NAME="${IMAGE_NAME:-rocky9-system-stack}"
|
|
||||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
||||||
SOURCES_DIR="${SOURCES_DIR:-$SCRIPT_DIR/../sources}"
|
|
||||||
FETCH_SCRIPT="$SCRIPT_DIR/../fetch-sources.sh"
|
|
||||||
|
|
||||||
if ! command -v podman >/dev/null 2>&1; then
|
|
||||||
echo "Error: Podman is required." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
SOURCES_DIR="$SOURCES_DIR" "$FETCH_SCRIPT"
|
|
||||||
|
|
||||||
echo "Building image $IMAGE_NAME with podman ..."
|
|
||||||
exec podman build --build-context sources="$SOURCES_DIR" \
|
|
||||||
--tag "$IMAGE_NAME" "$SCRIPT_DIR"
|
|
||||||
+23
-51
@@ -37,22 +37,6 @@ RUN dnf install --assumeyes --enablerepo=crb \
|
|||||||
|
|
||||||
RUN git config --global url."https://wangguofang.net/github.com/".insteadOf "https://github.com/"
|
RUN git config --global url."https://wangguofang.net/github.com/".insteadOf "https://github.com/"
|
||||||
|
|
||||||
# Install prefix of every dependency. Libraries are installed under ${PREFIX}/lib64.
|
|
||||||
ARG PREFIX=/opt/local
|
|
||||||
|
|
||||||
# Make the compiler, CMake, pkg-config and the shell find earlier dependencies under a prefix other
|
|
||||||
# than the default /opt/local. CMake (>= 3.29) takes its default install prefix from the environment.
|
|
||||||
ENV PATH=${PREFIX}/bin:${PATH} \
|
|
||||||
C_INCLUDE_PATH=${PREFIX}/include \
|
|
||||||
CPLUS_INCLUDE_PATH=${PREFIX}/include \
|
|
||||||
LIBRARY_PATH=${PREFIX}/lib64:${PREFIX}/lib \
|
|
||||||
PKG_CONFIG_PATH=${PREFIX}/lib64/pkgconfig:${PREFIX}/lib/pkgconfig:${PREFIX}/share/pkgconfig \
|
|
||||||
CMAKE_PREFIX_PATH=${PREFIX} \
|
|
||||||
CMAKE_INSTALL_PREFIX=${PREFIX}
|
|
||||||
|
|
||||||
RUN test "$(cmake --version | sed -n '1s/[^0-9]*//p' | cut -d. -f2)" -ge 29
|
|
||||||
|
|
||||||
# Rust is a build tool, not a library, so it is installed under /usr/local regardless of ${PREFIX}.
|
|
||||||
RUN --mount=type=bind,from=sources,source=rust,target=/tmp/rust \
|
RUN --mount=type=bind,from=sources,source=rust,target=/tmp/rust \
|
||||||
mkdir rust-src \
|
mkdir rust-src \
|
||||||
&& tar -xJf "/tmp/rust/rust-1.99.1-$(uname -m)-unknown-linux-gnu.tar.xz" -C rust-src --strip-components=1 \
|
&& tar -xJf "/tmp/rust/rust-1.99.1-$(uname -m)-unknown-linux-gnu.tar.xz" -C rust-src --strip-components=1 \
|
||||||
@@ -63,7 +47,7 @@ RUN --mount=type=bind,from=sources,source=boost_1_83_0.tar.bz2,target=/tmp/boost
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --bzip2 --file=/tmp/boost.tar.bz2 --directory=src --strip-components=1 \
|
&& tar --extract --bzip2 --file=/tmp/boost.tar.bz2 --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& ./bootstrap.sh --prefix=${PREFIX} --libdir=${PREFIX}/lib64 \
|
&& ./bootstrap.sh --prefix=/usr/local --libdir=/usr/local/lib64 \
|
||||||
&& ./b2 --jobs="$(nproc)" \
|
&& ./b2 --jobs="$(nproc)" \
|
||||||
--with-atomic \
|
--with-atomic \
|
||||||
--with-chrono \
|
--with-chrono \
|
||||||
@@ -89,7 +73,7 @@ RUN --mount=type=bind,from=sources,source=openssl-openssl-3.0.15.tar.gz,target=/
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --gzip --file=/tmp/openssl.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/openssl.tar.gz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& ./Configure --prefix=${PREFIX} no-shared no-tests -fPIC \
|
&& ./Configure --prefix=/usr/local no-shared no-tests -fPIC \
|
||||||
&& make --jobs="$(nproc)" \
|
&& make --jobs="$(nproc)" \
|
||||||
&& make install_sw \
|
&& make install_sw \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
@@ -127,7 +111,7 @@ RUN --mount=type=bind,from=sources,source=zlib-v1.3.1.tar.gz,target=/tmp/zlib.ta
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --gzip --file=/tmp/zlib.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/zlib.tar.gz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 --static \
|
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --static \
|
||||||
&& make --jobs="$(nproc)" \
|
&& make --jobs="$(nproc)" \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
@@ -220,7 +204,7 @@ RUN --mount=type=bind,from=sources,source=gflags-v2.3.1.tar.gz,target=/tmp/gflag
|
|||||||
-DINSTALL_HEADERS=ON \
|
-DINSTALL_HEADERS=ON \
|
||||||
-DINSTALL_SHARED_LIBS=OFF \
|
-DINSTALL_SHARED_LIBS=OFF \
|
||||||
-DINSTALL_STATIC_LIBS=ON \
|
-DINSTALL_STATIC_LIBS=ON \
|
||||||
-DLIBRARY_INSTALL_DIR=${PREFIX}/lib64 \
|
-DLIBRARY_INSTALL_DIR=/usr/local/lib64 \
|
||||||
-DREGISTER_INSTALL_PREFIX=OFF \
|
-DREGISTER_INSTALL_PREFIX=OFF \
|
||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& rm -rf build src
|
&& rm -rf build src
|
||||||
@@ -243,7 +227,7 @@ RUN --mount=type=bind,from=sources,source=liburing-liburing-2.15.tar.gz,target=/
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --gzip --file=/tmp/liburing.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/liburing.tar.gz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 --libdevdir=${PREFIX}/lib64 \
|
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --libdevdir=/usr/local/lib64 \
|
||||||
&& make --jobs="$(nproc)" ENABLE_SHARED=0 library \
|
&& make --jobs="$(nproc)" ENABLE_SHARED=0 library \
|
||||||
&& make ENABLE_SHARED=0 install \
|
&& make ENABLE_SHARED=0 install \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
@@ -253,7 +237,7 @@ RUN --mount=type=bind,from=sources,source=libaio_0.3.113.orig.tar.gz,target=/tmp
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --gzip --file=/tmp/libaio.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/libaio.tar.gz --directory=src --strip-components=1 \
|
||||||
&& make --directory=src --jobs="$(nproc)" ENABLE_SHARED=0 \
|
&& make --directory=src --jobs="$(nproc)" ENABLE_SHARED=0 \
|
||||||
&& make --directory=src ENABLE_SHARED=0 prefix=${PREFIX} libdir=${PREFIX}/lib64 install \
|
&& make --directory=src ENABLE_SHARED=0 prefix=/usr/local libdir=/usr/local/lib64 install \
|
||||||
&& rm -rf src
|
&& rm -rf src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=libdwarf-code-v2.3.2.tar.gz,target=/tmp/libdwarf-code.tar.gz \
|
RUN --mount=type=bind,from=sources,source=libdwarf-code-v2.3.2.tar.gz,target=/tmp/libdwarf-code.tar.gz \
|
||||||
@@ -276,7 +260,7 @@ RUN --mount=type=bind,from=sources,source=libsodium-1.0.20-RELEASE.tar.gz,target
|
|||||||
&& tar --extract --gzip --file=/tmp/libsodium.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/libsodium.tar.gz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& ./autogen.sh \
|
&& ./autogen.sh \
|
||||||
&& ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 --disable-shared --enable-static --with-pic \
|
&& ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --disable-shared --enable-static --with-pic \
|
||||||
&& make --jobs="$(nproc)" \
|
&& make --jobs="$(nproc)" \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
@@ -310,7 +294,7 @@ RUN --mount=type=bind,from=sources,source=numactl-v2.0.19.tar.gz,target=/tmp/num
|
|||||||
&& tar --extract --gzip --file=/tmp/numactl.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/numactl.tar.gz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& ./autogen.sh \
|
&& ./autogen.sh \
|
||||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 --disable-shared --enable-static \
|
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --disable-shared --enable-static \
|
||||||
&& make --jobs="$(nproc)" \
|
&& make --jobs="$(nproc)" \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
@@ -413,7 +397,7 @@ RUN --mount=type=bind,from=sources,source=util-linux-2.42.2.tar.xz,target=/tmp/u
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --xz --file=/tmp/util-linux.tar.xz --directory=src --strip-components=1 \
|
&& tar --extract --xz --file=/tmp/util-linux.tar.xz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 \
|
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 \
|
||||||
--disable-all-programs \
|
--disable-all-programs \
|
||||||
--disable-bash-completion \
|
--disable-bash-completion \
|
||||||
--disable-makeinstall-chown \
|
--disable-makeinstall-chown \
|
||||||
@@ -494,7 +478,7 @@ RUN --mount=type=bind,from=sources,source=librdkafka-v2.15.0.tar.gz,target=/tmp/
|
|||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& rm -rf build src
|
&& rm -rf build src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=json-c-json-c-0.18-20240915.tar.gz,target=/tmp/json-c.tar.gz \
|
RUN --mount=type=bind,from=sources,source=json-c-json-c-0.19-20260627.tar.gz,target=/tmp/json-c.tar.gz \
|
||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --gzip --file=/tmp/json-c.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/json-c.tar.gz --directory=src --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 \
|
||||||
@@ -513,7 +497,7 @@ RUN --mount=type=bind,from=sources,source=rapidjson-v1.1.0.tar.gz,target=/tmp/ra
|
|||||||
&& tar --extract --gzip --file=/tmp/rapidjson.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/rapidjson.tar.gz --directory=src --strip-components=1 \
|
||||||
&& git -C src apply /tmp/rapidjson-generic-string-ref-assignment.patch \
|
&& git -C src apply /tmp/rapidjson-generic-string-ref-assignment.patch \
|
||||||
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DLIB_INSTALL_DIR=${PREFIX}/lib64 \
|
-DLIB_INSTALL_DIR=/usr/local/lib64 \
|
||||||
-DRAPIDJSON_BUILD_DOC=OFF \
|
-DRAPIDJSON_BUILD_DOC=OFF \
|
||||||
-DRAPIDJSON_BUILD_EXAMPLES=OFF \
|
-DRAPIDJSON_BUILD_EXAMPLES=OFF \
|
||||||
-DRAPIDJSON_BUILD_TESTS=OFF \
|
-DRAPIDJSON_BUILD_TESTS=OFF \
|
||||||
@@ -564,7 +548,7 @@ RUN --mount=type=bind,from=sources,source=gmp-6.3.0.tar.xz,target=/tmp/gmp.tar.x
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --xz --file=/tmp/gmp.tar.xz --directory=src --strip-components=1 \
|
&& tar --extract --xz --file=/tmp/gmp.tar.xz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 --disable-shared --enable-static --enable-fat \
|
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --disable-shared --enable-static --enable-fat \
|
||||||
&& make --jobs="$(nproc)" \
|
&& make --jobs="$(nproc)" \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
@@ -574,7 +558,7 @@ RUN --mount=type=bind,from=sources,source=nettle-3.10.2.tar.gz,target=/tmp/nettl
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --gzip --file=/tmp/nettle.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/nettle.tar.gz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 \
|
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 \
|
||||||
--disable-documentation \
|
--disable-documentation \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
--enable-static \
|
--enable-static \
|
||||||
@@ -587,7 +571,7 @@ RUN --mount=type=bind,from=sources,source=gnutls-3.8.13.tar.xz,target=/tmp/gnutl
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --xz --file=/tmp/gnutls.tar.xz --directory=src --strip-components=1 \
|
&& tar --extract --xz --file=/tmp/gnutls.tar.xz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 \
|
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 \
|
||||||
--with-included-libtasn1 \
|
--with-included-libtasn1 \
|
||||||
--with-included-unistring \
|
--with-included-unistring \
|
||||||
--disable-cxx \
|
--disable-cxx \
|
||||||
@@ -626,7 +610,7 @@ RUN --mount=type=bind,from=sources,source=libyaml-0.2.5.tar.gz,target=/tmp/libya
|
|||||||
&& tar --extract --gzip --file=/tmp/libyaml.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/libyaml.tar.gz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& ./bootstrap \
|
&& ./bootstrap \
|
||||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 --disable-shared --enable-static \
|
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 --disable-shared --enable-static \
|
||||||
&& make --jobs="$(nproc)" \
|
&& make --jobs="$(nproc)" \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
@@ -664,7 +648,7 @@ RUN --mount=type=bind,from=sources,source=libunwind-v1.8.3.tar.gz,target=/tmp/li
|
|||||||
&& tar --extract --gzip --file=/tmp/libunwind.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/libunwind.tar.gz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& autoreconf --install \
|
&& autoreconf --install \
|
||||||
&& CFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 \
|
&& CFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
--enable-static \
|
--enable-static \
|
||||||
--disable-tests \
|
--disable-tests \
|
||||||
@@ -681,7 +665,7 @@ RUN --mount=type=bind,from=sources,source=jemalloc-5.3.1.tar.gz,target=/tmp/jema
|
|||||||
&& tar --extract --gzip --file=/tmp/jemalloc.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/jemalloc.tar.gz --directory=src --strip-components=1 \
|
||||||
&& cd src \
|
&& cd src \
|
||||||
&& ./autogen.sh \
|
&& ./autogen.sh \
|
||||||
&& CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 \
|
&& CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=/usr/local --libdir=/usr/local/lib64 \
|
||||||
--disable-doc \
|
--disable-doc \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
--enable-static \
|
--enable-static \
|
||||||
@@ -696,8 +680,8 @@ RUN --mount=type=bind,from=sources,source=libproxyprotocol-v1.3.3.tar.gz,target=
|
|||||||
mkdir src \
|
mkdir src \
|
||||||
&& tar --extract --gzip --file=/tmp/libproxyprotocol.tar.gz --directory=src --strip-components=1 \
|
&& tar --extract --gzip --file=/tmp/libproxyprotocol.tar.gz --directory=src --strip-components=1 \
|
||||||
&& gcc -fPIC -c -o src/src/proxy_protocol.o src/src/proxy_protocol.c \
|
&& gcc -fPIC -c -o src/src/proxy_protocol.o src/src/proxy_protocol.c \
|
||||||
&& ar rcs ${PREFIX}/lib64/libproxyprotocol.a src/src/proxy_protocol.o \
|
&& ar rcs /usr/local/lib64/libproxyprotocol.a src/src/proxy_protocol.o \
|
||||||
&& cp src/src/proxy_protocol.h ${PREFIX}/include/ \
|
&& cp src/src/proxy_protocol.h /usr/local/include/ \
|
||||||
&& rm -rf src
|
&& rm -rf src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=xsimd-14.2.0.tar.gz,target=/tmp/xsimd.tar.gz \
|
RUN --mount=type=bind,from=sources,source=xsimd-14.2.0.tar.gz,target=/tmp/xsimd.tar.gz \
|
||||||
@@ -717,10 +701,10 @@ RUN --mount=type=bind,from=sources,source=thrift-v0.22.0.tar.gz,target=/tmp/thri
|
|||||||
-DBUILD_SHARED_LIBS=OFF \
|
-DBUILD_SHARED_LIBS=OFF \
|
||||||
-DBUILD_TESTING=OFF \
|
-DBUILD_TESTING=OFF \
|
||||||
-DBUILD_TUTORIALS=OFF \
|
-DBUILD_TUTORIALS=OFF \
|
||||||
-DCMAKE_INSTALL_DIR=${PREFIX}/lib64/cmake \
|
-DCMAKE_INSTALL_DIR=/usr/local/lib64/cmake \
|
||||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
|
||||||
-DLIB_INSTALL_DIR=${PREFIX}/lib64 \
|
-DLIB_INSTALL_DIR=/usr/local/lib64 \
|
||||||
-DPKGCONFIG_INSTALL_DIR=${PREFIX}/lib64/pkgconfig \
|
-DPKGCONFIG_INSTALL_DIR=/usr/local/lib64/pkgconfig \
|
||||||
-DWITH_AS3=OFF \
|
-DWITH_AS3=OFF \
|
||||||
-DWITH_C_GLIB=OFF \
|
-DWITH_C_GLIB=OFF \
|
||||||
-DWITH_CPP=ON \
|
-DWITH_CPP=ON \
|
||||||
@@ -734,7 +718,7 @@ RUN --mount=type=bind,from=sources,source=thrift-v0.22.0.tar.gz,target=/tmp/thri
|
|||||||
-DWITH_ZLIB=OFF \
|
-DWITH_ZLIB=OFF \
|
||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& sed -i 's|^libdir=.*|libdir=${prefix}/lib64|' \
|
&& sed -i 's|^libdir=.*|libdir=${prefix}/lib64|' \
|
||||||
${PREFIX}/lib64/pkgconfig/thrift.pc \
|
/usr/local/lib64/pkgconfig/thrift.pc \
|
||||||
&& rm -rf build src
|
&& rm -rf build src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=snappy-1.2.2.tar.gz,target=/tmp/snappy.tar.gz \
|
RUN --mount=type=bind,from=sources,source=snappy-1.2.2.tar.gz,target=/tmp/snappy.tar.gz \
|
||||||
@@ -814,16 +798,4 @@ RUN --mount=type=bind,from=sources,source=duckdb-v1.5.6.tar.gz,target=/tmp/duckd
|
|||||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||||
&& rm -rf build src ui-src
|
&& rm -rf build src ui-src
|
||||||
|
|
||||||
RUN --mount=type=bind,from=sources,source=sqlite-autoconf-3540100.tar.gz,target=/tmp/sqlite.tar.gz \
|
|
||||||
mkdir src \
|
|
||||||
&& tar --extract --gzip --file=/tmp/sqlite.tar.gz --directory=src --strip-components=1 \
|
|
||||||
&& cd src \
|
|
||||||
&& CFLAGS="-O2 -fPIC" ./configure --prefix=${PREFIX} --libdir=${PREFIX}/lib64 --disable-shared --enable-static \
|
|
||||||
&& make --jobs="$(nproc)" \
|
|
||||||
&& make install \
|
|
||||||
&& cd .. \
|
|
||||||
&& rm -rf src
|
|
||||||
|
|
||||||
COPY source-stack.cmake ${PREFIX}/share/source-stack/source-stack.cmake
|
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
CMD ["/bin/bash"]
|
||||||
+2
-4
@@ -3,7 +3,6 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
IMAGE_NAME="${IMAGE_NAME:-rocky9-source-stack}"
|
IMAGE_NAME="${IMAGE_NAME:-rocky9-source-stack}"
|
||||||
PREFIX="${PREFIX:-/opt/local}"
|
|
||||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||||
SOURCES_DIR="${SOURCES_DIR:-$SCRIPT_DIR/../sources}"
|
SOURCES_DIR="${SOURCES_DIR:-$SCRIPT_DIR/../sources}"
|
||||||
FETCH_SCRIPT="$SCRIPT_DIR/../fetch-sources.sh"
|
FETCH_SCRIPT="$SCRIPT_DIR/../fetch-sources.sh"
|
||||||
@@ -15,6 +14,5 @@ fi
|
|||||||
|
|
||||||
SOURCES_DIR="$SOURCES_DIR" "$FETCH_SCRIPT"
|
SOURCES_DIR="$SOURCES_DIR" "$FETCH_SCRIPT"
|
||||||
|
|
||||||
echo "Building image $IMAGE_NAME with podman (prefix $PREFIX) ..."
|
echo "Building image $IMAGE_NAME with podman ..."
|
||||||
exec podman build --build-context sources="$SOURCES_DIR" \
|
exec podman build --build-context sources="$SOURCES_DIR" --tag "$IMAGE_NAME" "$SCRIPT_DIR"
|
||||||
--build-arg PREFIX="$PREFIX" --tag "$IMAGE_NAME" "$SCRIPT_DIR"
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
# Installed into the image at ${PREFIX}/share/source-stack/source-stack.cmake.
|
|
||||||
#
|
|
||||||
# Points CMake at the dependencies installed by this image. It mirrors the
|
|
||||||
# Dockerfile's ENV block (PATH, PKG_CONFIG_PATH, CMAKE_PREFIX_PATH,
|
|
||||||
# C_INCLUDE_PATH/CPLUS_INCLUDE_PATH, LIBRARY_PATH) for CMake's own lookups.
|
|
||||||
# The prefix is derived from this file's location, so it also works when the
|
|
||||||
# prefix is moved. Include it after project(), before the first find_package().
|
|
||||||
#
|
|
||||||
# GW_SOURCE_STACK_ONLY resolve libraries and packages only below the prefix
|
|
||||||
|
|
||||||
option(GW_SOURCE_STACK_ONLY
|
|
||||||
"Resolve libraries and packages only below the source-stack prefix" OFF)
|
|
||||||
|
|
||||||
get_filename_component(_ss_p "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
|
|
||||||
|
|
||||||
list(PREPEND CMAKE_PREFIX_PATH "${_ss_p}")
|
|
||||||
list(PREPEND CMAKE_PROGRAM_PATH "${_ss_p}/bin")
|
|
||||||
list(PREPEND CMAKE_INCLUDE_PATH "${_ss_p}/include")
|
|
||||||
list(PREPEND CMAKE_LIBRARY_PATH "${_ss_p}/lib64" "${_ss_p}/lib")
|
|
||||||
|
|
||||||
# pkg_check_modules() reads PKG_CONFIG_PATH at call time.
|
|
||||||
set(_ss_pc "${_ss_p}/lib64/pkgconfig:${_ss_p}/lib/pkgconfig:${_ss_p}/share/pkgconfig")
|
|
||||||
if(GW_SOURCE_STACK_ONLY)
|
|
||||||
# PKG_CONFIG_LIBDIR replaces the default search path, so system .pc files are ignored.
|
|
||||||
set(ENV{PKG_CONFIG_LIBDIR} "${_ss_pc}")
|
|
||||||
set(ENV{PKG_CONFIG_PATH} "")
|
|
||||||
# Build tools come from the system; look them up before system paths are switched off.
|
|
||||||
find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config pkgconf)
|
|
||||||
set(CMAKE_FIND_USE_CMAKE_SYSTEM_PATH OFF)
|
|
||||||
set(CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH OFF)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH "${_ss_p}")
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
||||||
else()
|
|
||||||
if(NOT "$ENV{PKG_CONFIG_PATH}" STREQUAL "")
|
|
||||||
set(ENV{PKG_CONFIG_PATH} "${_ss_pc}:$ENV{PKG_CONFIG_PATH}")
|
|
||||||
else()
|
|
||||||
set(ENV{PKG_CONFIG_PATH} "${_ss_pc}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# protoc installed next to the libraries, unless the caller chose one.
|
|
||||||
if(NOT Protobuf_PROTOC_EXECUTABLE AND EXISTS "${_ss_p}/bin/protoc")
|
|
||||||
set(Protobuf_PROTOC_EXECUTABLE "${_ss_p}/bin/protoc" CACHE FILEPATH "protoc")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
message(STATUS "source-stack: ${_ss_p}")
|
|
||||||
unset(_ss_p)
|
|
||||||
unset(_ss_pc)
|
|
||||||
Reference in new issue
Block a user