Package Details: zerotier-one 1.2.4-1

Git Clone URL: (read-only)
Package Base: zerotier-one
Description: Creates virtual Ethernet networks of almost unlimited size.
Upstream URL:
Licenses: GPL3
Submitter: strugee
Maintainer: eXeC64
Last Packager: eXeC64
Votes: 22
Popularity: 2.852561
First Submitted: 2014-03-30 08:14
Last Updated: 2017-04-26 21:07

Latest Comments

pqatsi commented on 2017-11-08 09:49

Registered in upstream:

EDIT 10/Nov/2017: Bug fixed in upstream GIT!

pqatsi commented on 2017-11-03 14:55

EDIT: I've commited in a fork of this git in - Feel free if you want to push to AUR.


The support for native miniupnpc suffer same issue I faced when tried to build it in Alpine: (Ref.: - leleobhz is my user in github)

[root@haslam ~]# grep '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h
[root@haslam ~]# grep '.*define.*MINIUPNPC_VERSION.*"2..*"' /usr/include/miniupnpc/miniupnpc.h
#define MINIUPNPC_VERSION "2.0.20170509"

***** Before the patch:

[root@haslam ~]# ldd /usr/bin/zerotier-one (0x0000ffffb5e0f000) => /usr/lib/ (0x0000ffffb5b01000) => /usr/lib/ (0x0000ffffb5add000) => /usr/lib/ (0x0000ffffb5ab0000) => /usr/lib/ (0x0000ffffb594c000)
/lib/ => /usr/lib/ (0x0000ffffb5de3000) => /usr/lib/ (0x0000ffffb5894000)
[root@haslam ~]# ps aux | grep zerotier-one
root 335 0.2 1.1 212912 10764 ? Ssl 12:59 0:00 /usr/sbin/zerotier-one
root 2201 0.0 0.0 2612 568 pts/0 S+ 13:05 0:00 grep zerotier-one
[root@haslam ~]#


==> Starting build()...
clang++ -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -Wall -Wno-unused-result -Wreorder -fPIE -std=c++
o controller/EmbeddedNetworkController.o controller/EmbeddedNetworkController.cpp

**** After the patch:

clang++ -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -Wall -Wno-unused-result -Wreorder -fPIE -std=c++11 -pthread -DNDEBUG -D_FORTIFY_SOURCE=2 -DZT_USE_MINIUPNPC -DZT_USE_SYSTEM_MINIUPNPC -DZT_USE_SYSTEM_NATPMP -DZT_NO_TYPE_PUNNING -DZT_BUILD_PLATFORM=1 -DZT_BUILD_ARCHITECTURE=4 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\"" -D_FORTIFY_SOURCE=2 -c -o controller/EmbeddedNetworkController.o controller/EmbeddedNetworkController.cpp

[root@haslam ~]# ldd /usr/bin/zerotier-one (0x0000ffff9dadb000) => /usr/lib/ (0x0000ffff9d96a000) => /usr/lib/ (0x0000ffff9d958000) => /usr/lib/ (0x0000ffff9d7a6000) => /usr/lib/ (0x0000ffff9d782000) => /usr/lib/ (0x0000ffff9d755000) => /usr/lib/ (0x0000ffff9d5f1000)
/lib/ => /usr/lib/ (0x0000ffff9daaf000) => /usr/lib/ (0x0000ffff9d539000)

[root@haslam ~]# ps aux | grep zerotier-one
root 6449 0.8 1.1 213072 10444 ? Ssl 14:51 0:00 /usr/sbin/zerotier-one
root 6468 0.0 0.0 2612 548 pts/0 S+ 14:52 0:00 grep zerotier-one
[root@haslam ~]#

**** Diff:

diff --git a/PKGBUILD b/PKGBUILD
index eb7274a..0c5ec3d 100644
@@ -4,17 +4,18 @@ pkgname=zerotier-one
pkgdesc="Creates virtual Ethernet networks of almost unlimited size."
-arch=('i686' 'x86_64' 'armv7h')
+arch=('i686' 'x86_64' 'armv7h' 'aarch64')
-depends=("gcc-libs" "http-parser")
+depends=("gcc-libs" "miniupnpc" "libnatpmp" "http-parser")
+makedepends=("ruby-ronn" "clang" "miniupnpc" "libnatpmp")

