Building 6.3 with gcc/CentOS 5, fails with error: �DLAMCHE� undeclared


Just Got Here
I am attempting to build NWChem 6.3 on CentOS 5, 64-bit, with the distro-supplied BLAS and LAPACK libraries, gcc 4.1.2, and openMPI 1.4.5.

The build fails during make with:
make[3]: Entering directory `/scratch/nwchem-6.3.revision2-src.2013-10-17/src/peigs/src/c'
gcc -I/scratch/nwchem-6.3.revision2-src.2013-10-17/src/peigs/h -DLinux64 -D -c clustrfix.c
<command line>:1:1: error: macro names must be identifiers
clustrfix.c: In function ‘clustrfix_’:
clustrfix.c:206: error: ‘DLAMCHE’ undeclared (first use in this function)
clustrfix.c:206: error: (Each undeclared identifier is reported only once
clustrfix.c:206: error: for each function it appears in.)
make[3]: *** [clustrfix.o] Error 1
make[3]: Leaving directory `/scratch/nwchem-6.3.revision2-src.2013-10-17/src/peigs/src/c'
make[2]: *** [lib] Error 2
make[2]: Leaving directory `/scratch/nwchem-6.3.revision2-src.2013-10-17/src/peigs'
make[1]: *** [peigs_stamp] Error 1
make[1]: Leaving directory `/scratch/nwchem-6.3.revision2-src.2013-10-17/src/peigs'
make: *** [libraries] Error 1

The build script is below:
echo "Extracting source archive"
SRC="nwchem-6.3.revision2-src.2013-10-17"
ARCH="${SRC}.tar.gz"
LOG=$PWD/build-nwchem.log
export SCRATCH=/scratch
cp $ARCH $SCRATCH
cd $SCRATCH
rm -Rf $SRC
tar xzf $ARCH
cd $SRC
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET="Linux64"
export ARMCI_NETWORK="MPI-TS"
MPI=/share/apps/openmpi-1.4.5-gcc-int64
export PATH="$MPI/bin:$PATH"
export LD_LIBRARY_PATH="$MPI/lib:$LD_LIBRARY_PATH"
export USE_MPI="y"
export USE_MPIF="y"
export USE_MPIF4="y"
export LIBMPI="-lmpi_f90 -lmpi_f77 -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil"
export MPI_LIB="$MPI/lib"
export MPI_INCLUDE="$MPI/include"
export NWCHEM_MODULES="all"
export LARGE_FILES="TRUE"
export BLASOPT="-lblas -llapack"
export BLAS_SIZE="8"
export LAPACK_SIZE="8"
export FC=gfortran
export CC=gcc
cd $NWCHEM_TOP/src
pwd
echo "running make nwchem_config"
make nwchem_config
echo "running make 64_to_32"
make 64_to_32
echo "running make"
make USE_64TO32=y >$LOG 2>&1

Forum Vet
NWCHEM_TARGET="Linux64" should be changed to NWCHEM_TARGET=LINUX64


Forum >> NWChem's corner >> Compiling NWChem