scipr-lab / libsnark

C++ library for zkSNARKs
Other
1.8k stars 570 forks source link

Docker build error by .gitmodules file #197

Closed msjyryxdzzj closed 1 year ago

msjyryxdzzj commented 1 year ago

When I built the dockerfile, I found the following error image Replace “git” to “https” in .gitmodules file to solve the problem and build successfully here is the fixed .gitmodules.

[submodule "depends/gtest"]
    path = depends/gtest
    url = https://github.com/google/googletest.git
[submodule "depends/ate-pairing"]
    path = depends/ate-pairing
    url = https://github.com/herumi/ate-pairing.git
[submodule "depends/xbyak"]
    path = depends/xbyak
    url = https://github.com/herumi/xbyak.git
[submodule "depends/libsnark-supercop"]
    path = depends/libsnark-supercop
    url = https://github.com/mbbarbosa/libsnark-supercop.git
[submodule "depends/libff"]
    path = depends/libff
    url = https://github.com/scipr-lab/libff.git
[submodule "depends/libfqfft"]
    path = depends/libfqfft
    url = https://github.com/scipr-lab/libfqfft.git

Here is a dockerfile that is temporarily available.

FROM ubuntu:16.04

WORKDIR /root

RUN apt-get update && \
    apt-get install -y \
    wget unzip curl \
    build-essential cmake git libgmp3-dev libprocps4-dev python-markdown libboost-all-dev libssl-dev pkg-config

RUN git clone https://github.com/scipr-lab/libsnark/ \
  && cd libsnark \
  && find . -name .gitmodules -type f -exec sed -i -e 's/git:\/\//https:\/\//g' {} \; \
  && git submodule init && git submodule sync && git submodule update \
  && mkdir build && cd build && cmake .. \
  && make \
  && DESTDIR=/usr/local make install \
    NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 CURVE=ALT_BN128 FEATUREFLAGS="-DBINARY_OUTPUT=1 -DMONTGOMERY_OUTPUT=1 -DNO_PT_COMPRESSION=1"

ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib
msjyryxdzzj commented 1 year ago

I found pull request