build() {
cd "$srcdir/ZeroTierOne-$pkgver"
+ patch -p1 < $startdir/miniupnpc-system.patch

***** Patch:

[leonardo@haslam zerotier-one]$ cat miniupnpc-system.patch
--- ZeroTierOne-1.2.4-orig/
+++ ZeroTierOne-1.2.4/
@@ -22,7 +22,7 @@
# otherwise build into binary as done on Mac and Windows.
-MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
+MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' /usr/include/miniupnpc/miniupnpc.h && echo 1)

pqatsi commented on 2017-11-03 11:34

" miniupnpc and libnatpmp aren't dependencies to my knowledge. ZeroTier is fully functional for me without having ever installed either of those."

The build system compiles a static version if the system library/headers do not match. I think if the arch mainstream base does Zerotier build system happy, it should be used.

Ill test here in my Raspberry Pi 3 in aarch64.

pqatsi commented on 2017-11-01 19:49


I did not installed base-devel group, just these packages I cited in my diff.

About clang, the zerotier developer prefers clang for a performance and compliance and just a pacman -Sy clang installed everything needed, so I think worth depend of clang. Also, as in of zerotier project:

"Linux makefiles automatically detect and prefer clang/clang++ if present as it produces smaller and slightly faster binaries in most cases. You can override by supplying CC and CXX variables on the make command line."

So I think - specially considering aarch64 platform - a good idea the clang adoption.

In production cases, a iperf with 4 process passing over a zerotier network bring me almost 70mbps with near 40% of mean of cpu loads. So any optimization I think its wellcome.

eXeC64 commented on 2017-11-01 19:00

fakeroot & make are provided by the base-devel group, which are a global dependency of AUR, so don't need to be specified. clang isn't provided by base-devel, but the zerotier build automatically falls back to gcc if clang isn't installed.

Does this build on aarch for you without clang installed? If so, I can just add the 'aarch' architecture directly. If not, I can specify makedepends_aarch64.

pqatsi commented on 2017-10-30 19:56

Sucessfully compiled in aarch64 - Raspberry PI 3 with following diff:

[leonardo@haslam zerotier-one]$ git diff
diff --git a/PKGBUILD b/PKGBUILD
index eb7274a..29a3f8b 100644
@@ -4,12 +4,12 @@ pkgname=zerotier-one
pkgdesc="Creates virtual Ethernet networks of almost unlimited size."
-arch=('i686' 'x86_64' 'armv7h')
+arch=('i686' 'x86_64' 'armv7h' 'aarch64')
depends=("gcc-libs" "http-parser")
+makedepends=("ruby-ronn" "clang" "fakeroot" "make")

Its possible to allow the clang makedepends and the aarch64?

CMagnuson commented on 2017-10-05 01:24

Just installed with a fully updated arch linux and the install didn't give me any errors when installed via sudo aura -A zerotier-one

pkmorrison commented on 2017-09-26 17:35

Build Failed

[identity] Serialize and deserialize (ASCII no private): PASS
[certificate] Generating identity to act as authority... b99e476afe
[certificate] Generating identities A and B... 3fc4403b45, 7a67fb400d
[certificate] Generating certificates A and B...
[certificate] Signing certificates A and B with authority...
[certificate] A agrees with B and B with A... yes, yes.
[certificate] Generating two certificates that should not agree...
[certificate] A agrees with B and B with A... no, no.
[phy] Creating phy endpoint...
[phy] Binding UDP listen socket to FAILED.

==> ERROR: A failure occurred in check().
==> ERROR: Makepkg was unable to build zerotier-one.
==> Restart building zerotier-one ? [y/N]
==> -------------------------------------

dmilinevskyi commented on 2017-07-08 02:09

Could you please export `CC=gcc` and `CXX=g++` for make? The build system of `zerotier-one` prefers clang if it's available while some default makepkg options are not compatible with it (-fvar-tracking-assignments).

kseistrup commented on 2017-05-07 19:05

Building fails on e.g. RPi2 because “gcc -dumpmachine” says “armv7l-unknown-linux-gnueabihf”, and the file only looks for “armv7-*”.

All comments