madMAx43v3r / chia-plotter

Apache License 2.0
2.28k stars 665 forks source link

Compilation problem on FreeBSD #210

Open lfarrand opened 3 years ago

lfarrand commented 3 years ago

Thanks for your hard work on building this.

I'm trying to compile on FreeBSD, but I'm getting lots of 'undefined symbol' errors, for example:

ld: error: undefined symbol: bls::G1Element::FromByteVector(std::1::vector<unsigned char, std::1::allocator > const&)

Build log:

[ 99%] Built target test_phase_2 [100%] Linking CXX executable test_phase_3 c++: warning: argument unused during compilation: '-fmax-errors=1' [-Wunused-command-line-argument] [100%] Built target test_phase_3 [100%] Linking CXX executable test_phase_1 c++: warning: argument unused during compilation: '-fmax-errors=1' [-Wunused-command-line-argument] [100%] Built target test_phase_1 [100%] Linking CXX executable chia_plot c++: warning: argument unused during compilation: '-fmax-errors=1' [-Wunused-command-line-argument] ld: error: undefined symbol: bls::G1Element::FromByteVector(std::1::vector<unsigned char, std::1::allocator > const&)

referenced by chia_plot.cpp:47 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:47) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)) referenced by chia_plot.cpp:48 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:48) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&))

ld: error: undefined symbol: bls::G1Element::Serialize() const

referenced by chia_plot.cpp:50 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:50) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)) referenced by chia_plot.cpp:51 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:51) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)) referenced by chia_plot.cpp:68 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:68) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)) referenced by chia_plot.cpp:70 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:70) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&))

ld: error: undefined symbol: randombytes_buf

referenced by chia_plot.cpp:54 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:54) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&))

ld: error: undefined symbol: bls::AugSchemeMPL::CIPHERSUITE_ID

referenced by schemes.hpp:41 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/schemes.hpp:41) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&))

ld: error: undefined symbol: vtable for bls::AugSchemeMPL

referenced by schemes.hpp:124 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/schemes.hpp:124) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)) the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

ld: error: undefined symbol: bls::CoreMPL::KeyGen(std::1::vector<unsigned char, std::1::allocator > const&)

referenced by chia_plot.cpp:57 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:57) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&))

ld: error: undefined symbol: bls::CoreMPL::DeriveChildSk(bls::PrivateKey const&, unsigned int)

referenced by chia_plot.cpp:61 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:61) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)) referenced by chia_plot.cpp:61 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:61) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)) referenced by chia_plot.cpp:61 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:61) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)) referenced by chia_plot.cpp:61 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:61) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&))

ld: error: undefined symbol: bls::operator+(bls::G1Element const&, bls::G1Element const&)

referenced by chia_plot.cpp:64 (/usr/home/chia/git/chia-plotter/src/chia_plot.cpp:64) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&))

ld: error: undefined symbol: md_map_sh256

referenced by util.hpp:56 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:56) CMakeFiles/chia_plot.dir/src/chia_plot.cpp.o:(create_plot(int, int, std::1::vector<unsigned char, std::1::allocator > const&, std::1::vector<unsigned char, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&))

ld: error: undefined symbol: ep_set_infty

referenced by elements.hpp:39 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:39) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by elements.hpp:39 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:39) privatekey.cpp.o:(bls::PrivateKey::PrivateKey()) in archive lib/bls-signatures/src/libbls.a referenced by elements.hpp:39 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:39) privatekey.cpp.o:(bls::PrivateKey::PrivateKey(bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by elements.hpp:39 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:39) privatekey.cpp.o:(bls::PrivateKey::PrivateKey(bls::PrivateKey&&)) in archive lib/bls-signatures/src/libbls.a referenced by elements.hpp:39 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:39) privatekey.cpp.o:(bls::PrivateKey::Aggregate(std::1::vector<bls::PrivateKey, std::1::allocator > const&)) in archive lib/bls-signatures/src/libbls.a

ld: error: undefined symbol: ep2_set_infty

