Open lfarrand opened 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
@lfarrand do you mind sharing the dependencies you installed and the freebsd version?
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.
@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
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()
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&)
ld: error: undefined symbol: bls::G1Element::Serialize() const
ld: error: undefined symbol: randombytes_buf
ld: error: undefined symbol: bls::AugSchemeMPL::CIPHERSUITE_ID
ld: error: undefined symbol: vtable for bls::AugSchemeMPL
ld: error: undefined symbol: bls::CoreMPL::KeyGen(std::1::vector<unsigned char, std::1::allocator > const&)
ld: error: undefined symbol: bls::CoreMPL::DeriveChildSk(bls::PrivateKey const&, unsigned int)
ld: error: undefined symbol: bls::operator+(bls::G1Element const&, bls::G1Element const&)
ld: error: undefined symbol: md_map_sh256
ld: error: undefined symbol: ep_set_infty
ld: error: undefined symbol: ep2_set_infty
ld: error: undefined symbol: bls::Util::secureAllocCallback
ld: error: undefined symbol: bn_init
ld: error: undefined symbol: bn_zero
ld: error: undefined symbol: ep_curve_get_ord
ld: error: undefined symbol: bn_cmp
ld: error: undefined symbol: bls::Util::secureFreeCallback
ld: error: undefined symbol: bn_copy
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