This commit is contained in:
Adam Ierymenko 2015-04-17 10:45:16 -07:00
parent 8715242e7f
commit b51d00146b

View File

@ -1,41 +1,36 @@
Building ZeroTier One From Source
Building ZeroTier One from Source
======
(See RUNNING.md for what to do next.)
Developers note: there is currently no management of dependencies on *nix
platforms, so you should make clean ; make if you change a header. Will
do this eventually.
Developers note: there is currently no management of dependencies on *nix platforms, so you should 'make clean ; make' if you change a header (.h or .hpp) file. Need to fix eventually.
### Linux and FreeBSD
### Linux and BSD
Just type 'make'. You'll need gcc and g++ installed, but ZeroTier One requires
no other third party libraries beyond the standard libc, libstdc++, and libm.
Just type 'make' (or 'gmake' on BSD). You will need gcc/g++ or clang/clang++ installed. No other third party libraries are needed.
*Note:* On FreeBSD you must use 'gmake', not 'make'!
Very old versions of Linux or BSD may run into problems. On Linux our primary build container is CentOS 6 (for backward compatibility), and on FreeBSD we've only tested with FreeBSD 10.
### MacOS
### Macintosh
make
Just type 'make'. You'll need Xcode and the command line tools installed of course.
If you are building ext/tap-mac you will need a different version of the
OSX gcc compiler chain than what currently ships (clang). We've got a copy
available here:
To install the tap driver, 'sudo make install-mac-tap' will place it in the default ZeroTier home directory. We ship a signed tap driver binary for ZeroTier One that should work for everyone.
If you do for some reason want to build ext/tap-mac you will need an older version of the OSX gcc compiler chain than what currently ships (clang) to build a properly backward compatibile image. A copy is hosted here:
http://download.zerotier.com/dev/llvm-g++-Xcode4.6.2.tar.bz2
Un-tar this into ext/ (it's excluded in .gitignore) and then 'make' in
ext/tap-mac/tuntap/src/tap.
Un-tar this into ext/ (it's excluded in .gitignore) and then 'make' in ext/tap-mac/tuntap/src/tap.
Most users should not need to build tap-mac, since a binary is included
in ext/bin.
To build the UI you will need Qt version 5.0 or later. The Qt home must
be symbolically linked into "Qt" in the parent directory of the ZeroTier
One source tree. Then you can type "make mac-ui" and the UI should build.
You can also load the UI in Qt Creator and build/test it that way.
We really don't recommend messing with this build yourself unless you think there's a bug in the driver and want to try to fix it. So far the driver has been completely stable for a very long time and the old binaries continue to work flawlessly on (last we checked) 10.10.
### Windows
There's a Visual Studio 2012 solution file in windows/ that can be used.
I've never tried it with MinGW, but theoretically this should be possible.
There's a Visual Studio 2012 solution file in windows/ that can be used. I've never tried it with MinGW, but theoretically this should be possible.
Windows is, of course, harder to build than any other platform.
### Debug builds
The Unix/Mac makefiles support a ZT_DEBUG=1 option ('make ZT_DEBUG=1') to build a version that will print a whole bunch of TRACE output to stderr as it runs. This also builds the binary with debug rather than production optimized flags.