EDIT 18 May 2012:
It's now been solved on 64 bit as well
Compiling nwchem 6.1 with internal libs on debian: http://verahill.blogspot.com.au/2012/05/compiling-nwchem-61-with-internal-libs.html
Compiling nwchem 6.1 with openblas on debian: http://verahill.blogspot.com.au/2012/05/building-nwchem-61-on-debian.html
This doesn't work with the 64 bit version of nwchem 6.1. There's a separate post on that. Nwchem 6.1 64 bit will build just fine, but will crash when run. Again, see the other post.
Building on 32 bit debian testing:
Put a hold on your mpich2 and mpich2-dev packages (see e.g. here for more details)
1. edit your /etc/apt/sources.list to allow packages from stable e.g.
deb ftp://ftp.au.debian.org/debian/ testing main contrib non-fre
deb ftp://ftp.au.debian.org/debian/ stable main contrib non-free
2. create an /etc/apt/preferences file e.g.
Pin: release a=testing
Pin: release a=stable
2. install v 1.2 explicitlysudo apt-get update && sudo apt-get install mpich2=126.96.36.199-5 libmpich2-dev=188.8.131.52-5
3. put a hold on the packages
echo "mpich2 hold"|dpkg --set-selections
echo "libmpich2-dev hold"|dpkg --set-selections
Make sure you have the necessary packages:
sudo apt-get install build-essential gfortran fort77
I had some error messages before installing fort77. Not sure they are related.
Download the nwchem source
tar -xvf Nwchem-6.1-2012-Feb.tar.gz
create buildconf.sh in ~/nwchem-6.1
export LIBMPI="-lmpich -lfmpich -lpthread"
Building takes ages. But it works. Why it works for 32 bit and not 64 bit has me a bit confused, but it's probably a good hint to the solution.