1. Most users who realize that INSTALL files still exist should simply
  2. follow the directions at
  4. If you got the source from git, run "./", which will
  5. run the various auto* programs. Then you can run ./configure, and
  6. refer to the above instructions.
  7. If it doesn't build for you:
  8. If you have problems finding libraries, try
  9. CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" \
  10. ./configure
  11. or
  12. ./configure --with-libevent-dir=/usr/local
  13. rather than simply ./configure.
  14. If you have mysterious autoconf failures while linking openssl,
  15. consider setting your LD_LIBRARY_PATH to the openssl lib directory.
  16. For example, "setenv LD_LIBRARY_PATH /usr/athena/lib".
  17. Lastly, check out
  19. How to do static builds of tor:
  20. Tor supports linking each of the libraries it needs statically. Use the
  21. --enable-static-X ./configure option in conjunction with the --with-X-dir
  22. option for libevent, zlib, and openssl. For this to work sanely, libevent
  23. should be built with --disable-shared --enable-static --with-pic, and
  24. OpenSSL should be built with no-shared no-dso.
  25. If you need to build tor so that system libraries are also statically linked,
  26. use the --enable-static-tor ./configure option. This won't work on OS X
  27. unless you build the required crt0.o yourself. It is also incompatible with
  28. the --enable-gcc-hardening option.
  29. An example of how to build a mostly static tor:
  30. ./configure --enable-static-libevent \
  31. --enable-static-openssl \
  32. --enable-static-zlib \
  33. --with-libevent-dir=/tmp/static-tor/libevent-1.4.14b-stable \
  34. --with-openssl-dir=/tmp/static-tor/openssl-0.9.8r/ \
  35. --with-zlib-dir=/tmp/static-tor/zlib-1.2.5
  36. An example of how to build an entirely static tor:
  37. ./configure --enable-static-tor \
  38. --with-libevent-dir=/tmp/static-tor/libevent-1.4.14b-stable \
  39. --with-openssl-dir=/tmp/static-tor/openssl-0.9.8r/ \
  40. --with-zlib-dir=/tmp/static-tor/zlib-1.2.5