The database package depends upon the struct package and has a src/ directory containing a bootstrap script. Running this script leads to and error:
checking for PQconnectdb in -lpq… no
configure: error: unable to find the PQconnectdb() function in pq
This seems to be because it cannot find libpq.so – checking on the system libpq.so.5 exists but there is no libpq.so. Adding a link libpq.so allows the build to complete.