To get some tests for the weierstrass_g1_gadget working, I had to fix these issues
Line 45 and 46 of the original weierstrass_g1_gadget.tcc has been changed to X.assign(pb, Pcopy.X); Y.assign(pb, Pcopy.Y);
The field FieldT is changed to reflect libff::Fq instead of libff::Fr. The group G1 is defined on the curve Y^2 = X^3 + 3 over the field Fq with p = 21888242871839275222246405745257275088696311157297823662689037894645226208583
To get some tests for the weierstrass_g1_gadget working, I had to fix these issues