master build fails
Closed this issue · 3 comments
After pulling from master, zcutil/build.sh -j2 fails with following:
libzcash.a(libzcash_a-JoinSplit.o): In function libsnark::multipacking_gadget<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >::multipacking_gadget(libsnark::protoboard<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >&, libsnark::pb_linear_combination_array<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, libsnark::pb_linear_combination_array<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /home/phobos/komodo/src/./snark/libsnark/gadgetlib1/gadgets/basic_gadgets.tcc:69: undefined reference to
libsnark::div_ceil(long, long)'
libzcash.a(libzcash_a-JoinSplit.o): In function libsnark::bit_vector_copy_gadget<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >::bit_vector_copy_gadget(libsnark::protoboard<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >&, libsnark::pb_variable_array<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, libsnark::pb_variable_array<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, libsnark::pb_linear_combination<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /home/phobos/komodo/src/./snark/libsnark/gadgetlib1/gadgets/basic_gadgets.tcc:157: undefined reference to
libsnark::div_ceil(long, long)'
libzcash.a(libzcash_a-JoinSplit.o): In function libzcash::joinsplit_gadget<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r>, 2ul, 2ul>::verifying_field_element_size()': /home/phobos/komodo/src/./zcash/circuit/gadget.tcc:331: undefined reference to
libsnark::div_ceil(long, long)'
/home/phobos/komodo/src/./zcash/circuit/gadget.tcc:331: undefined reference to libsnark::div_ceil(long, long)' libzcash.a(libzcash_a-JoinSplit.o): In function
std::vector<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r>, std::allocator<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > > libsnark::pack_bit_vector_into_field_element_vector<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >(std::vector<bool, std::allocator > const&, unsigned long)':
/home/phobos/komodo/src/./snark/libsnark/algebra/fields/field_utils.tcc:70: undefined reference to libsnark::div_ceil(long, long)' libzcash.a(libzcash_a-JoinSplit.o):/home/phobos/komodo/src/./zcash/circuit/gadget.tcc:331: more undefined references to
libsnark::div_ceil(long, long)' follow
collect2: error: ld returned 1 exit status
Makefile:1931: recipe for target 'komodod' failed
make[2]: *** [komodod] Error 1
make[2]: Leaving directory '/home/phobos/komodo/src'
Makefile:4043: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/phobos/komodo/src'
Makefile:658: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
from ~/komodo
make clean
zcutil/build.sh
I cloned repo to new directory and it works, it failed after fast-forward update from some older version of dev branch.
when switching branches, often the first time you need to do:
(from ~/komodo)
make clean
zcutil/build.sh -j8
after the first time, usually just a make from ~/komodo/src does the job, but if ever any build issues just do the full make clean and build.sh