Configuring PETSc with --with-shared=1 does not work in PETSc 3.2 so it is trying to link with the static library libpetsc.a. Try to build PETSc with --with-shared-libraries=1 instead.
Configuring PETSc with --with-shared=1 does not work in PETSc 3.2 so it is trying to link with the static library libpetsc.a. Try to build PETSc with --with- shared- libraries= 1 instead.