Re: [AMBER] (long) OSX/catalina Ambertools19 building success with brew

From: Gustaf Olsson <gustaf.olsson.lnu.se>
Date: Wed, 16 Oct 2019 20:46:00 +0000

Thank you very much, identical setup regarding macOS, GCC/GFORTRAN and Xcode

vi $AMBERHOME/AmberTools/src/parmed/setup.py
37 '18': '10.14', => 37 '18': '10.14',
39 } => 38 '19': '10.15',
                                     => 39 }
and

vi $AMBERHOME/AmberTools/src/pytraj/setup.py
152 '18': '10.14', => 152 '18': '10.14',
153 } => 153 '19': '10.15',
                                     => 154 }
with

$ ./configure -macAccelerate clang && make install

...
...

Installation of AmberTools19 serial is complete at Wed 16 Oct 2019 22:31:16 CEST.

==============================================================
/amber18/src/Makefile not found, or -noamber was set.
This is expected if you do not have Amber18.
==============================================================


Workaround/solution confimed. No tests run yet and still amber18 as well as MPI/openMPI versions needs to be confirmed.


Best regards

// Gustaf

________________________________
Från: Hai Nguyen <nhai.qn.gmail.com>
Skickat: den 15 oktober 2019 17:08:11
Till: AMBER Mailing List
Ämne: Re: [AMBER] (long) OSX/catalina Ambertools19 building success with brew

On Tue, Oct 15, 2019 at 6:05 AM Tru Huynh <tru.pasteur.fr> wrote:

> Hi
>
> This works for me :P, ymmv
>
>
great. Thanks for looking at the python stuff.
Hai