referenced by elements.hpp:77 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:77) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by elements.hpp:77 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:77) privatekey.cpp.o:(bls::PrivateKey::PrivateKey()) in archive lib/bls-signatures/src/libbls.a referenced by elements.hpp:77 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:77) privatekey.cpp.o:(bls::PrivateKey::PrivateKey(bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by elements.hpp:77 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:77) privatekey.cpp.o:(bls::PrivateKey::PrivateKey(bls::PrivateKey&&)) in archive lib/bls-signatures/src/libbls.a referenced by elements.hpp:77 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/elements.hpp:77) privatekey.cpp.o:(bls::PrivateKey::Aggregate(std::1::vector<bls::PrivateKey, std::1::allocator > const&)) in archive lib/bls-signatures/src/libbls.a

ld: error: undefined symbol: bls::Util::secureAllocCallback

referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::PrivateKey::PrivateKey()) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::PrivateKey::AllocateKeyData()) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::PrivateKey::PrivateKey(bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::PrivateKey::GetG1Element() const) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::PrivateKey::GetG2Element() const) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::operator(bls::G1Element const&, bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::operator(bls::G2Element const&, bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::PrivateKey::GetG2Power(bls::G2Element const&) const) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:81 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:81) privatekey.cpp.o:(bls::PrivateKey::Aggregate(std::1::vector<bls::PrivateKey, std::1::allocator > const&)) in archive lib/bls-signatures/src/libbls.a referenced 1 more times

ld: error: undefined symbol: bn_init

referenced by privatekey.cpp:239 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:239) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:29 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:29) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:239 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:239) privatekey.cpp.o:(bls::PrivateKey::PrivateKey()) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:239 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:239) privatekey.cpp.o:(bls::PrivateKey::AllocateKeyData()) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:239 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:239) privatekey.cpp.o:(bls::PrivateKey::PrivateKey(bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:175 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:175) privatekey.cpp.o:(bls::PrivateKey::Aggregate(std::1::vector<bls::PrivateKey, std::1::allocator > const&)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:239 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:239) privatekey.cpp.o:(bls::PrivateKey::Aggregate(std::1::vector<bls::PrivateKey, std::1::allocator > const&)) in archive lib/bls-signatures/src/libbls.a

ld: error: undefined symbol: bn_zero

referenced by privatekey.cpp:240 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:240) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:240 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:240) privatekey.cpp.o:(bls::PrivateKey::PrivateKey()) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:240 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:240) privatekey.cpp.o:(bls::PrivateKey::AllocateKeyData()) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:240 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:240) privatekey.cpp.o:(bls::PrivateKey::PrivateKey(bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:240 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:240) privatekey.cpp.o:(bls::PrivateKey::Aggregate(std::1::vector<bls::PrivateKey, std::1::allocator > const&)) in archive lib/bls-signatures/src/libbls.a ld: error: undefined symbol: bn_read_bin referenced by privatekey.cpp:27 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:27) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a

ld: error: undefined symbol: ep_curve_get_ord

referenced by privatekey.cpp:30 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:30) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:176 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:176) privatekey.cpp.o:(bls::PrivateKey::Aggregate(std::1::vector<bls::PrivateKey, std::1::allocator > const&)) in archive lib/bls-signatures/src/libbls.a ld: error: undefined symbol: bn_mod_basic referenced by privatekey.cpp:32 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:32) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:183 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:183) privatekey.cpp.o:(bls::PrivateKey::Aggregate(std::1::vector<bls::PrivateKey, std::1::allocator > const&)) in archive lib/bls-signatures/src/libbls.a

ld: error: undefined symbol: bn_cmp

referenced by privatekey.cpp:34 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:34) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:197 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:197) privatekey.cpp.o:(bls::operator==(bls::PrivateKey const&, bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a

ld: error: undefined symbol: bls::Util::secureFreeCallback

referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::PrivateKey::FromBytes(bls::Bytes const&, bool)) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::PrivateKey::~PrivateKey()) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::PrivateKey::DeallocateKeyData()) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::PrivateKey::operator=(bls::PrivateKey&&)) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::PrivateKey::GetG1Element() const) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::PrivateKey::GetG2Element() const) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::operator(bls::G1Element const&, bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::operator(bls::G2Element const&, bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::PrivateKey::GetG2Power(bls::G2Element const&) const) in archive lib/bls-signatures/src/libbls.a referenced by util.hpp:88 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/util.hpp:88) privatekey.cpp.o:(bls::PrivateKey::Aggregate(std::1::vector<bls::PrivateKey, std::1::allocator > const&)) in archive lib/bls-signatures/src/libbls.a referenced 1 more times

