[AMBER] New compile-issue macOS, CPPTRAJ

From: Gustaf Olsson <gustaf.olsson.lnu.se>
Date: Mon, 1 Apr 2019 12:04:14 +0000

Hello again amber users and developers

So, as you might have noticed there are new issues compiling Amber/AmberTools on OS X. After some poling around in files I managed to compile using clang/gfortran. I am now trying to compile using the gnu gcc package installed using homebrew.

I run into this error while compiling:

CXX StringRoutines.cpp
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/sysctl.h:83,
                 from StringRoutines.cpp:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/ucred.h:94:2: error: '_Atomic' does not name a type
  _Atomic u_long cr_ref; /* reference count */
make[4]: *** [StringRoutines.o] Error 1
make[3]: *** [install] Error 2
make[2]: *** [build_cpptraj] Error 2
make[1]: *** [serial] Error 2
make: *** [install] Error 2

This is seemingly an issue with CPPTRAJ that does not show up when compiling using clang so I am assuming this is somehow related to gcc. Now, I know that macOS does not make it easy compiling though I am curious why something would be sourced from the Xcode CLT when not using the apple compiler.

Trying to build from git, I get a NetCDF test error:

Checking NetCDF:
Test compile failed: g++ -Wall -O3 -std=gnu++11 -o testp testp.cpp -lnetcdf
Error follows:
testp.cpp:2:10: fatal error: netcdf.h: No such file or directory
 #include "netcdf.h"
compilation terminated.

This is strange since I do have netcdf installed, though I’ll just assume this is some strange “homebrew” issue for now. So, opting for configuring with -amberlib instead produces the exact same issue.

Before I start poking around at things I do not understand, are there any more educated suggestions what might cause this issue?

Best regards
// Gustaf
AMBER mailing list
Received on Mon Apr 01 2019 - 05:30:01 PDT
Custom Search