Kodomo

Пользователь

Step-by-step building MacPorts gfortran and AmberTools 1.4 in Mac OS X 10.6

http://amberonmac.blogspot.com/2009/12/step-by-step-procedure-of-macports.html http://amberonmac.blogspot.com/2010/04/step-by-step-ambertools-14-installation.html

This is what I would do if I got a brand new Mac OS X machine using gfortran to build AmberTools 1.4 on it.

  1. Install Xcode Developer Tools from Mac OS X DVD or download it at the Apple Developer Connection site (Apple ID is needed). Make sure you have installed "Unix Development" (default).
  2. Download the MacPorts 1.9.1 Disk Image or newer (http://distfiles.macports.org/MacPorts/) from the MacPorts' website.

  3. Mount the disk image and install the pkg, running the system's Installer by double-clicking on the pkg contained therein, following the on-screen instructions until completion.
  4. Open a new shell window and do later stuff in this shell, this is to make sure that changes to the environment variables have taken effect.
  5. check if your PATH environment variable really contains /opt/local/bin and/opt/local/sbin by running "echo $PATH"
  6. check upgrades to MacPorts:

    •   sudo port -v selfupdate
  7. run:
    •   sudo port install gcc44
  8. append this line to the end your ~/.bashrc
    •   export PATH=${HOME}/bin:$PATH
  9. run:
    •   export PATH=${HOME}/bin:$PATH
  10. run:
    •   sudo port install gcc_select
  11. run:
    •   sudo gcc_select mp-gcc44
      • Remember!!! If your other compiling activities are broken by gcc_select, for example you no longer are able to build iphone app with Xcode, just do "sudo gcc_select gcc42" to reset the setting.
  12. Download AmberTools from http://ambermd.org/#AmberTools (Safari will place it to ~/Downloads)

  13. Change the current directory to /usr/local:
    •    cd /usr/local
  14. Then extract the AmberTools archive you just downloaded, presumably at ~/Downloads/:

    •    sudo tar xvfj ~/Downloads/AmbeTools-1.4.tar.bz2
  15. And then fix the permission for you can build it without using root privilege:
    •    sudo chown -R $USER:$GROUP amber11
  16. Run this command and make sure to put this command to your $HOME/.bashrc:
    •    export AMBERHOME=/usr/local/amber11
  17. Change the current directory to where the configure script is:
    •    cd amber11/AmberTools/src
  18. Now it would be a good time to modify the configure script if you are required to do that because of this and that. THIS IS NORMALLY NOT NECESSARY.
    •    perl -pi -e 's/cc=gcc/cc=gcc-4/;s/g++/g++-4/g' configure
  19. Following the manual, do the configuration. This takes about 1~3 minutes to finish.
    •    ./configure -macAccelerate gnu
  20. And start to build the program:
    •    make install
    If you see any problem or message during the building process that prevent you from finishing, please report it to the Amber mail reflector.
  21. After that, change your current directory to the testing directory:
    •    cd ../test
  22. And start testing!
    •   make test
    Attention: if your other compiling activities are broken by gcc_select, for example you no longer are able to build iphone app with Xcode, just do "sudo gcc_select gcc42" to reset the setting.

Building a parallel version