ld: error: undefined symbol: bn_copy

referenced by privatekey.cpp:57 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:57) privatekey.cpp.o:(bls::PrivateKey::PrivateKey(bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a referenced by privatekey.cpp:90 (/usr/home/chia/git/chia-plotter/lib/bls-signatures/src/privatekey.cpp:90) privatekey.cpp.o:(bls::PrivateKey::operator=(bls::PrivateKey const&)) in archive lib/bls-signatures/src/libbls.a

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors) c++: error: linker command failed with exit code 1 (use -v to see invocation) --- chia_plot --- *** [chia_plot] Error code 1

make[2]: stopped in /usr/home/chia/git/chia-plotter/build 1 error

make[2]: stopped in /usr/home/chia/git/chia-plotter/build --- CMakeFiles/chia_plot.dir/all --- *** [CMakeFiles/chia_plot.dir/all] Error code 2

make[1]: stopped in /usr/home/chia/git/chia-plotter/build 1 error

make[1]: stopped in /usr/home/chia/git/chia-plotter/build *** [all] Error code 2

make: stopped in /usr/home/chia/git/chia-plotter/build 1 error

lfarrand commented 3 years ago

I think I've fixed it. I went into chia-plotter/lib/bls-signatures and created a build dir, then went into that and ran:

cmake ../ cmake --build . -- -j 6

This then built successfully, and when I went back into chia-plotter/build and ran:

cmake ../ cmake --build . -- -j 6

It then built successfully.

I was then able to run the chia_plot executable.

Performance does appear to be a lot lower than on Ubuntu.

i7 4790K: [P1] Table 1 took 30.1892 sec

i7 7700K [P1] Table 1 took 113.421 sec

seanvetter commented 3 years ago

@lfarrand do you mind sharing the dependencies you installed and the freebsd version?

cross commented 2 years ago

I recently (Sept 5-7 2021) worked to get this built on FreeBSD 13 x86_64. The first issue: c++: warning: argument unused during compilation: '-fmax-errors=1' [-Wunused-command-line-argument]

Is due to using clang instead of gcc. I'm surprised this hits, since MacOS also uses clang. But it's a simple fix. The clang version of this argument (replaced in make_*.sh) is -ferror-limit=1

I had a couple other problems after this, and was looking for an existing issue and found this. Let me know if I should work here, or in a new issue.

perrin4869 commented 1 year ago

@cross thanks, got this compiled with that change on VERSION=12.3-RELEASE-p4! @seanvetter I'm sure this isn't relevant anymore, but I did install pkg install libsodium

perrin4869 commented 1 year ago

For future reference, I just finished building in VERSION=13.1-RELEASE-p5, this required further modifications, this time inside libbech32:

[root@chia ~/chia-plotter/lib/libbech32]# git diff
diff --git a/test/googletest/googletest/cmake/internal_utils.cmake b/test/googletest/googletest/cmake/internal_utils.cmake
index 2f70f0b..36cbecb 100644
--- a/test/googletest/googletest/cmake/internal_utils.cmake
+++ b/test/googletest/googletest/cmake/internal_utils.cmake
@@ -82,13 +82,13 @@ macro(config_compiler_and_linker)
     # http://stackoverflow.com/questions/3232669 explains the issue.
     set(cxx_base_flags "${cxx_base_flags} -wd4702")
   elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    set(cxx_base_flags "-Wall -Wshadow -Werror -Wconversion")
+    set(cxx_base_flags "-Wall -Wshadow -Wconversion")
     set(cxx_exception_flags "-fexceptions")
     set(cxx_no_exception_flags "-fno-exceptions")
     set(cxx_strict_flags "-W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wredundant-decls")
     set(cxx_no_rtti_flags "-fno-rtti")
   elseif (CMAKE_COMPILER_IS_GNUCXX)
-    set(cxx_base_flags "-Wall -Wshadow -Werror")
+    set(cxx_base_flags "-Wall -Wshadow")
     if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
       set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else")
     endif()

Ref: https://github.com/google/googletest/issues/3427