Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build fails #72

Open
jmastr opened this issue Feb 6, 2024 · 4 comments
Open

Docker build fails #72

jmastr opened this issue Feb 6, 2024 · 4 comments
Assignees

Comments

@jmastr
Copy link

jmastr commented Feb 6, 2024

Hey, first of all thank you for the amazing software that you are providing. I was able to compile everything up to bc-sskr, so I have:

  • libbc-crypto-base.a
  • libbc-shamir.a
  • libbc-sskr.a

However when trying to build the docker image, the last step of the build stage fails with:

<git:(master)> docker build -t seedtool-cli:latest .
...
41.53 /usr/bin/ld: /seedtool-cli/deps/bc-ur/src/ur.cpp:22: undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
41.54 /usr/bin/ld: /seedtool-cli/sysroot/lib/libbc-ur.a(random-sampler.o): in function `std::__1::vector<int, std::__1::allocator<int> >::__recommend(unsigned long) const':
41.54 /usr/lib/llvm-10/bin/../include/c++/v1/vector:1027: undefined reference to `std::__1::__vector_base_common<true>::__throw_length_error() const'
41.54 /usr/bin/ld: /seedtool-cli/sysroot/lib/libbc-ur.a(random-sampler.o): in function `std::__1::vector<int, std::__1::allocator<int> >::__vallocate(unsigned long)':
41.54 /usr/lib/llvm-10/bin/../include/c++/v1/vector:993: undefined reference to `std::__1::__vector_base_common<true>::__throw_length_error() const'
41.55 clang: error: linker command failed with exit code 1 (use -v to see invocation)
41.55 make[1]: *** [<builtin>: seedtool] Error 1
41.55 make[1]: Leaving directory '/seedtool-cli/src'
41.55 make: *** [Makefile:38: check] Error 2
------
Dockerfile:18
--------------------
  16 |     WORKDIR /seedtool-cli
  17 |     RUN git submodule update --init --recursive
  18 | >>> RUN CC="clang-10" CXX="clang++-10" ./build.sh
  19 |     
  20 |     # Export built executable to a minimal runtime image and run as an unprivileged
--------------------
ERROR: failed to solve: process "/bin/sh -c CC=\"clang-10\" CXX=\"clang++-10\" ./build.sh" did not complete successfully: exit code: 2
@jmastr jmastr changed the title Docker build failed Docker build fails Feb 6, 2024
@ChristopherA
Copy link
Contributor

@nochiel Can you take a look at this? It compiles fine on my Mac, but I don't have a docker-based setup.

@jmastr
Copy link
Author

jmastr commented Feb 7, 2024

@ChristopherA I can confirm that compilation on a M1 Mac without docker works.

@nochiel
Copy link
Contributor

nochiel commented Feb 7, 2024 via email

@ferencdg
Copy link

ferencdg commented Jun 1, 2024

It still fails to compile in the docker (and in general in Ubuntu). For anyone looking for a hacky solution that uses g++ and Ubuntu: https://github.com/ferencdg/seedtool-cli

compile it with
export CC="gcc" && export CXX="g++" && export CXXFLAGS="-fPIC" && ./build.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants