Building with R 3.1.2 - CRAN distro - on OSX Yosemite

61 views
Skip to first unread message

Erich Neuwirth

unread,
Jan 19, 2015, 8:39:29 AM1/19/15
to cra...@googlegroups.com
I am trying to build cranvas on Yosemite.
I want to avoid installing R with homebrew.
So I installed Qt 5.4.0 from  http://www.qt.io and Cmake 3.1.0 from http://www.cmake.org.
I added the following entries to .bash_profile


PATH="/Users/neuwirth/Qt5.4.0/5.4/clang_64/bin:/Applications/CMake.app/Contents/bin:${PATH}"
export PATH

LIBRARY_PATH
="/Users/neuwirth/Qt5.4.0/Qt Creator.app/Contents/Frameworks/:${LIBRARY_PATH}"
export LIBRARY_PATH

LD_LIBRARY_PATH
="/Users/neuwirth/Qt5.4.0/Qt Creator.app/Contents/Frameworks/:${LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH

Then, I started R from a Terminal window and checked for the paths.


> system("echo $PATH")
/Users/neuwirth/Qt5.4.0/5.4/clang_64/bin:/Applications/CMake.app/Contents/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/texbin

> system("echo $LIBRARY_PATH")
/Users/neuwirth/Qt5.4.0/Qt Creator.app/Contents/Frameworks/:

> system("echo $LD_LIBRARY_PATH")
/Users/neuwirth/Qt5.4.0/Qt Creator.app/Contents/Frameworks/:



So R knows about the appropriate path.

When I then try


> install_github('ggobi/qtbase')

I get the following error:

dyld: Library not loaded: /opt/local/lib/libz.1.dylib

  Referenced from: /Users/neuwirth/Qt5.4.0/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore

  Reason: image not found


I do not understand what is going on here since I libz.1.dylib exists on LD_LIBRARY_PATH and LIBRARY_PATH

Any hints to solve this problem?

Dianne Cook

unread,
Jan 19, 2015, 9:06:17 AM1/19/15
to cra...@googlegroups.com
Hi Erich,

I now have a machine running Yosemite, so I will be trying this soon myself.

cheers,
Di
> --
> You received this message because you are subscribed to the Google Groups "cranvas" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cranvas+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

---------------------------
Di Cook
vis...@gmail.com



Erich Neuwirth

unread,
Jan 19, 2015, 1:20:08 PM1/19/15
to cra...@googlegroups.com

I managed to get things running on Yosemite.

I installed Qt 5.4.0 from  http://www.qt.io and Cmake 3.1.0 from http://www.cmake.org.
I added the following entries to .bash_profile

PATH="/Users/neuwirth/Qt5.4.0/5.4/clang_64/bin:/Applications/CMake.app/Contents/bin:${PATH}"
export PATH

Then I created /opt/local/lib on the machine where it did not exist,
and on this machine and on another where it existed already, I ran

sudo ln -s /usr/lib/libxslt.1.dylib /opt/local/lib/libxslt.1.dylib
sudo ln
-s /usr/lib/libz.1.dylib /opt/local/lib/libz.1.dylib
sudo ln
-s /usr/lib/libsqlite3.0.dylib /opt/local/lib/libsqlite3.0.dylib


Then I startet R in a terminal  window (with sudo) and than the commands in the installation instructions,

only changing 


  install_github('ggobi/qtbase@qt4');
to
  install_github('ggobi/qtbase');


Then, I could run the examples in command line R and in RStudio.




Yihui Xie

unread,
Jan 19, 2015, 1:37:16 PM1/19/15
to cra...@googlegroups.com
Nice. The last time I tried it on Mac OS X, I was using Homebrew
(http://cranvas.org/download.html#install-qt-under-mac-os-x), which I
believe is much much easier to manage software packages for developers
than manually downloading and configuring them. Anyway, if the
traditional way works for you, you may just use it.

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Web: http://yihui.name
Reply all
Reply to author
Forward
0 new messages