Skip to content
Maxie D. Schmidt edited this page Jun 12, 2019 · 17 revisions

Installation on Mac OSX (10.14.xx)

Default: Using standardized Homebrew install procedure only

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 RNAStructVizwith the userland Homebrew 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 uninstall rnastructviz
$ brew install gtDMMB/core/RNAStructViz

If you run into problems executing the previous command, we may first need to install some other basic libraries and utilities by running the following:

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

Now to make sure that this application is always in your path, add the following to your ~/.bashrc config file and run the following from your terminal:

$ echo -e "export PATH=/usr/local/opt/rnastructviz/bin:$(PATH)" >> $HOME/.bashrc
$ source $HOME/.bashrc
$ 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.

If for some reason you run into permissions errors trying to run brew from the above commands, the next subsection provides a procedure for installing Homebrew into your local home directory where you do have permissions to install packages.

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/.bashrc

Next, we 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:

$ brew install --build-from-source gtDMMB/core/RNAStructViz

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

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

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

Prerequisites

It appears based on my recent testing that reasonably modern enough versions of Max OSX will allow for our libraries and the RNAStructViz source code to be built all with the default xcode compilers (and a little ingenuity 😄). 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. 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 applications with Homebrew

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

$ brew install cairo pkg-config git coreutils
$ brew install --build-from-source 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 verify 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.