Compiling the GSL Library for OSX

A short description of the post.

Rodney Dyer https://dyerlab.org (Center for Environmental Studies)https://ces.vcu.edu
2015-07-29

I’ve been working on integrating the Swift language into my analysis workflow but much of what I do involves the GNU Scientific Libraries for matrix analysis and other tools. Here is a quick tutorial on how to install the GSL library on a clean OSX platform.

  1. It is easiest if you have XCode installed. You can get this from the App Store for free. Go download it and install it.
  2. Download the latest version of the GSL libraries. You can grab them by:
    1. Looking for your nearest mirror site listed at http://www.gnu.org/prep/ftp.html and connecting to it.
    2. Open the directory gsl/ where all the versions will be listed. Scroll down and grab gsl-latest.tar.gz.
  3. Open the terminal (Utilities -> Terminal.app) and type: cd ~/Downloads
  4. Unpack the archive by: tar zxvf gsl-latest.tar.gz then cd gsl-1.16/ (or whatever the version actually was, it will probably be some number larger than 1.16).
  5. Inside that folder will be a README file (which you probably won’t read) and an INSTALL file (which you should read). In that folder it will tell you to: ./configure then make then sudo make install. This last command will require you to type in your password as it is going to install something into the base system.
  6. All the libraries and header files will be installed into the /usr/local/ directory.

Citation

For attribution, please cite this work as

Dyer (2015, July 29). The Dyer Laboratory: Compiling the GSL Library for OSX. Retrieved from https://dyerlab.github.io/DLabWebsite/posts/2015-07-29-compiling-the-gsl-library-for-osx/

BibTeX citation

@misc{dyer2015compiling,
  author = {Dyer, Rodney},
  title = {The Dyer Laboratory: Compiling the GSL Library for OSX},
  url = {https://dyerlab.github.io/DLabWebsite/posts/2015-07-29-compiling-the-gsl-library-for-osx/},
  year = {2015}
}