[AMBER] AmberTools20 comilation on macOS

From: Gustaf Olsson <gustaf.olsson.lnu.se>
Date: Tue, 5 May 2020 08:07:11 +0000

So it's that time of the year again! New amber release, exciting.


Sadly, I am already running into problems though this is part of the fun isn't it?


Im currently installing on:

    macOS Mojave 10.14.6
    Xcode 11.3.1 (11C504)

Following the manual produces an error for metatwist


    Undefined symbols for architecture x86_64:



    "boost::re_detail_107200::raw_storage::insert(unsigned long, unsigned long)", referenced from:
          boost::re_detail_107200::basic_regex_parser<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::parse_repeat(unsigned long, unsigned long) in metatwist.cpp.o
    ....
    ....
    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]: *** [AmberTools/src/moft/metatwist] Error 1
    make[1]: *** [AmberTools/src/moft/CMakeFiles/metatwist.dir/all] Error 2
    make: *** [all] Error 2

This is using the built in (xcode) compilers. There seems to be a problem with "boost" and if I am not mistaken, there was a problem with boost and the mac GCC (clang) compiler earlier?

Checking the run_cmake file provided some additional insight:

    # For macOS:

      if [ -x /Applications/CMake.app/Contents/bin/cmake ]; then
         cmake=/Applications/CMake.app/Contents/bin/cmake
      else
         cmake=cmake
      fi

Applications/CMake.app is not present by default. Hence this test "fails" and sets cmake=cmake. Using a package manager (for me homebrew) I have cmake in /usr/local/bin/. This might create further problems as I suspect this package may not have been built with mac clang.

I do not have a running VM or "virgin macOS" so I cannot confirm if cmake is installed at all with xcode and the GUI cmake that run_cmake checks for is not there by default. This might be a problem and the "prerequisites" should likely indicate that you need to install CMake.app (https://cmake.org/install/) or using macports or homebrew.<https://cmake.org/install/>

Maybe the test for OS could use something like "sw_vers" or "system_profiler SPSoftwareDataType" to find not only of it is macOS (OS X) though even the version of the OS?


I'll try to install CMake.app and attempt to compile again though I suspect that the boost issue will not be solved by having CMake.app installed.

During the configuration stage, I also notice that the script does not find open-mpi or mkl libraries, even if these are installed. I assume there might be a need for some "hands on" convincing regarding parallelization.

On another note, is there any way to define which compilers to use on the CLI (like before with configure gnu)? I assume I could remove the " For macOS:" check (or uninstall in run-cmake and the assumption will be that I am building under linux? It would be nice to try to build using gnu gcc if clang keeps failing.

Best regards
// Gustaf

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue May 05 2020 - 01:30:02 PDT
Custom Search