> macmini:~ tru$ cd ambertools19/
> macmini:ambertools19 tru$ tar xjf ../AmberTools19.tar.bz2
>
> macmini:ambertools19 tru$ type gcc; gcc -v ; type gfortran; gfortran -v
> gcc is /usr/bin/gcc
> Configured with: --prefix=/Library/Developer/CommandLineTools/usr
> --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
> Apple clang version 11.0.0 (clang-1100.0.33.8)
> Target: x86_64-apple-darwin19.0.0
> Thread model: posix
> InstalledDir: /Library/Developer/CommandLineTools/usr/bin
> gfortran is /usr/local/bin/gfortran
> Using built-in specs.
> COLLECT_GCC=gfortran
>
> COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/9.2.0_1/libexec/gcc/x86_64-apple-darwin19/9.2.0/lto-wrapper
> Target: x86_64-apple-darwin19
> Configured with: ../configure --build=x86_64-apple-darwin19
> --prefix=/usr/local/Cellar/gcc/9.2.0_1
> --libdir=/usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9 --disable-nls
> --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran
> --program-suffix=-9 --with-gmp=/usr/local/opt/gmp
> --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc
> --with-isl=/usr/local/opt/isl --with-system-zlib
> --with-pkgversion='Homebrew GCC 9.2.0_1' --with-bugurl=
> https://github.com/Homebrew/homebrew-core/issues --disable-multilib
> --with-native-system-header-dir=/usr/include
> --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
> Thread model: posix
> gcc version 9.2.0 (Homebrew GCC 9.2.0_1)
>
> macmini:~ tru$ brew info gcc
> gcc: stable 9.2.0 (bottled), HEAD
> GNU compiler collection
> https://gcc.gnu.org/
> /usr/local/Cellar/gcc/9.2.0_1 (1,462 files, 287.9MB) *
> Poured from bottle on 2019-10-14 at 22:39:31
> From:
> https://github.com/Homebrew/homebrew-core/blob/master/Formula/gcc.rb
> ==> Dependencies
> Required: gmp ✔, isl ✔, libmpc ✔, mpfr ✔
> ==> Options
> --HEAD
> Install HEAD version
> ==> Analytics
> install: 108,250 (30 days), 252,909 (90 days), 974,587 (365 days)
> install_on_request: 53,085 (30 days), 118,718 (90 days), 462,836 (365
> days)
> build_error: 0 (30 days)
> macmini:~ tru$ brew list gcc
> /usr/local/Cellar/gcc/9.2.0_1/bin/c++-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/cpp-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/g++-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/gcc-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/gcc-ar-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/gcc-nm-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/gcc-ranlib-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/gcov-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/gcov-dump-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/gcov-tool-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/gfortran
> /usr/local/Cellar/gcc/9.2.0_1/bin/gfortran-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/x86_64-apple-darwin19-c++-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/x86_64-apple-darwin19-g++-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/x86_64-apple-darwin19-gcc-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/x86_64-apple-darwin19-gcc-9.2.0
> /usr/local/Cellar/gcc/9.2.0_1/bin/x86_64-apple-darwin19-gcc-ar-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/x86_64-apple-darwin19-gcc-nm-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/x86_64-apple-darwin19-gcc-ranlib-9
> /usr/local/Cellar/gcc/9.2.0_1/bin/x86_64-apple-darwin19-gfortran-9
> /usr/local/Cellar/gcc/9.2.0_1/include/c++/ (787 files)
> /usr/local/Cellar/gcc/9.2.0_1/lib/gcc/ (622 files)
> /usr/local/Cellar/gcc/9.2.0_1/libexec/gcc/ (13 files)
> /usr/local/Cellar/gcc/9.2.0_1/share/gcc-9.2.0/ (4 files)
> /usr/local/Cellar/gcc/9.2.0_1/share/man/ (10 files)
>
>
> macmini:amber18 tru$ ls -l /Library/Developer/CommandLineTools/*
> /Library/Developer/CommandLineTools/Library:
> total 0
> drwxr-xr-x 3 root admin 96 Aug 16 14:39 Developer
> drwxr-xr-x 3 root wheel 96 Sep 6 05:47 Frameworks
> drwxr-xr-x 3 root admin 96 Aug 16 15:04 Perl
> drwxr-xr-x 3 root wheel 96 Sep 6 05:47 PrivateFrameworks
>
> /Library/Developer/CommandLineTools/SDKs:
> total 0
> lrwxr-xr-x 1 root wheel 15 Oct 9 17:32 MacOSX.sdk -> MacOSX10.15.sdk
> drwxr-xr-x 7 root wheel 224 Jul 16 02:44 MacOSX10.14.sdk
> drwxr-xr-x 8 root wheel 256 Aug 30 08:48 MacOSX10.15.sdk
>
> /Library/Developer/CommandLineTools/usr:
> total 0
> drwxr-xr-x 124 root wheel 3968 Oct 9 17:29 bin
> drwxr-xr-x 5 root wheel 160 Sep 6 05:47 include
> drwxr-xr-x 44 root wheel 1408 Oct 9 17:29 lib
> drwxr-xr-x 6 root admin 192 Sep 6 05:51 libexec
> drwxr-xr-x 7 root admin 224 Oct 9 17:32 share
>
> macmini:amber18 tru$ sw_vers
> ProductName: Mac OS X
> ProductVersion: 10.15
> BuildVersion: 19A583
> macmini:amber18 tru$
>
>
> macmini:amber18 tru$ pwd
> /Users/tru/ambertools19/amber18
> macmini:amber18 tru$ export AMBERHOME=/Users/tru/ambertools19/amber18
>
> macmini:amber18 tru$ ./configure clang | tee configure-clang.log
> ...
> <patches>
> <miniconda>
>
>
> /Library/Developer/CommandLineTools/SDKs:
> total 0
> lrwxr-xr-x 1 root wheel 15 Oct 9 17:32 MacOSX.sdk -> MacOSX10.15.sdk
> drwxr-xr-x 7 root wheel 224 Jul 16 02:44 MacOSX10.14.sdk
> drwxr-xr-x 8 root wheel 256 Aug 30 08:48 MacOSX10.15.sdk
>
> macmini:amber18 tru$ pwd
> /Users/tru/ambertools19/amber18
> macmini:amber18 tru$ export AMBERHOME=/Users/tru/ambertools19/amber18
>
> macmini:amber18 tru$ ./configure clang | tee configure-clang.log
> ...
> <patches>
> <miniconda>
> ...
> Configuring CPPTRAJ...complete.
>
> The configuration file, config.h, was successfully created.
>
>
> --------------------------------------------------------------------------------
> Environment resource files are provided to set the proper environment
> variables to use AMBER and AmberTools. This is required to run any Python
> programs (like MMPBSA.py, ParmEd, MCPB.py, and pytraj)
>
> If you use a Bourne shell (e.g., bash, sh, zsh, etc.), source the
> /Users/tru/ambertools19/amber18/amber.sh file in your shell. Consider
> adding the line
> test -f /Users/tru/ambertools19/amber18/amber.sh && source
> /Users/tru/ambertools19/amber18/amber.sh
> to your startup file (e.g., ~/.bashrc)
>
> If you use a C shell (e.g., csh, tcsh), source the
> /Users/tru/ambertools19/amber18/amber.csh file in your shell. Consider
> adding the line
> test -f /Users/tru/ambertools19/amber18/amber.csh && source
> /Users/tru/ambertools19/amber18/amber.csh
> to your startup file (e.g., ~/.cshrc)
>
> NOTE: MacOS users might need to add the content to ~/.bash_profile file
> (You need to do the above before running 'make install')
>
> --------------------------------------------------------------------------------
>
> The next step is to source the amber.sh or amber.csh file
> (if needed, see above), and then to type 'make install'
>
> Cleaning the src directories. This may take a few moments.
> Configure complete.
>
> macmini:amber18 tru$ test -f /Users/tru/ambertools19/amber18/amber.sh &&
> source /Users/tru/ambertools19/amber18/amber.sh
> macmini:amber18 tru$ nice make install
> ...
>
> /bin/mv cestats /Users/tru/ambertools19/amber18/bin
> (cd nfe-umbrella-slice && /Library/Developer/CommandLineTools/usr/bin/make
> install)
> [NFE] CXX umbrella.cc
> [NFE] CXX dimension.cc
> [NFE] CXX utils.cc
> [NFE] CXX main.cc
> [NFE] CXX nfe-umbrella-slice
> (if [ "no" = "no" ]; then \
> /Library/Developer/CommandLineTools/usr/bin/make
> python_serial ;\
> fi;\
> )
> (cd parmed &&
> PYTHONPATH=/Users/tru/ambertools19/amber18/lib/python2.7/site-packages
> /Users/tru/ambertools19/amber18/bin/amber.python setup.py install -f
> --prefix=/Users/tru/ambertools19/amber18 > build.log)
> warning: no files found matching 'versioneer.py'
> 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/tru/ambertools19/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
> macmini:amber18 tru$
>
> That was "fixed" by adding a line in
> /Users/tru/ambertools19/amber18/AmberTools/src/parmed/setup.py
> parmed/setup.py:
> ..
> 27 def prepare_env_for_osx():
> 28 """ Prepares the environment for OS X building """
> 29 darwin_major_to_osx_map = {
> 30 '11': '10.7',
> 31 '12': '10.8',
> 32 '13': '10.9',
> 33 '14': '10.10',
> 34 '15': '10.11',
> 35 '16': '10.12',
> 36 '17': '10.13',
> 37 '18': '10.14',
> 38 '19': '10.14',
> 39 }
> ...
>
> macmini:amber18 tru$ make
> ....
> (cd pytraj && AMBERHOME=/Users/tru/ambertools19/amber18
> AMBER_PREFIX=/Users/tru/ambertools19/amber18
> PYTHONPATH=/Users/tru/ambertools19/amber18/lib/python2.7/site-packages
> /Users/tru/ambertools19/amber18/bin/amber.python setup.py install -f
> --prefix=/Users/tru/ambertools19/amber18 --disable-openmp > build.log )
> 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]
> pytraj/topology/topology.cpp:636:10: fatal error: 'ios' file not found
> #include "ios"
> ^~~~~
> 1 warning and 1 error generated.
> error: command 'clang' failed with exit status 1
> make[2]: *** [pytraj] Error 1
> make[1]: *** [serial] Error 2
> make: *** [install] Error 2
> macmini:amber18 tru$
>
> The same "fix" applied to pytraj/setup.py allows "make" to complete.
> AmberTools/src/pytraj/setup.py:
> ...
> 140 def prepare_env_for_osx():
> 141 # Copied from ParmEd
> 142 #
> https://github.com/ParmEd/ParmEd/blob/8ea11835cacbb986d76439f56bb529c83d34aa1f/setup.py#L28
> 143 """ Prepares the environment for OS X building """
> 144 darwin_major_to_osx_map = {
> 145 '11': '10.7',
> 146 '12': '10.8',
> 147 '13': '10.9',
> 148 '14': '10.10',
> 149 '15': '10.11',
> 150 '16': '10.12',
> 151 '17': '10.13',
> 152 '18': '10.14',
> 153 '19': '10.14',
> 154 }
> ...
>
> The osx tuned version also works:
> $ ./configure -macAccelerate clang && make install
>
> Next step: try to replace the line '19': '10.14' by '19': '10.15'.
>
> Cheers
>
> Tru
> --
> Tru Huynh (PhD) | mailto:tru.pasteur.fr | tel +33 1 45 68 87 37
> https://research.pasteur.fr/en/team/structural-bioinformatics/
> Institut Pasteur, 25-28 rue du Docteur Roux, 75724 Paris CEDEX 15 France
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Oct 16 2019 - 14:00:03 PDT
Custom Search