[R-SIG-Mac] linking problems, solutions, and an R.app question

Daniel Merl dmm229 at cornell.edu
Thu Sep 7 01:07:37 CEST 2006


I pulled the latest binaries of R 2.4 (*R24-branch) *and R.app (Mac OS X
GUI rev. 3700 for R 2.4.xDeployment) off of http://r.research.att.com/
today (Sept 6).  Everything is fine if I use R.app to interface with R,
but if I run R from the command line I get the following undefined
symbol errors, which have been reported elsewhere:


Error in dyn.load(x, as.logical(local), as.logical(now)) :
        unable to load shared library
'/Library/Frameworks/R.framework/Resources/library/grDevices/libs/ppc/grDevices.so':
 
dlopen(/Library/Frameworks/R.framework/Resources/library/grDevices/libs/ppc/grDevices.so,
6): Symbol not found: ___mulsc3
  Referenced from:
/Library/Frameworks/R.framework/Versions/2.4/Resources/lib/libgfortran.0.dylib
  Expected in: flat namespace
Loading required package: grDevices
Error in dyn.load(x, as.logical(local), as.logical(now)) :
        unable to load shared library
'/Library/Frameworks/R.framework/Resources/library/grDevices/libs/ppc/grDevices.so':
 
dlopen(/Library/Frameworks/R.framework/Resources/library/grDevices/libs/ppc/grDevices.so,
6): Symbol not found: ___mulsc3
  Referenced from:
/Library/Frameworks/R.framework/Versions/2.4/Resources/lib/libgfortran.0.dylib
  Expected in: flat namespace
In addition: Warning message:
package grDevices in options("defaultPackages") was not found
Error: package 'grDevices' could not be loaded


I assume this is some problem with the the libgfortran.0.dylib library
that is included with R?  It doesn't seem to be fatal, and everything
seems to work fine through R.app, but it bugged me.  So I pulled the 2.4
source code from CRAN
(http://cran.r-project.org/src/base-prerelease/R-latest.tar.gz).  I
compiled it using the latest gcc and gfortran 4.2 compilers from HPC,
and voila.  It compiled fine, and I installed the newly built version
over the downloaded version, and now R seems to launch without error
from both the command line and R.app.

My question is, why would this linking problem exist on the comand line
and not in the GUI?  Does the GUI specify certain environment variables
that override those present when you run the command line, or better
yet,  in what way is the GUI linked to a particular R executable?  Was
there a shorter solution to this, such as sym-linking to
/usr/local/gcc4.0/lib/libgfortran.0.dylib?

many thanks.
-dan

-- 
Daniel Merl
Dept of Mathematics           
Cornell University



More information about the R-SIG-Mac mailing list