Skip to content
Maxie D. Schmidt edited this page Jul 21, 2019 · 17 revisions

Installation on Mac OSX

Picking an install procedure

There are basically three routes to installing RNAStructViz on a Mac:

  1. Use the Homebrew formulas provided in the gtDMMB tap repository to automate the install process
  2. Install from source with sudo command access
  3. Perform a local install of RNAStructViz and its core dependencies in the user's home directory without sudo access

The route you choose to get RNAStructViz up and running depends on your needs and the capabilities of your system. By far, the most straightforward method to install the software is to use the brew packages we have prepared for OSX users. Ask yourself the following question: Should I use a brew install method on my system? If you already have Homebrew installed and configured on your box, then the answer is probably "Yes". In fact, this is the recommended install procedure for Mac users. Users who do not have Homebrew installed, but still wish to avoid the longer path of compilation of RNAStructViz from source, will need to consult these documents (or below) to first get the brew package management utility running on their Mac system.

Unfortunately, due to the particular needs of recent Mac users for compiling the FLTK library, it is not possible to use these brew formulas on Linux with a working install of linux-brew. Developers who wish to hack and modify the RNAStructViz source code in C++ will need to perform a from-source install of RNAStructViz (at minimum), and possibly its dependencies if they are not already installed on your target Mac system. Users who require a local installation without sudo access or brew can consult and modify the install procedures for generic Unix systems found here.

Default: Using the Homebrew install procedure

A good reference for Homebrew on a Mac is this FAQ. Note that the following command should be all that you need to run on Mac OSX to install RNAStructViz with the userland brew utility already pre-installed on your machine:

$ brew install gtDMMB/core/RNAStructViz

Note that if you have previously installed an earlier version of RNAStructViz it may be necessary to run the following commands instead to upgrade to the latest release:

$ brew tap gtDMMB/homebrew-core
$ brew update
$ brew reinstall --verbose gtDMMB/core/RNAStructViz

Now to make sure that this application is always in your path, add the following to your local ~/.bash_profile configuration file and by running the following from your terminal instance:

$ echo -e "export PATH=/usr/local/opt/rnastructviz/bin:$(PATH)" >> $HOME/.bash_profile
$ source $HOME/.bash_profile
$ which RNAStructViz
/usr/local/opt/rnastructviz/bin/RNAStructViz

Assuming all went smoothly with the above instructions, you can now run the application by typing RNAStructViz at your terminal.

Alternate install procedure: Installing brew packages into a user's home directory

Run the following commands to install the core Homebrew formulas:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
$ cd $HOME
$ git clone https://github.com/mxcl/homebrew.git
$ export PATH=${HOME}/homebrew/bin:${PATH}
$ echo "export PATH=${HOME}/homebrew/bin:${PATH}" >> $HOME/.bash_profile

We now need to re-install any previously installed brew packages (this could take a while):

$ export PREVPKGS=`brew list | tr '\r\n' ' '`
$ brew install $PREVPKGS

Finally, we can go back to the previous section and install RNAStructViz as before:

$ brew tap gtDMMB/homebrew-core
$ brew install --build-from-source --verbose gtDMMB/core/RNAStructViz

Debugging a problematic brew install

If you run into any problems with the above setup as well, try running:

$ brew update && brew upgrade && brew cleanup
$ brew doctor

Install errors or problems that still persist on your Mac OSX 10.14.xx (or above) system can be reported to the developers of RNAStructViz by opening a new bug report issue.

Mac OSX using Homebrew FLTK (with-cairo) and RNAStructViz from source

Prerequisites

It appears based on recent testing that reasonably modern enough versions of Mac OSX (>= 10.14.xx) will allow for our libraries and the RNAStructViz source code to be built all with the default xcode compilers. First, some prerequisites from the test machine's xcode installation. Make sure that you can at least run the following commands for reference:

$ which clang
/usr/bin/clang
$ which gcc
/usr/bin/gcc
$ clang --version -v
Apple LLVM version 10.0.0 (clang-1000.10.44.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

If your output does not match the above, still proceed with the install instructions as small differences are to be expected. We are working to test the install process on as many recent versions of OSX as possible, so your setup may still very well be sufficient to install our required libraries to run the application.

Installing dependencies with Homebrew

We need to install some other basic libraries and utilities with the userland Homebrew already installed on your machine:

$ brew install cairo pkg-config git coreutils
$ brew install --build-from-source --verbose gtDMMB/core/fltkwithcairo

Now we need to add the new FLTK libraries into our PATH:

$ export PATH="/usr/local/opt/fltkwithcairo/bin:$PATH"
$ echo $PATH

You can check that the install was successful by verifying that the following output is sane:

$ which fltk-config
/usr/local/opt/fltkwithcairo/bin/fltk-config
$ fltk-config --use-gl --use-glut --use-forms --use-images --use-cairo --ldstaticflags --cxxflags
-I/usr/local/Cellar/fltkwithcairo/1.4.x-r13071/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT
/usr/local/Cellar/fltkwithcairo/1.4.x-r13071/lib/libfltk_cairo.a -lcairo -lpixman-1 /usr/local/Cellar/fltkwithcairo/1.4.x-r13071/lib/libfltk_images.a -ljpeg -lpng -lz /usr/local/Cellar/fltkwithcairo/1.4.x-r13071/lib/libfltk_gl.a -framework OpenGL /usr/local/Cellar/fltkwithcairo/1.4.x-r13071/lib/libfltk_forms.a /usr/local/Cellar/fltkwithcairo/1.4.x-r13071/lib/libfltk.a -lpthread -framework Cocoa

That's it! Now on to building RNAStructViz from source in the Linux-Unix install documentation.