summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD75
-rw-r--r--fix-build-for-boost-1.76.patch32
-rw-r--r--fix-build-for-gcc11.patch24
4 files changed, 129 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5c98dda4792a..39112d46f363 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = nanocurrency
pkgdesc = Nano (formerly RaiBlocks) is a cryptocurrency designed from the ground up for scalable instant transactions and zero transaction fees.
- pkgver = 22.0
+ pkgver = 22.1
pkgrel = 1
url = https://nano.org/
install = install
@@ -20,14 +20,28 @@ pkgbase = nanocurrency
source = nanowallet.desktop
source = nanowallet128.png
source = nano-node.service
- source = git+https://github.com/nanocurrency/nano-node.git#tag=V22.0
+ source = fix-build-for-gcc11.patch
+ source = fix-build-for-boost-1.76.patch
+ source = git+https://github.com/nanocurrency/nano-node.git#tag=V22.1
source = git+https://github.com/weidai11/cryptopp.git
- source = git+https://github.com/nanocurrency/lmdb.git#branch=lmdb_0_9_21
+ source = git+https://github.com/nanocurrency/lmdb.git#branch=lmdb_0_9_25
source = git+https://github.com/miniupnp/miniupnp.git
- source = git+https://github.com/clemahieu/phc-winner-argon2.git
+ source = git+https://github.com/nanocurrency/phc-winner-argon2.git
+ source = git+https://github.com/google/flatbuffers.git
+ source = git+https://github.com/nanocurrency/rocksdb.git
+ source = git+https://github.com/cryptocode/cpptoml.git
+ source = git+https://github.com/google/googletest.git
+ source = git+https://github.com/nanocurrency/nano-pow-server.git
sha256sums = 6b824bfd5a9f2c1cd8d6a30f858a7bdc7813a448f4894a151da035dac5af2f91
sha256sums = 27179351dbc3e000d54b5b13f0c2326b4c4bd06e93b1d0b2ea1849609aeadc2e
sha256sums = c219c91db98f33097e7d96ef0f0c95e4b9d6226ac2ab90e30be7f955c43bfa35
+ sha256sums = fff6e6ab537c33e522a6c91d1d917c8298c3c2a92e291b343663793bcf60336f
+ sha256sums = 98ec1f48ecdcf5c6270ead3f50eae427b33a68eebcdf2c7432d91fabd12f1b81
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
@@ -35,4 +49,3 @@ pkgbase = nanocurrency
sha256sums = SKIP
pkgname = nanocurrency
-
diff --git a/PKGBUILD b/PKGBUILD
index cfad83e4c331..8335a0f9285a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
pkgname=nanocurrency
-pkgver=22.0
+pkgver=22.1
_tag="V$pkgver"
pkgrel=1
pkgdesc="Nano (formerly RaiBlocks) is a cryptocurrency designed from the ground up for scalable instant transactions and zero transaction fees."
@@ -15,33 +15,70 @@ install=install
source=(nanowallet.desktop
nanowallet128.png
nano-node.service
+ fix-build-for-gcc11.patch
+ fix-build-for-boost-1.76.patch
"git+https://github.com/nanocurrency/nano-node.git#tag=${_tag}"
git+https://github.com/weidai11/cryptopp.git
- "git+https://github.com/nanocurrency/lmdb.git#branch=lmdb_0_9_21"
+ "git+https://github.com/nanocurrency/lmdb.git#branch=lmdb_0_9_25"
git+https://github.com/miniupnp/miniupnp.git
- git+https://github.com/clemahieu/phc-winner-argon2.git)
+ git+https://github.com/nanocurrency/phc-winner-argon2.git
+ git+https://github.com/google/flatbuffers.git
+ git+https://github.com/nanocurrency/rocksdb.git
+ git+https://github.com/cryptocode/cpptoml.git
+ git+https://github.com/google/googletest.git
+ git+https://github.com/nanocurrency/nano-pow-server.git
+ )
sha256sums=('6b824bfd5a9f2c1cd8d6a30f858a7bdc7813a448f4894a151da035dac5af2f91'
'27179351dbc3e000d54b5b13f0c2326b4c4bd06e93b1d0b2ea1849609aeadc2e'
'c219c91db98f33097e7d96ef0f0c95e4b9d6226ac2ab90e30be7f955c43bfa35'
+ 'fff6e6ab537c33e522a6c91d1d917c8298c3c2a92e291b343663793bcf60336f'
+ '98ec1f48ecdcf5c6270ead3f50eae427b33a68eebcdf2c7432d91fabd12f1b81'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')
+_submodule_init() {
+ submodule_name=$1
+ submodule_path=$2
+ if [[ -z "$submodule_path" ]]; then
+ submodule_path=$1
+ fi
+
+ git config --file=.gitmodules "submodule.${submodule_name}.url" "$srcdir/${submodule_path}"
+ #git submodule init "${submodule_name}"
+ #git submodule update "${submodule_name}"
+}
+
prepare() {
cd "$srcdir/nano-node"
+ _submodule_init crypto/cryptopp cryptopp
+ _submodule_init lmdb
+ _submodule_init miniupnp
+ _submodule_init crypto/phc-winner-argon2 phc-winner-argon2
+ _submodule_init flatbuffers
+ _submodule_init rocksdb
+ _submodule_init cpptoml
+ _submodule_init googletest
+ _submodule_init nano-pow-server
+
git submodule init
+ git submodule update --recursive
- git config submodule.cryptopp.url $srcdir/cryptopp
- git config submodule.lmdb.url $srcdir/lmdb
- git config submodule.miniupnp.url $srcdir/miniupnp
- git config submodule.phc-winner-argon2.url $srcdir/phc-winner-argon2
-
- git submodule update --init --recursive
+ patch --forward -p1 -i $srcdir/fix-build-for-gcc11.patch
+ patch --forward -p1 -i $srcdir/fix-build-for-boost-1.76.patch
+}
+build() {
+ cd "${srcdir}/nano-node"
# remove /bin from $PATH so that boost can be built
# see https://bugs.archlinux.org/task/64132
tmp_path=:$PATH:
@@ -51,30 +88,28 @@ prepare() {
tmp_path=${tmp_path#:}
PATH=$tmp_path
- _flags=( "-D RAIBLOCKS_GUI=ON" )
+ _flags="-DNANO_GUI=ON -DFAIL_ON_WARNINGS=OFF"
if grep -q avx2 /proc/cpuinfo; then
echo "using AVX2 optimizations"
- _flags+=( "-D ENABLE_AVX2=ON" "-D PERMUTE_WITH_GATHER=ON" "-D PERMUTE_WITH_SHUFFLES=ON" )
+ _flags="${_flags} -DENABLE_AVX2=ON -DPERMUTE_WITH_GATHER=ON -DPERMUTE_WITH_SHUFFLES=ON"
else
echo "excluding unsupported AVX2 optimizations"
fi
if grep -q sse4 /proc/cpuinfo; then
echo "build with SIMD optimizations"
- _flags+=( "-D RAIBLOCKS_SIMD_OPTIMIZATIONS=ON" )
+ _flags="${_flags} -DNANO_SIMD_OPTIMIZATIONS=ON"
else
echo "excluding unsupported SIMD optimizations"
- _flags+=( "-D RAIBLOCKS_SIMD_OPTIMIZATIONS=OFF" )
+ _flag+="${_flags} -DNANO_SIMD_OPTIMIZATIONS=OFF"
fi
-
+ _cores=$(grep processor /proc/cpuinfo | wc -l)
+ #_cores=1
PATH=$PATH cmake $_flags ./
-}
-
-build() {
- cd "$srcdir/nano-node"
- make nano_wallet
- make nano_node
+ echo make VERBOSE=1 -j${_cores} nano_wallet
+ make VERBOSE=1 -j${_cores} nano_wallet
+ make VERBOSE=1 -j${_cores} nano_node
}
package() {
diff --git a/fix-build-for-boost-1.76.patch b/fix-build-for-boost-1.76.patch
new file mode 100644
index 000000000000..410993d26bc3
--- /dev/null
+++ b/fix-build-for-boost-1.76.patch
@@ -0,0 +1,32 @@
+From cb8abd16b5e65f5b6410d146e38949823118867a Mon Sep 17 00:00:00 2001
+From: Leo P <junk@slact.net>
+Date: Mon, 30 Aug 2021 22:04:06 -0400
+Subject: [PATCH] fix failing build with boost >= 1.76
+
+---
+ nano/node/common.hpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/nano/node/common.hpp b/nano/node/common.hpp
+index 4672b778..d7e77e4f 100644
+--- a/nano/node/common.hpp
++++ b/nano/node/common.hpp
+@@ -112,6 +112,7 @@ struct hash<::nano::tcp_endpoint>
+ return ehash (endpoint_a);
+ }
+ };
++#ifndef BOOST_ASIO_HAS_STD_HASH
+ template <>
+ struct hash<boost::asio::ip::address>
+ {
+@@ -121,6 +122,7 @@ struct hash<boost::asio::ip::address>
+ return ihash (ip_a);
+ }
+ };
++#endif
+ }
+ namespace boost
+ {
+--
+2.33.0
+
diff --git a/fix-build-for-gcc11.patch b/fix-build-for-gcc11.patch
new file mode 100644
index 000000000000..fac738160a5c
--- /dev/null
+++ b/fix-build-for-gcc11.patch
@@ -0,0 +1,24 @@
+From 1b2bbf7b5f2ff585796a8a9644d04fe7beb5777a Mon Sep 17 00:00:00 2001
+From: Leo P <junk@slact.net>
+Date: Mon, 30 Aug 2021 21:56:30 -0400
+Subject: [PATCH] fix failure to build with GCC11
+
+---
+ nano/lib/threading.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/nano/lib/threading.hpp b/nano/lib/threading.hpp
+index f6ab4e18..5f09666f 100644
+--- a/nano/lib/threading.hpp
++++ b/nano/lib/threading.hpp
+@@ -5,6 +5,7 @@
+ #include <nano/lib/utility.hpp>
+
+ #include <boost/thread/thread.hpp>
++#include <thread>
+
+ namespace nano
+ {
+--
+2.33.0
+