mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 10:27:26 +08:00
static builds working
This commit is contained in:
parent
5249107e63
commit
d3f6b471c2
@ -4,8 +4,23 @@ ENV PATH="${PATH}:/root/.cargo/bin/"
|
||||
|
||||
# Install GMP 6.2 (6.3 which MacOS is using only available on Debian unstable)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libgmp-dev libflint-dev g++ \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
build-essential \
|
||||
curl \
|
||||
git \
|
||||
cmake \
|
||||
libgmp-dev \
|
||||
libmpfr-dev \
|
||||
libmpfr6 \
|
||||
wget \
|
||||
m4 \
|
||||
pkg-config \
|
||||
gcc \
|
||||
g++ \
|
||||
make \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt update && apt install -y wget && \
|
||||
ARCH=$(dpkg --print-architecture) && \
|
||||
@ -21,6 +36,22 @@ RUN apt update && apt install -y wget && \
|
||||
|
||||
ENV PATH=$PATH:/usr/local/go/bin
|
||||
|
||||
RUN git clone https://github.com/flintlib/flint.git && \
|
||||
cd flint && \
|
||||
git checkout flint-3.0 && \
|
||||
./bootstrap.sh && \
|
||||
./configure \
|
||||
--prefix=/usr/local \
|
||||
--with-gmp=/usr/local \
|
||||
--with-mpfr=/usr/local \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
CFLAGS="-O3" && \
|
||||
make && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -rf flint
|
||||
|
||||
COPY docker/rustup-init.sh /opt/rustup-init.sh
|
||||
|
||||
RUN /opt/rustup-init.sh -y --profile minimal
|
||||
@ -90,7 +121,6 @@ LABEL org.opencontainers.image.revision=$GIT_COMMIT
|
||||
RUN apt-get update && apt-get install -y ca-certificates
|
||||
|
||||
COPY --from=build /usr/bin/node /usr/local/bin
|
||||
COPY --from=build /usr/local/go/bin/grpcurl /usr/local/bin
|
||||
COPY --from=build /opt/ceremonyclient/client/qclient /usr/local/bin
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
@ -60,6 +60,11 @@ tasks:
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.source --output node/build/amd64_linux --target=node .
|
||||
|
||||
build_node_amd64_avx512_linux:
|
||||
desc: Build the Quilibrium node binary for AMD64 Linux with AVX-512 extensions. Outputs to node/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.sourceavx512 --output node/build/amd64_avx512_linux --target=node .
|
||||
|
||||
build_qclient_amd64_linux:
|
||||
desc: Build the QClient node binary for AMD64 Linux. Outputs to node/build.
|
||||
cmds:
|
||||
|
||||
@ -26,7 +26,8 @@ case "$os_type" in
|
||||
fi
|
||||
;;
|
||||
"Linux")
|
||||
go build -ldflags "-linkmode 'external' -extldflags '-L$BINARIES_DIR -Wl,-Bstatic -lvdf -lbls48581 -Wl,-Bdynamic -lstdc++ -ldl -lm -lflint -lgmp -lmpfr'" "$@"
|
||||
export CGO_LDFLAGS="-L/usr/local/lib -lflint -lgmp -lmpfr -ldl -lm -L$BINARIES_DIR -lvdf -lbls48581 -static"
|
||||
go build -ldflags "-linkmode 'external'" "$@"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported platform"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user