Skip to content

Commit

Permalink
image build: use cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
pinheadmz committed Dec 9, 2024
1 parent 6290072 commit b199bd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
18 changes: 9 additions & 9 deletions resources/images/bitcoin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ARG BUILD_ARGS
RUN --mount=type=cache,target=/var/cache/apk \
sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories \
&& apk --no-cache add \
autoconf \
automake \
cmake \
python3 \
boost-dev \
build-base \
chrpath \
Expand Down Expand Up @@ -40,14 +40,14 @@ RUN set -ex \
&& git apply /tmp/isroutable.patch \
&& git apply /tmp/addrman.patch \
&& sed -i s:sys/fcntl.h:fcntl.h: src/compat/compat.h \
&& ./autogen.sh \
&& ./configure \
LDFLAGS=-L`ls -d /opt/db*`/lib/ \
CPPFLAGS="-g0 -I`ls -d /opt/db*`/include/ --param ggc-min-expand=1 --param ggc-min-heapsize=32768" \
--prefix=${BITCOIN_PREFIX} \
&& cmake -B build \
-DAPPEND_CPPFLAGS="-g0 -I`ls -d /opt/db*`/include/ --param ggc-min-expand=1 --param ggc-min-heapsize=32768" \
-DAPPEND_LDFLAGS=-L`ls -d /opt/db*`/lib/ \
-DCMAKE_INSTALL_PREFIX=${BITCOIN_PREFIX} \
${BUILD_ARGS} \
&& make -j$(nproc) \
&& make install \
&& cmake --build build -j$(nproc) \
&& cmake --install build \

&& strip ${BITCOIN_PREFIX}/bin/bitcoin-cli \
&& strip ${BITCOIN_PREFIX}/bin/bitcoind \
&& rm -f ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a \
Expand Down
5 changes: 1 addition & 4 deletions src/warnet/image_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ def build_image(
arches: str,
action: str,
):
if not build_args:
build_args = '"--disable-tests --without-gui --disable-bench --disable-fuzz-binary --enable-suppress-external-warnings --disable-dependency-tracking "'
else:
build_args = f'"{build_args}"'
build_args = '"-DWITH_ZMQ=ON "' if not build_args else f'"{build_args}"'

build_arches = []
if not arches:
Expand Down

0 comments on commit b199bd2

Please sign in to comment.