-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathBUILDING
83 lines (65 loc) · 3.29 KB
/
BUILDING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Installing
----------
To build and install spiped, run:
# make BINDIR=/path/to/target/directory install
To install man pages, add MAN1DIR=/path/to/man.1/directory to the command
line (e.g., MAN1DIR=/usr/local/man/man1 on FreeBSD).
Spiped should build and run on any IEEE Std 1003.1 (POSIX) compliant
system which
1. Includes the Software Development Utilities option,
2. Has OpenSSL available via -lcrypto and #include <openssl/foo>, and
3. Provides /dev/urandom.
Platform-specific notes
-----------------------
- On OS X, the version of OpenSSL included with the operating
system is outdated (0.9.8) and deprecated, and it is recommended
that spiped be built with an updated version of OpenSSL. On OS X
10.11 "El Capitan", OpenSSL was removed entirely. After installing a newer
version of OpenSSL, use
CFLAGS="-I /path/to/openssl/headers"
LDADD_EXTRA="-L /path/to/openssl/lib"
to build spiped.
Note that spiped will still build (on pre-10.11) if you set these options
wrong: If you see
warning: 'AES_set_encrypt_key' is deprecated
during the build then spiped is still using the outdated version
of OpenSSL from OS X.
- On Cygwin the following command must be run before building spiped in order
order to work around a bug in Cygwin's C library:
sed -i.orig s/-D_POSIX_C_SOURCE=200809L// */Makefile
Without this command, spiped will still build but it will crash.
- On some platforms (Solaris, maybe others), additional compiler and/or linker
options are required to find OpenSSL or system libraries; these can be
provided by adding e.g., CFLAGS="-I/path/to/openssl/headers" (compiler option)
or LDADD_EXTRA="-L/usr/sfw/lib -lsocket -lnsl" (linker option) to the make
command line.
- On Solaris, the command-line utilities in /usr/bin are not
necessarily POSIX-compatible. According to standards(7), in order to use
POSIX.1-2008 standard-conforming utilities, you must set your PATH so that
certain directories (such as /usr/xpg4/bin/) take precedence over /usr/bin.
Please check the documentation in your version of Solaris by:
$ man standards
and carefully read the "Utilities" section.
- On some platforms (OpenBSD prior to 5.4, and possibly others) you will need to
add #include <sys/types.h> at the start of
lib/dnsthread/dnsthread.c
libcperciva/util/sock_util.c
proto/proto_conn.c
spipe/main.c
spipe/pushbits.c
due to a POSIX-compliance bug on those platforms.
- On some platforms (mostly Linuxes) it is possible to install OpenSSL libraries
without the associated header files; the header files are usually in packages
named "openssl-devel", "libssl-dev", or similar.
- If your OS provides random bytes via some mechanism other than /dev/urandom,
please make local changes to lib/util/entropy.c and notify the author.
If spiped fails to build or run for other reasons, please notify the
author.
Updating build code and releasing
---------------------------------
The POSIX-compatible Makefiles are generated via `make Makefiles` from the
included (far more readable) BSD Makefiles. To run this target, you will
need to have a BSD `make(1)` utility; NetBSD's `make(1)` is available for many
operating systems as `bmake`.
Release tarballs are generated via `make VERSION=x.y.z publish`, subject
to the same caveat of needing a BSD-compatible make.