INSTALL 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. Most users who realize that INSTALL files still exist should simply
  2. follow the directions at
  3. https://www.torproject.org/docs/tor-doc-unix
  4. If you got the source from git, run "./autogen.sh", 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
  18. https://www.torproject.org/docs/faq#DoesntWork
  19. An example of how to build a mostly static Tor:
  20. Libevent should be built with:
  21. % ./configure --disable-shared --enable-static --with-pic
  22. An example of how to build a mostly static Tor:
  23. ./configure --enable-static-libevent \
  24. --enable-static-openssl \
  25. --enable-static-zlib \
  26. --with-libevent-dir=/tmp/static-tor/libevent-1.4.14b-stable \
  27. --with-openssl-dir=/tmp/static-tor/openssl-0.9.8r/ \
  28. --with-zlib-dir=/tmp/static-tor/zlib-1.2.5
  29. An example of how to build an entirely static Tor (no Mac OS X support, sorry):
  30. ./configure --enable-static-tor \
  31. --enable-static-libevent \
  32. --enable-static-openssl \
  33. --enable-static-zlib \
  34. --with-libevent-dir=/tmp/static-tor/libevent-1.4.14b-stable \
  35. --with-openssl-dir=/tmp/static-tor/openssl-0.9.8r/ \
  36. --with-zlib-dir=/tmp/static-tor/zlib-1.2.5
  37. This currently does not work with --enable-gcc-hardening because of libevent issues:
  38. configure:6176: gcc -o conftest -D_FORTIFY_SOURCE=2 -fstack-protector-all -fwrapv -fPIE -Wstack-protector
  39. --param ssp-buffer-size=1 -I/tmp/static-tor/libevent-1.4.14b-stable -I${top_srcdir}/src/common -
  40. L/tmp/static-tor/libevent-1.4.14b-stable -pie conftest.c -lpthread -ldl -levent -lrt >&5
  41. /usr/bin/ld: /tmp/static-tor/libevent-1.4.14b-stable/libevent.a(event.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
  42. /tmp/static-tor/libevent-1.4.14b-stable/libevent.a: could not read symbols: Bad value
  43. collect2: ld returned 1 exit status
  44. configure:6176: $? = 1
  45. This produces the following Tor binaries on Gnu/Linux x86-64:
  46. % file src/or/tor
  47. src/or/tor: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.15, not stripped
  48. % ldd src/or/tor
  49. not a dynamic executable