last updated at April 1, 2021

Dennou Tools for macOS

Examples of how to install Dennou Tools in macOS

Updates

Introduction

This page describes examples of how to install Dennou Tools in macOS.
DCL/C-DCL and their dependent libraries are installed by using MacPorts. Ruby is installed from rbenv and Ruby libraries are installed from RubyGems.

Do not install both Homebrew and MacPorts in the same system.
Some unexpected conflicts and errors may occur if both are installed together.

If you have any troubles or questions, contact Hiroki Kashimura <hiroki _(at)_ gfd-dennou.org>.

Installation steps

  1. Install Xcode from Mac App Store.
  2. In Terminal.app, execute
    $ xcode-select --install
    
    to install the Xcode command line tools.
  3. Next type
    $ sudo xcodebuild -license
    
    to agree the license of Xcode.
  4. Download XQuartz-*-*-*.dmg and install XQuartz.app。
  5. Download MacPorts-*-*-*.pkg and install MacPorts.
  6. Update the ports tree of MacPorts.
    $ sudo port selfupdate 
    
  7. Download the Portfile for DCL and install DCL.
    $ mkdir -p ~/MacPorts/DCL7
    $ cd ~/MacPorts/DCL7
    $ curl -O http://www.gfd-dennou.org/library/ruby/products/macos/macports/DCL7/Portfile
    $ sudo port install 
    
  8. Download the Portfile for C-DCL and install C-DCL.
    $ mkdir -p ~/MacPorts/C-DCL7
    $ cd ~/MacPorts/C-DCL7
    $ curl -O http://www.gfd-dennou.org/library/ruby/products/macos/macports/C-DCL7/Portfile
    $ sudo port install 
    
  9. Install GPhys-dependent non-Ruby library via.
    $ sudo port install fftw-3 gsl netcdf
    
  10. Install rbenv.
    $ sudo port install rbenv ruby-build 
    
  11. Install Ruby by using rbenv. (Set CC to use gcc-mp-9.)
    $ export CC=gcc-mp-9
    $ rbenv install 2.6.6 
    $ rbenv global 2.6.6
    $ rbenv versions
    
  12. Add the following lines to .profile to set $PATH.
      export PATH="$HOME/.rbenv:$PATH"
      eval "$(rbenv init - bash)" 
    
  13. Reboot Terminal.app
  14. Verify which version of ruby is set for default now.
    $ ruby --version
    
  15. Install Dennou-Ruby Tools from RubyGems.
    $ gem install ruby-dcl
    $ gem install ruby-fftw3 -- --with-fftw3-dir=/opt/local/
    $ gem install gphys
    
  16. Activate newly installed ruby commands.
    $ rbenv rehash 
    

Contact

Hiroki Kashimura
hiroki (at) gfd-dennou.org


This document was translated from LATEX by HEVEA.