To successfully compile AOLserver you will need to install the various development tools (make, gcc, g++, binutils, etc.). You will also want to have the current "unstable" version of PostgreSQL (since OpenACS won't run with PostgreSQL 6.5.3).
Please also be sure to install the "-dev" versions of the libraries. These packages include the static libraries (for linking), header files, and other developer-related materials.
Specifically, libpthread.so should bin in libc6 packages (libc6 and libc6-dev).