Installing RMark on Mac OS X Yosemite or El Capitan

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Installing RMark on Mac OS X Yosemite or El Capitan

Postby david.koons@usu.edu » Thu Jan 28, 2016 10:46 pm

A number of students and I have found that when following the directions for installing RMark on a Mac, as described at http://www.phidot.org/software/mark/rmark/linux/, it has not worked with recent releases of OS X, such as Yosemite and El Capitan. However, it worked when I followed the steps about a year ago, and has continued to work as I’ve updated OS X (but I’ve been wary to update my RMark package). A particularly savvy student, Spencer Hudson, found that the problem was associated with the gfortran install. To help others, I’m outlining the full set of steps that seems to work for first-time installs on a Mac with a recent release of OS X (such as Yosemite or El Capitan).
1. Install Xcode from the App Store if not already installed on your computer
2. Instead of installing gfortran from https://gcc.gnu.org/wiki/GFortranBinaries#MacOS, which did not work for us, we had success installing GCC builds and gfortran from http://hpc.sourceforge.net/
3. From the sourceforge site, download the appropriate pair of tar.gz binary files. For OS X El Capitan these would be gcc-6.0-bin.tar.gz & gfortran-6.0-bin.tar.gz. These binaries will download into your ‘Downloads’ folder (note that this may take some time).
4. From here, there are several options for unzipping and loading. One way is to run the following lines of code in Terminal (Terminal is a command line interface that is akin to the Command Prompt in Microsoft Windows; it can be found in the Utilities folder located within your Applications folder). Be sure to pay attention to spaces, and you may be asked for your app installation password.

cd ~/Downloads

gunzip gfortran-6.0-bin.tar.gz

gunzip gcc-6.0-bin.tar.gz

sudo tar -xvf gfortran-6.0-bin.tar -C /

sudo tar -xvf gcc-6.0-bin.tar -C /

5. Now you are ready to download the zipped file containing the build of the MARK numerical routines executable from the first bulleted suggestion at http://www.phidot.org/software/mark/rmark/linux/. Extract the file mark.64.osx from mark.osx.zip (by clicking on the zip file).
6. Next, rename the file “mark” by deleting the .64.osx extension of the file name.
7. As pointed out by Arpat Ozgul in an earlier post on this Forum, copy the renamed mark file to the hidden folder /usr/local/bin. This folder can be accessed by opening your Terminal and typing:

open -a Finder /usr/local/bin

8. In Terminal, simply type “mark” (without the quotes) to make sure the file is executable. If you get the message “No input file was specified, so MARK job is done”, then everything worked!
9. Now you can finally install the RMark package from CRAN into R (https://cran.r-project.org/). Use the .tar.gz install instead of the binaries. You may need to install other packages that RMark depends upon.
david.koons@usu.edu
 
Posts: 2
Joined: Fri Oct 31, 2014 2:53 pm

Re: Installing RMark on Mac OS X Yosemite or El Capitan

Postby BBAllen » Wed Mar 02, 2016 2:16 pm

Just wanted to say Thanks for posting this! I, too, had been having trouble getting the RMark package to work. But, I am just getting my toes wet in the programming world. This post was incredibly helpful!!
Thanks again!
B~

Brian B. Allen
MS Research Assistant
Dept. of Wildlife Ecology, Fisheries, and Conservation Bio
University of Maine
BBAllen
 
Posts: 3
Joined: Tue Mar 01, 2016 2:42 pm
Location: University of Maine, Orono, ME

Re: Installing RMark on Mac OS X Yosemite or El Capitan

Postby Triciaserow » Thu Oct 06, 2016 4:56 pm

Hi,

What seemed to be the problem if I tried to execute "mark" through terminal under "usr/local/bin" and got error messages like:
Code: Select all
dyld: Library not loaded: /usr/local/lib/libquadmath.0.dylib
  Referenced from: /usr/local/bin/mark
  Reason: image not found
Abort trap: 6


I followed all the steps but only this very last one didn't work. Mark didn't work on my Macbook air. :(

My OS is Sierra. Could it be the problem? But I did get gcc-6.2-bin.tar.gz which is compatible with Sierra.

I appreciate any comments. Thanks.
Triciaserow
 
Posts: 16
Joined: Tue Oct 20, 2009 11:38 am

Re: Installing RMark on Mac OS X Yosemite or El Capitan

Postby jlaake » Thu Oct 06, 2016 5:32 pm

Have you looked at

http://www.phidot.org/forum/viewtopic.php?f=2&t=3073&p=9996&hilit=libquadmath.0.dylib#p9996

I don't know anything about Mac so may not help but this error is discussed there.
jlaake
 
Posts: 1302
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Installing RMark on Mac OS X Yosemite or El Capitan

Postby egc » Thu Oct 06, 2016 5:59 pm

Or, have a look at: viewtopic.php?f=21&t=3233

[Even better, stop using a Mac... ;-]
egc
Site Admin
 
Posts: 193
Joined: Thu May 15, 2003 3:25 pm

Re: Installing RMark on Mac OS X Yosemite or El Capitan

Postby sbonner » Tue Oct 18, 2016 9:43 pm

Having recently purchased a Mac I took Evan's comment as a challenge. The previous instructions work, but packages installed by copying and pasting as required of gcc from HPC are likely to break as files change names or move around. A beast like GCC needs to be handled by a package manager.

An up-to-date version of GCC is available from homebrew, but you need to tell mark to look for those libraries instead of using MacOS's stock clang libraries. I've created a script to do this and packaged it in a homebrew Formula along with Evan's mark binary so that it is easy to install.

1) Install homebrew:
Code: Select all
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


2) Install gcc:
Code: Select all
brew install gcc


