BUILDING 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. Installing
  2. ----------
  3. To build and install tarsnap, run:
  4. ./configure
  5. make
  6. make install
  7. Tarsnap should build and run on most IEEE Std 1003.1 (POSIX) compliant
  8. systems which
  9. 1. Includes the Software Development Utilities option,
  10. 2. Has OpenSSL available via -lcrypto and #include <openssl/foo>,
  11. 3. Has zlib available via -lz and #include <zlib.h>,
  12. 4. Provides /dev/urandom, and
  13. 5. (Linux only) has the <ext2fs/ext2_fs.h> header (which is *not* the same
  14. as the <linux/ext2_fs.h> header file.
  15. Building from git
  16. -----------------
  17. Normal users should only use the signed tarballs from https://tarsnap.com, but
  18. for experimental development, use:
  19. autoreconf -i
  20. ./configure
  21. make
  22. - In order to support the `AX_CFLAGS_WARN_ALL` autoconf directive,
  23. you will need to install the autoconf archive. On Debian, use
  24. the `autoconf-archive` package; on FreeBSD, use
  25. `devel/autoconf-archive`.
  26. - If you receive this message:
  27. configure.ac:...: error: possibly undefined macro: AC_MSG_WARN
  28. then you need `pkg-config`. On Debian, use the `pkg-config`
  29. package; on FreeBSD, use `devel/pkgconf`.
  30. Platform-specific notes
  31. -----------------------
  32. - On Debian, Ubuntu, and related Linux distributions, the minimal set of
  33. dependencies is:
  34. sudo apt-get install gcc libc6-dev make libssl-dev zlib1g-dev e2fslibs-dev
  35. To enable all optional features, install:
  36. sudo apt-get install bash-completion libacl1-dev libattr1-dev libbz2-dev liblzma-dev pkg-config
  37. - On RedHat, CentOS, SuSE, Amazon Linux, and related Linux distributions:
  38. sudo yum install gcc make glibc-devel openssl-devel zlib-devel e2fsprogs-devel
  39. To enable all optional features, install:
  40. sudo yum install bzip2-devel libacl-devel libattr-devel xz-devel pkgconf bash-completion
  41. - on MacOS X: in addition to the normal build toolchain (probably installed via
  42. XCode), you need the OpenSSL development library. This could be installed
  43. manually, or via a package manager:
  44. Homebrew:
  45. brew install openssl
  46. MacPorts:
  47. sudo port install openssl
  48. If you installed OpenSSL via homebrew, ./configure should find the right
  49. directories. If it doesn't, or if you installed it another way, you might
  50. need to specify the directory with:
  51. ./configure CPPFLAGS="-I/PATH_TO/openssl/include" LDFLAGS="-L/PATH_TO/opt/openssl/lib"
  52. Alternatively, you may wish to add these lines to your $HOME/.profile:
  53. export CPPFLAGS="-I/PATH_TO/openssl/include $CPPFLAGS"
  54. export LDFLAGS="-I/PATH_TO/openssl/lib $LDFLAGS"
  55. (And then open a new terminal window.)
  56. Whichever method you choose, replace "/PATH_TO/" with the actual path to
  57. your OpenSSL installation.
  58. - on Solaris: there are no problems compiling with cc, c99, or gcc.
  59. To compile with clang, please use:
  60. ./configure CC=clang CFLAGS="-U__EXTENSIONS__"
  61. make
  62. and ignore warning messages about _XOPEN_SOURCE=600.
  63. Packaging notes
  64. ---------------
  65. Optional shell completion scripts:
  66. - `--with-bash-completion-dir[=DIR]`, with the DIR specified explicitly or
  67. left blank. If `DIR` is left blank, it attempts to use `pkg-config` and
  68. `bash-completion >= 2.0` to determine where to put the bash completion
  69. scripts. If your system does not match those requirements, please specify
  70. `DIR` explicitly.
  71. - `--with-zsh-completion-dir=DIR`, with the DIR specified explicitly.