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.

  1. pre-requisites:

  2. ./install.com osx large ifort nolog

  3. 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 1

    The workaround for this error is putting XRAYMAP to the file build/osx/pref.dat.

  4. 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.c line 30, from bits/time.h to time.h

  5. Lastly:

    /usr/bin/ld: Undefined symbols:
    xraymap0
    collect2: ld returned 1 exit status

    Workaround: replace build/osx/energy.mk to energy.txt.

Again: I am suspecting the first and the last errors are related with my source, others may not suffer from them.

Leave a Reply