diff --git a/Dockerfile.source b/Dockerfile.source index 63f135c..3606f5e 100644 --- a/Dockerfile.source +++ b/Dockerfile.source @@ -4,7 +4,7 @@ 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 \ + libgmp-dev libflint-dev \ && rm -rf /var/lib/apt/lists/* COPY docker/rustup-init.sh /opt/rustup-init.sh diff --git a/client/build.sh b/client/build.sh index 1476a37..0019144 100755 --- a/client/build.sh +++ b/client/build.sh @@ -19,14 +19,14 @@ case "$os_type" in # Check if the architecture is ARM if [[ "$(uname -m)" == "arm64" ]]; then # MacOS ld doesn't support -Bstatic and -Bdynamic, so it's important that there is only a static version of the library - go build -ldflags "-linkmode 'external' -extldflags '-L$BINARIES_DIR -lvdf -lbls48581 -ldl -lm'" "$@" + go build -ldflags "-linkmode 'external' -extldflags '-L$BINARIES_DIR -L/opt/homebrew/Cellar/mpfr/4.2.1/lib -I/opt/homebrew/Cellar/mpfr/4.2.1/include -L/opt/homebrew/Cellar/gmp/6.3.0/lib -I/opt/homebrew/Cellar/gmp/6.3.0/include -L/opt/homebrew/Cellar/flint/3.1.3-p1/lib -I/opt/homebrew/Cellar/flint/3.1.3-p1/include -lbls48581 -lstdc++ -lvdf -ldl -lm -lflint -lgmp -lmpfr'" "$@" else echo "Unsupported platform" exit 1 fi ;; "Linux") - go build -ldflags "-linkmode 'external' -extldflags '-L$BINARIES_DIR -Wl,-Bstatic -lvdf -lbls48581 -Wl,-Bdynamic -ldl -lm'" "$@" + go build -ldflags "-linkmode 'external' -extldflags '-L$BINARIES_DIR -Wl,-Bstatic -lvdf -lbls48581 -Wl,-Bdynamic -lstdc++ -ldl -lm -lflint -lgmp -lmpfr'" "$@" ;; *) echo "Unsupported platform"