Re: [AMBER] More macOS compilation issues....

From: Gustaf Olsson <>
Date: Sun, 21 Apr 2019 20:37:05 +0000

So some good new! After updating my installed packages it turns out that version updates of gcc versions 4-8 now allows for the successful compilation of AmberTools (and amber?) using the gnu gcc compilers on macOS 10.14.4 and Xcode 10.2.1

However, as the homebrew versions of both openMPI and mpich somehow depends on clang, I have yet found a way to successfully perform the parallel compilation. Compilation using either openMPI or mpich terminates with the following error:

    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [/Users/guolaa/SOFTWARE/amber18/bin/mdgx.MPI] Error 1
    make[1]: *** [parallel] Error 2
    make: *** [install] Error 2

With the "clang: error:” part probably being the issue. So for both openMPI and mpich, the following warning is presented:

    Warning: mpich/open-mpi dependency gcc was built with a different C++ standard
    library (libstdc++ from clang). This may cause problems at runtime.

and 'mpirun —version’ for mpich provides the following output:
    HYDRA build details:
        Version: 3.3
        Release Date: Wed Nov 21 11:32:40 CST 2018
        CC: clang
        CXX: clang++
        F77: gfortran
        F90: gfortran

Regardless of any symlink/env/export bypass I have tried I cannot seem to get around ‘clang’ for the MPI compilation though I suspect this is just a matter of effort. Possiblest re-compiling openmpi/mpich from source using gnu gcc.

Rounding up, clang serial and clang+openMPI/mpich parallel works while gnu gcc4-8 serial works however parallel does not work without further configuration on the latest versions of macOS and Xcode using homebrew as package manager. I will update the website accordingly as soon as I have some time.

Best regards
// Gustaf

> On 21 Apr 2019, at 12:31, Gustaf Olsson <> wrote:
> *facepalm*
> One more reason not to try to solve problems in a rush…
> So as for now configuration still breaks if the files
>> $AMBERHOME/AmberTools/src/configure2
>> $AMBERHOME/AmberTools/src/pytraj/
> are not modified replacing libstdc++ with libc++ or commenting out affected lines.
> Configuring CPPTRAJ...
> CPPTRAJ configure failed. Check ‘/amber18/AmberTools/src/cpptraj_config.log' for details.
> Configure failed due to the errors above!
> Testing C++11 support: Not present
> Error: Could not link properly with clang++ on OSX
> However, making these changes and remembering the
> Compilation using clang works.
> Trying the -mpi compilation also works however when configuring -openmp I get an error complaining about open-mpi not being compatible with clang (?)
> Best regards
> // Gustaf
>> On 18 Apr 2019, at 15:47, Hai Nguyen <> wrote:
>> Hi
>> You can try
>> and “make install” again.
>> Hai
>> On Thu, Apr 18, 2019 at 4:20 AM Gustaf Olsson <> wrote:
>>> So, today I came to the office just to find that my laptop had
>>> autoupdated, amongst other things, XCode which is now Version 10.2.1
>>> (10E1001).
>>> Having a moment of honest panic I tried to recompile the AmberTools18
>>> package and yes, once again I cannot compile… This is not using the gnu gcc
>>> (which still, however, does not work and fails with the “_Atomic” error).
>>> This issue is still persistent and has not been fixed by the developers or
>>> by apple and diskussions are seemingly ongoing on how to handle this
>>> problem. I did exactly what worked on the last version and what is outlined
>>> in the latest confirmed install procedure on the website though it fails
>>> with the same parmed error as last time.
>>> …
>>> …
>>> copying parmed/modeller/data/standard_residues.lib ->
>>> build/lib.macosx-10.7-x86_64-2.7/parmed/modeller/data
>>> UPDATING build/lib.macosx-10.7-x86_64-2.7/parmed/
>>> set build/lib.macosx-10.7-x86_64-2.7/parmed/ to
>>> '3.0.0+57.g74a84d30'
>>> running build_ext
>>> building 'parmed.amber._rdparm' extension
>>> creating build/temp.macosx-10.7-x86_64-2.7
>>> creating build/temp.macosx-10.7-x86_64-2.7/src
>>> clang -fno-strict-aliasing
>>> -I/Users/guolaa/SOFTWARE/amber18/miniconda/include -arch x86_64 -DNDEBUG -g
>>> -fwrapv -O3 -Wall -Wstrict-prototypes
>>> -I/Users/guolaa/SOFTWARE/amber18/AmberTools/src/parmed/src
>>> -I/Users/guolaa/SOFTWARE/amber18/miniconda/include/python2.7 -c
>>> src/_rdparm.cpp -o build/temp.macosx-10.7-x86_64-2.7/src/_rdparm.o
>>> warning: include path for stdlibc++ headers not found; pass
>>> '-stdlib=libc++' on the command line to use the libc++ standard library
>>> instead [-Wstdlibcxx-not-found]
>>> In file included from src/_rdparm.cpp:17:
>>> /Users/guolaa/SOFTWARE/amber18/AmberTools/src/parmed/src/readparm.h:5:10:
>>> fatal error: 'locale' file not found
>>> #include <locale>
>>> ^~~~~~~~
>>> 1 warning and 1 error generated.
>>> error: command 'clang' failed with exit status 1
>>> make[2]: *** [parmed] Error 1
>>> make[1]: *** [serial] Error 2
>>> make: *** [install] Error 2
>>> I have commented out the libstdc++ lines as described and done a
>>> search/replace (:%s/libstdc++/libc++/g) to make sure I did not miss a new
>>> line or something else however it still does not work and fails with the
>>> same error. These are the files modified:
>>> $AMBERHOME/AmberTools/src/configure2
>>> $AMBERHOME/AmberTools/src/pytraj/
>>> Are there any more files referencing the now deprecated c++ stuff from
>>> Xcode that I am unaware of?
>>> (( Maybe it’s just time to give up and dual-boot as it at least seems that
>>> Apple is hellbent on breaking cross platform compatibility ))
>>> Best regards
>>> // Gustaf
>>> _______________________________________________
>>> AMBER mailing list
>> _______________________________________________
>> AMBER mailing list
> _______________________________________________
> AMBER mailing list

AMBER mailing list
Received on Sun Apr 21 2019 - 14:00:02 PDT
Custom Search