3) Install mark:
Code: Select all
brew tap sjbonner/tap
brew install mark-on-mac


You can check that the installation has worked by running
Code: Select all
which mark

If successful you'll find mark in
Code: Select all
/usr/local/bin


There is (currently?) a slight wrinkle which is that this will break when GCC is updated via
Code: Select all
brew upgrade

However, this is fixed simply by changing the library path in the shell script.

And now you're :lol:!
sbonner
 
Posts: 64
Joined: Mon Aug 15, 2005 7:38 pm
Location: University of Western Ontario, Canada

Re: Installing RMark on Mac OS X Yosemite or El Capitan

Postby cooch » Wed Oct 19, 2016 9:21 am

Awesome -- thanks Simon. You win the 'sheesh, get a life you nerd' award for the month.

Of course, when your shell scripts accidentally reformat people's hard drives, I'll send them your way, right? ;-)

[Nah, stuff is all good. The big challenge Simon 'solves' is finding those pesky dynamic load libraries under OS/X.]
cooch
 
Posts: 1586
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: Installing RMark on Mac OS X Yosemite or El Capitan

Postby wchallen » Wed Nov 30, 2016 7:14 pm

Triciaserow wrote:My OS is Sierra. Could it be the problem? But I did get gcc-6.2-bin.tar.gz which is compatible with Sierra.

I appreciate any comments. Thanks.


Did you install both gfortran and gcc? I can confirm I got RMark working with two different macOS Sierra machines using the general method at the top of the thread. I had to reinstall both fortran and gcc (ver 6.2) after upgrading the operating system. Works fine with RStudio and RMarkdown as well.

I haven't tried Simon's method yet, but it could be another option.
wchallen
 
Posts: 5
Joined: Thu Apr 10, 2008 4:38 pm

Re: Installing RMark on Mac OS X Yosemite or El Capitan

Postby tiffanygoh » Mon Aug 10, 2020 1:08 pm

Hello :)

Currently on a macbook air, Catalina. Desperate to get RMark working on my mac.

I managed to run the lines in Terminal for the GCC builds and gfortran. However, I got an error message saying “Error exit delayed from previous errors”. I’m not sure if everything was installed right.

Then, I downloaded the MARK executable but when I unzipped the folder, only one file appeared and it was already named “mark” and it’s a TextEdit file. I copied it into the bin folder anyway and ran the lines in Terminal again only to get Permission denied.

Error message:

tar: Error exit delayed from previous errors.
Tiffanys-MacBook-Air:Downloads tiffanygoh$ open -a Finder /usr/local/bin
Tiffanys-MacBook-Air:Downloads tiffanygoh$ mark
-bash: /usr/local/bin/mark: Permission denied
Tiffanys-MacBook-Air:Downloads tiffanygoh$

Just wondering if anyone may know what the issue is? Would really appreciate your guidance.
tiffanygoh
 
Posts: 8
Joined: Mon Aug 10, 2020 10:45 am

Re: Installing RMark on Mac OS X Yosemite or El Capitan

Postby cooch » Mon Aug 10, 2020 1:50 pm

First, the file you should have downloaded is mark.64.zip. It contains 3 files: mark64.dynamic, mark64.static, and a READ.ME text file. If you browse the READ.ME file, you'll see

The .zip archive contains 2 versions of MARK (both 64-bit).

mark64.dynamic is the smaller executable, that links against various libraries
dynamically (which assumes they're installed on the computer)

mark64.static is the larger executable -- larger because the various
libraries are compiled into the executable.

To use either, simply change the name of the file to mark64 or mark
(whichever is most appropriate for your environment), and make sure it
is executable (typically, chmod +x mark64 or chmod +x mark will
suffice...).


So, there you have it. Try either the dynamic or static version (after renaming as appropriate), and then from the CLI (command line interface), simply type mark or mark64. If the system responds, then MARK is installed. After that, getting it to play nice with R and RMark is documented elsewhere.
cooch
 
Posts: 1586
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Next

Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest