fix: 使用 Monero 的 release-static 目标构建 Ubuntu 版本
Some checks failed
Build and Release Mond / build-and-test (arm64, alpine) (push) Successful in 25s
Build and Release Mond / build-and-test (amd64, alpine) (push) Successful in 38s
Build and Release Mond / build-and-test (amd64, ubuntu) (push) Failing after 1m50s
Build and Release Mond / release (push) Has been cancelled
Build and Release Mond / build-and-test (arm64, ubuntu) (push) Has been cancelled
Some checks failed
Build and Release Mond / build-and-test (arm64, alpine) (push) Successful in 25s
Build and Release Mond / build-and-test (amd64, alpine) (push) Successful in 38s
Build and Release Mond / build-and-test (amd64, ubuntu) (push) Failing after 1m50s
Build and Release Mond / release (push) Has been cancelled
Build and Release Mond / build-and-test (arm64, ubuntu) (push) Has been cancelled
- 移除手动添加的静态库依赖(libevent-dev, nettle-dev, libgmp-dev) - 改用 make release-static 目标,它会自动处理所有依赖 - 简化构建流程,避免手动管理静态链接依赖 Monero 的 release-static 目标使用 contrib/depends 系统 自动下载并编译所有必需库的静态版本,解决 libunbound 依赖问题 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -29,9 +29,6 @@ RUN apt-get update && apt-get install -y \
|
|||||||
protobuf-compiler \
|
protobuf-compiler \
|
||||||
libudev-dev \
|
libudev-dev \
|
||||||
libgtest-dev \
|
libgtest-dev \
|
||||||
libevent-dev \
|
|
||||||
nettle-dev \
|
|
||||||
libgmp-dev \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
FROM base AS build
|
FROM base AS build
|
||||||
@@ -54,16 +51,14 @@ COPY ./init.sh ./init.sh
|
|||||||
|
|
||||||
RUN chmod +x ./init.sh && ./init.sh
|
RUN chmod +x ./init.sh && ./init.sh
|
||||||
|
|
||||||
# 构建 Monero (mond)
|
# 构建 Monero (mond) 使用 release-static 目标
|
||||||
RUN if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
|
RUN if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
|
||||||
MAKE_JOBS="-j2"; \
|
MAKE_JOBS=2; \
|
||||||
else \
|
else \
|
||||||
MAKE_JOBS="-j$(nproc)"; \
|
MAKE_JOBS=$(nproc); \
|
||||||
fi && \
|
fi && \
|
||||||
echo "Building with parallel jobs: $MAKE_JOBS" && \
|
echo "Building with parallel jobs: $MAKE_JOBS" && \
|
||||||
mkdir -p build/release && cd build/release && \
|
make -j$MAKE_JOBS release-static
|
||||||
cmake ../.. -DCMAKE_BUILD_TYPE=Release -DBUILD_GUI_DEPS=OFF -DARCH=default -DSTATIC=ON && \
|
|
||||||
make $MAKE_JOBS daemon
|
|
||||||
|
|
||||||
# 最终阶段 - 只复制二进制文件
|
# 最终阶段 - 只复制二进制文件
|
||||||
FROM scratch
|
FROM scratch
|
||||||
|
|||||||
Reference in New Issue
Block a user