Browse Source

Patch libsnark to build with my compiler. Upstream PR #35.

pull/145/head
Taylor Hornby 8 years ago
parent
commit
e334392fab
  1. 5
      depends/packages/libsnark.mk
  2. 31
      depends/patches/libsnark/2_include_iota_header.patch

5
depends/packages/libsnark.mk

@ -7,10 +7,11 @@ $(package)_sha256_hash=b5ec84a836d0d305407d5f39c8176bae2bb448abe802a8d11ba0f88f1
$(package)_git_commit=69f312f149cc4bd8def8e2fed26a7941ff41251d
$(package)_dependencies=libgmp
$(package)_patches=1_fix_Wl_flag.patch
$(package)_patches=1_fix_Wl_flag.patch 2_include_iota_header.patch
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/1_fix_Wl_flag.patch
patch -p1 < $($(package)_patch_dir)/1_fix_Wl_flag.patch && \
patch -p1 < $($(package)_patch_dir)/2_include_iota_header.patch
endef
define $(package)_build_cmds

31
depends/patches/libsnark/2_include_iota_header.patch

@ -0,0 +1,31 @@
commit c437365ec98ec77754287594d2d3748901d0d176
Author: Taylor Hornby <taylor@defuse.ca>
Date: Wed May 18 10:49:58 2016 -0600
Include header required for std::iota.
diff --git a/src/common/data_structures/integer_permutation.cpp b/src/common/data_structures/integer_permutation.cpp
index f9f9327..378ea7e 100644
--- a/src/common/data_structures/integer_permutation.cpp
+++ b/src/common/data_structures/integer_permutation.cpp
@@ -15,6 +15,7 @@
#include <algorithm>
#include <cassert>
+#include <numeric>
#include <unordered_set>
namespace libsnark {
diff --git a/src/common/data_structures/sparse_vector.tcc b/src/common/data_structures/sparse_vector.tcc
index 26429a5..cfc5d75 100644
--- a/src/common/data_structures/sparse_vector.tcc
+++ b/src/common/data_structures/sparse_vector.tcc
@@ -16,6 +16,8 @@
#include "algebra/scalar_multiplication/multiexp.hpp"
+#include <numeric>
+
namespace libsnark {
template<typename T>
Loading…
Cancel
Save