Compiling CHARMM c33a1 on Mac OS X
Compiling CHARMM on Mac OS X is supposed to be easy; The install script has identifier osx. However, I encountered numerous problems while I tried to compile it. So here I leave some comment how I worked around the problems. Probably, I suspect some of the problems are because of my group is using little modified version of CHARMM, so this may not same for everyone.
pre-requisites:
- Intel Fortran for Mac OS (optional)
- g77 or gfortran (if you have Intel Fortran, you only need g77)
./install.com osx large ifort nolog
The first error message that I’ve encountered is:
eutil.f: In subroutine ‘enerin’:
eutil.f:2234:
ceterm(XMAP) = ‘XMAP’
^
Invalid declaration of or reference to symbol `xmap’ at (^) [initially seen at (^)]
make: *** [/Users/sunhwan/Programs/c33a1/lib/osx/energy.a(eutil.o)] Error 1The workaround for this error is putting
XRAYMAPto the filebuild/osx/pref.dat.The second one is:
/Users/sunhwan/Programs/c33a1/source/machdep/cstuff.c:30:23: error: bits/time.h: No such file or directory
/Users/sunhwan/Programs/c33a1/source/machdep/cstuff.c: In function ‘fmalloc_’:
/Users/sunhwan/Programs/c33a1/source/machdep/cstuff.c:104: warning: conflicting types for built-in function ‘malloc’
/Users/sunhwan/Programs/c33a1/source/machdep/cstuff.c: In function ‘fsystem_’:
/Users/sunhwan/Programs/c33a1/source/machdep/cstuff.c:145: warning: incompatible implicit declaration of built-in function ‘exit’
/Users/sunhwan/Programs/c33a1/source/machdep/cstuff.c: In function ‘fputenv_’:
/Users/sunhwan/Programs/c33a1/source/machdep/cstuff.c:278: warning: incompatible implicit declaration of built-in function ‘exit’The workaround: edit the file
source/machdep/cstuff.cline 30, frombits/time.htotime.hLastly:
/usr/bin/ld: Undefined symbols:
xraymap0
collect2: ld returned 1 exit statusWorkaround: replace
build/osx/energy.mkto energy.txt.
Again: I am suspecting the first and the last errors are related with my source, others may not suffer from them.