[AMBER] Installing on Mac - Back at it

From: Gustaf Olsson <gustaf.olsson.lnu.se>
Date: Mon, 2 Sep 2019 13:43:55 +0000

As there is a new version of Xcode out (not a major release but still) I went ahead and tried to compile amber again, and it was of course not without issues.

So, good news first! Even though the “missing header” files are no longer included for installation with Xcode, amber and amber tools compile using clang and an external MPI alternative without any big issues. Still, I cannot compile the OpenMPI tools included with cpptraj because it is not compatible with clang (some annoying error). I have not updated the blog/site to reflect this though I will as soon as I have time.

However, installing using GNU GCC produces an error:

    (cd ucpp-1.3 && /Applications/Xcode.app/Contents/Developer/usr/bin/make install )
    [UCPP] CC mem.c
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:61,
                     from mem.h:33,
                     from mem.c:31:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h:257:22: error: missing binary operator before token "("
      257 | #if __has_builtin(__is_target_arch)
          | ^
    make[2]: *** [mem.o] Error 1
    make[1]: *** [utils] Error 2
    make: *** [install] Error 2

I tried to install from scratch instead of doing un update, this produced a “nedcdf” error during configuration with the same error:

    Error: NetCDF C compile failed.
           Check /Users/SOFTWARE/amber18//AmberTools/src/netcdf-4.6.1/netcdf.c.compile.log
           for errors.
    Configure failed due to the errors above!

    Making install in include
    make[2]: Nothing to be done for `install-exec-am'.
     .././install-sh -c -d '/Users/SOFTWARE/amber18/include'
     /usr/bin/install -c -m 644 netcdf.h netcdf_meta.h netcdf_mem.h '/Users/SOFTWARE/amber18/include'
    Making install in libdispatch
    /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DBINTRAJ -MT libdispatch_la-dparallel.lo -MD -MP -MF .deps/libdispatch_la-dparallel.Tpo -c -o libdispatch_la-dparallel.lo `test -f 'dparallel.c' || echo './'`dparallel.c
    libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DBINTRAJ -MT libdispatch_la-dparallel.lo -MD -MP -MF .deps/libdispatch_la-dparallel.Tpo -c dparallel.c -o libdispatch_la-dparallel.o
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:61,
                     from ../include/ncconfigure.h:14,
                     from ../config.h:506,
                     from dparallel.c:9:
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/Availability.h:257:22: error: missing binary operator before token "("
      257 | #if __has_builtin(__is_target_arch)
          | ^
    make[1]: *** [libdispatch_la-dparallel.lo] Error 1
    make: *** [install-recursive] Error 1

I don’t think that this would be a problem that many Mac users would complain about as it still works with clang though being stubborn, I am now curious if there is an apparent reason for this error and an equally apparent workaround?

Best regards
// Gustaf
AMBER mailing list
Received on Mon Sep 02 2019 - 07:00:01 PDT
Custom Search