Re: [AMBER] Installation Ambertools20 Mac M1 (arm64)

From: Mailing list <mailinglist.nachon.net>
Date: Mon, 15 Mar 2021 09:38:43 +0100

> On 15 Mar 2021, at 09:12, Gould, Ian R <i.gould.imperial.ac.uk> wrote:
>
> Hi Florian,
>
> One of my grad students has compiled and has running Ambertools21 and AMBER20 on Mac M1 (arm64). We hope that it will be available with the general release of Ambertools21 which should occur in the next month or so. We are also hoping to get it into the binary conda release as it's a complex and potentially frustrating process to get it to compile.
>
> I would continue to use Ambertools19 with Rosetta. It is not sensible to try to retro-engineer a fix to compile Ambertools20 on M1 with the imminent release of AT21.

Hi Ian,

Good news!
Thank you for the advice, I guess I will wait for Ambertools21. No big deal.

Florian

PS: For your information, I tested Charo’s workaround described here (http://archive.ambermd.org/202103/0113.html ; additional fortran compiler flags).
Here are my modifications to 'run_cmake' according to Charo’s:

***
# For macOS:

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

  $cmake $AMBER_PREFIX/amber20_src \
    -DCMAKE_INSTALL_PREFIX=$AMBER_PREFIX/amber20 \
    -DCOMPILER=AUTO -DCMAKE_C_COMPILER=/opt/homebrew/bin/gcc -DCMAKE_CXX_COMPILER=/opt/homebrew/bin/g++ \
    -DCMAKE_CXX_FLAGS=-fcommon -DCMAKE_C_FLAGS=-fcommon \
    -DCMAKE_Fortran_FLAGS='-fallow-argument-mismatch -fallow-invalid-boz -frecursive' \
    -DMPI=FALSE -DCUDA=FALSE -DINSTALL_TESTS=TRUE \
    -DDOWNLOAD_MINICONDA=TRUE -DMINICONDA_USE_PY3=TRUE \
    2>&1 | tee cmake.log

else
***

I also had to install libraries in homebrew (like boost, zlib..) to avoid messing up with Apple’s preinstalled libraries. I almost completed compilation.
Unfortunately it failed at linking metatwist at the very end:

[100%] Linking CXX executable metatwist
Undefined symbols for architecture arm64:
  "__ZN5boost16re_detail_10750012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE14construct_initERKNS_11basic_regexIcSJ_EENS_15regex_constants12_match_flagsE", referenced from:
      __ZN5boost12regex_searchIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISB_EEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SJ_RNS_13match_resultsISJ_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsESJ_ in metatwist.cpp.o
  "__ZN5boost16re_detail_10750013get_mem_blockEv", referenced from:
      __ZN5boost16re_detail_10750012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv in metatwist.cpp.o
      __ZN5boost16re_detail_10750012perl_matcherIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISB_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE8find_impEv in metatwist.cpp.o
[…]
EET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb in metatwist.cpp.o
      __ZN5boost16re_detail_10750016re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SG_SG_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb in metatwist.cpp.o
ld: symbol(s) not found for architecture arm64
collect2: error: ld returned 1 exit status
make[2]: *** [AmberTools/src/moft/metatwist] Error 1
make[1]: *** [AmberTools/src/moft/CMakeFiles/metatwist.dir/all] Error 2
make: *** [all] Error 2

Too bad!




_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Mar 15 2021 - 02:00:02 PDT
Custom Search