Re: [AMBER] New compile-issue macOS, CPPTRAJ

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Mon, 1 Apr 2019 11:18:46 -0400

Hi,

On Mon, Apr 1, 2019 at 8:04 AM Gustaf Olsson <gustaf.olsson.lnu.se> wrote:
> 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.

This actually appears to be the result of Apple mucking with header
files and is GNU/C++ specific on Mojave; see
https://apple.stackexchange.com/questions/355049/compilation-error-with-mojave-error-atomic-does-not-name-a-type.
I'm not sure what the proper workaround is; maybe disabling C++11 for
cpptraj? Can you try configuring cpptraj standalone (either via
$AMBERHOME/AmberTools/src/cpptraj or via the GitHub version) with
-noc++11?

>
> 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"

This seems like you're using the standalone cpptraj configure from
inside AmberTools maybe? If so, you should execute it the same way
$AMBERHOME/AmberTools/src/configure2 does, specifying
'--with-netcdf=$AMBERHOME' etc so it knows where to get NetCDF etc
(search for 'Configure CPPTRAJ' in configure2).

-Dan

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Apr 01 2019 - 08:30:03 PDT
Custom Search