bitcoinjs / tiny-secp256k1

A tiny secp256k1 native/JS wrapper
MIT License
86 stars 55 forks source link

Docker Build Failure #127

Closed landabaso closed 1 year ago

landabaso commented 1 year ago

While attempting to build the Dockerfile (Macos Intel) with docker build -t tiny-secp256k1 ., the build fails on the step to clone and install binaryen:

CMake Error at third_party/CMakeLists.txt:12 (add_library):
Cannot find source file:
googletest/googletest/src/gtest_main.cc

It appears that the Dockerfile is missing the step to initialize and update the googletest submodule. I (GhatGPT, really) could fix it by adding this line into the Dockerfile:

 # Install wasm-opt from binaryen
 RUN git clone --depth 1 --branch version_114 https://github.com/WebAssembly/binaryen.git /binaryen && \
   cd /binaryen && \
+  git submodule update --init && \
   cmake . && \
   make -j$(nproc) && \
   make install && \
junderw commented 1 year ago

Can you make a PR? Thanks!

landabaso commented 1 year ago

Yes, I'm still having issues building the project with Docker. Despite the wasm32-unknown-unknown target seemingly being handled in the Dockerfile, I'm getting a 'target not found' error when running make build. I'll work on fixing these issues and will submit a PR once it's all sorted out.