2

I am trying to install the package RSymphony using RStudio in my MAC (to afterwards be able to install the package fPortfolio). After accepting with "Y" to install the package from the source, I get the message:

> package 'Rsymphony' successfully unpacked and MD5 sums checked

> Cannot find SYMPHONY libraries and headers.

> See <https://projects.coin-or.org/SYMPHONY>.

> ERROR: configuration failed for package 'Rsymphony'

> removing '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rsymphony'

> Warning in install.packages:
> installation of package 'Rsymphony' had non-zero exit status

I tried all the suggestions from other answers in this blog (e.g. using Homebrew, installing Xcode, etc.):

> brew tap coin-or-tools/coinor

> brew install symphony

> brew install pkg-config

But I still get the same ERROR message. The one way I was successful was installing the same package in a Windows environment (via Parallels).

Thank you.

2

2 Answers 2

2

I got lots of help from the folks at https://github.com/coin-or-tools/homebrew-coinor, specifically Ted Ralphs. Here's what he figured out:

OK, I got RSymphony to install, but it involved some hacking. For now, first grab and unpack the source with

wget https://cran.revolutionanalytics.com/src/contrib/Rsymphony_0.1-25.tar.gz
tar -xzvf Rsymphony_0.1-25.tar.gz

Now edit Rsymphony/configure and comment out the test for finding SYMPHONY libraries and headers, which is broken (not sure yet how to fix it).

#if test ${status} -ne 0; then
#  echo "Cannot find SYMPHONY libraries and headers."
#  echo "See <https://projects.coin-or.org/SYMPHONY>."
#  exit 1
#fi

Next edit Rsymphony/R_symphony.cc and change

#include <coin/symphony.h>

to

#include <symphony.h>

Finally, do

r CMD install Rsymphony

It worked for me, but if there are any additional errors they should be easy to fix. I'll try to report this to the Rsymphony guys and see if we can get it fixed.

In addition, I had to fix my fortran. These links helped with that:

  1. http://thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error/

  2. OSX Installing Rsymphony - linking headers and libs

3
  • rrs: Thank you for your help. I got trouble starting with the first line of your proposed solution: "wget" is not a recognised command in my terminal (Mac). Is the solution you are proposing to be run via Terminal?
    – 4rtur0
    Feb 18, 2017 at 17:33
  • Yes, these commands are run on the terminal. I probably installed wget using homebrew.
    – rrs
    Feb 20, 2017 at 17:19
  • 1
    After I edit those two files, it shows "MD5 checksum error", did you experience this also?
    – MIMIGA
    May 7, 2018 at 18:44
1

The above suggestion worked great for me with the edits of:

brew install wget

wget https://cran.revolutionanalytics.com/src/contrib/Rsymphony_0.1-28.tar.gz

tar -xzvf Rsymphony_0.1-28.tar.gz

And I found the /R_symphony.cc in the src folder. Thanks!!!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.