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

From: Florian Nachon <mailinglist.nachon.net>
Date: Sat, 1 May 2021 14:49:43 +0200

Hello,

I tried to install Ambertools21 using cmake, but it fails at the linking stage, much like Ambertools20 was doing (see below).
Apparently a problem with arm64?

Same problem with Apple Clang 10.2 ou GCC 10.2.1 (installe with homebrew).
Libraries like Boost are installed with homebrew.

Here is the terminal output, any clues?

[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
      __ZN5boost16re_detail_10750012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12extend_stackEv in metatwist.cpp.o
      __ZN5boost16re_detail_10750012perl_matcherIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISB_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE12extend_stackEv in metatwist.cpp.o
  "__ZN5boost16re_detail_10750013put_mem_blockEPv", referenced from:
      __ZN5boost16re_detail_10750012perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISC_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE18unwind_extra_blockEb in metatwist.cpp.o
      __ZN5boost16re_detail_10750012perl_matcherIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISB_EEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE18unwind_extra_blockEb in metatwist.cpp.o
      __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
  "__ZN5boost16re_detail_10750014verify_optionsEjNS_15regex_constants12_match_flagsE", 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
  "__ZN5boost16re_detail_10750019raise_runtime_errorERKSt13runtime_error", referenced from:
      __ZN5boost16re_detail_10750011raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE in metatwist.cpp.o
  "__ZN5boost16re_detail_10750024get_default_error_stringENS_15regex_constants10error_typeE", referenced from:
      __ZN5boost16re_detail_10750011raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE in metatwist.cpp.o
  "__ZN5boost9iostreams6detail10bzip2_base3endEbSt9nothrow_t", referenced from:
      __ZN5boost6detail17sp_counted_impl_pINS_9iostreams16symmetric_filterINS2_6detail23bzip2_decompressor_implISaIcEEES6_E4implEE7disposeEv in metatwist.cpp.o
      __ZN4util5files9readdxbz2IdEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERN5boost7numeric5ublas6vectorIT_NSC_15unbounded_arrayISE_SaISE_EEEEERNSC_6matrixISE_NSC_15basic_row_majorImlEESH_EERNSA_11multi_arrayISE_Lm3ESG_EE in metatwist.cpp.o
  "__ZNK5boost16re_detail_10750031cpp_regex_traits_implementationIcE17transform_primaryB5cxx11EPKcS4_", referenced from:
      __ZN5boost16re_detail_10750016re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_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
  "__ZNK5boost16re_detail_10750031cpp_regex_traits_implementationIcE9transformB5cxx11EPKcS4_", referenced from:
      __ZN5boost16re_detail_10750016re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_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


> On 15 Mar 2021, at 09:38, Mailing list <mailinglist.NACHON.NET> wrote:
>
>
>
>> 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 <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 Sat May 01 2021 - 06:00:11 PDT
Custom Search