none
Error with 3.3.1 on mac os x RRS feed

  • Question

  • I just installed 3.3.1 and get the following error when it opens.

    Warning message:
    In doTryCatch(return(expr), name, parentenv, handler) :
      unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
      dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded: /opt/X11/lib/libXt.7.dylib
      Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
      Reason: image not found

    Thursday, August 25, 2016 10:58 PM

All replies

  • I believe you need to install XQuartz for this to work, for the normal R installation it's optional but MRO 3.3.1 seems to require it.

    https://mran.revolutionanalytics.com/documents/rro/installation/#revorinst-osx

    https://www.xquartz.org/

    • Proposed as answer by bing-h Friday, August 26, 2016 2:29 PM
    Friday, August 26, 2016 2:29 PM
  • I have the same issue. XQuartz already installed.

    Reinstalled Xquartx, reinstalled MRO, no change

    Saturday, August 27, 2016 5:24 PM
  • Having multiple issues accessing non-default (user defined) libraries with R after updating to this version. Installing Xquartx did not help.

    1. Cannot load libraries in the user library, system library works fine.
    2. Cannot update packages in the user library
    3. Cannot install packages to user library


    Saturday, August 27, 2016 8:19 PM
  • I have the same issue. The library is there. I have the most recent version of XQuartz. It seems a plausible explanation is that R 3.3.1 has been compiled with another version of XQuartz.
    Monday, August 29, 2016 11:09 AM
  • Hi, Jake,

    The XQuartz-2.7.9.dmg package from xquartz.org should install both a libXt.6.dylib and a libXt.7.dylib to /opt/X11/lib/. We have tested this on multiple systems with a variety of OS versions from 10.9 – 10.11. Make sure you are installing X11 via this method instead of through brew, or another package manager.

     

    If this does not resolve your issue can you provide the directory listing from /opt/X11/lib? Do you have any dylibs associated with XQuartz / X11?

    Cheers,

    Rich Calaway

    Microsoft R Release Manager

    Monday, August 29, 2016 4:37 PM
  • I reinstalled XQuartz from the website and it appears to have fixed the error upon start up. However, I still get the problem when trying to install from bioconductor. 

    source("https://bioconductor.org/biocLite.R")
    Installing package into ‘/Users/Jake/Library/R/3.3/library’
    (as ‘lib’ is unspecified)
    trying URL 'https://bioconductor.org/packages/3.3/bioc/src/contrib/BiocInstaller_1.22.3.tar.gz'
    Content type 'application/x-gzip' length 16302 bytes (15 KB)
    ==================================================
    downloaded 15 KB

    Warning message:
    In doTryCatch(return(expr), name, parentenv, handler) :
      unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
      dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Symbol not found: _CGBitmapContextCreate
      Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
      Expected in: flat namespace
     in /Library/Frameworks/R.framework/Resources/modules//R_X11.so

    • Edited by Jake2016 Monday, August 29, 2016 5:48 PM
    Monday, August 29, 2016 5:45 PM
  • I'm still getting this same error as well. Uninstalled homebrew version with `brew cask uninstall xquartz --force`

    reistalled the version from xquartz.org but still seeing the linker issues Jake posted

    Monday, August 29, 2016 7:49 PM
  • Does this warning actually prevent the package from being installed? We have seen this warning, but in our testing it doesn't prevent tasks from actually being completed. We will continue to investigate to see if we can eliminate this warning.

    Cheers,

    Rich Calaway

    Microsoft R Release Manager

    Monday, August 29, 2016 10:46 PM
  • Installed X11 from xquartz.org just now. 

    ~ 516>ls -ld /opt/X11/lib/libXt.*
    -rwxr-xr-x  1 root   wheel  725856 May  5 10:33 /opt/X11/lib/libXt.6.dylib
    -rwxr-xr-x  1 root   wheel  694640 May  5 10:33 /opt/X11/lib/libXt.7.dylib
    lrwxr-xr-x  1 roffe  wheel      13 Aug 28 21:54 /opt/X11/lib/libXt.dylib -> libXt.7.dylib

    Same problem:

    Microsoft R Open 3.3.1
    The enhanced R distribution from Microsoft
    Microsoft packages Copyright (C) 2016 Microsoft Corporation
    
    Multithreaded BLAS/LAPACK libraries detected. Using 2 cores for math algorithms.
    
    Default CRAN mirror snapshot taken on 2016-07-01. See: https://mran.microsoft.com/.
    Warning message:
    In doTryCatch(return(expr), name, parentenv, handler) :
      unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
      dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Symbol not found: _CGBitmapContextCreate
      Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
      Expected in: flat namespace
     in /Library/Frameworks/R.framework/Resources/modules//R_X11.so



    • Edited by Rolf Marvin Bøe Lindgren Tuesday, August 30, 2016 8:16 AM
    • Proposed as answer by AJWije Wednesday, September 14, 2016 1:03 AM
    • Unproposed as answer by AJWije Wednesday, September 14, 2016 1:03 AM
    Tuesday, August 30, 2016 8:16 AM
  • I am experiencing the same error. OS X 10.10.5 XQuartz was installed from Quartz-2.7.9.dmg from xquarz.org.

    Microsoft R Open 3.3.1

    The enhanced R distribution from Microsoft

    Microsoft packages Copyright (C) 2016 Microsoft Corporation

    Multithreaded BLAS/LAPACK libraries detected. Using 12 cores for math algorithms.

    Default CRAN mirror snapshot taken on 2016-07-01. See: https://mran.microsoft.com/.

    Warning message:

    In doTryCatch(return(expr), name, parentenv, handler) :

      unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':

      dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Symbol not found: _CGBitmapContextCreate

      Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so

      Expected in: flat namespace

     in /Library/Frameworks/R.framework/Resources/modules//R_X11.so

    [Previously saved workspace restored]


    X11 installation.

    toshishioda@mpl-server6:~$ ls -ld /opt/X11/lib/libXt.*

    -rwxr-xr-x  1 root         wheel  725856 May  5 04:33 /opt/X11/lib/libXt.6.dylib

    -rwxr-xr-x  1 root         wheel  694640 May  5 04:33 /opt/X11/lib/libXt.7.dylib

    lrwxr-xr-x  1 toshishioda  wheel      13 Sep  1 12:29 /opt/X11/lib/libXt.dylib -> libXt.7.dylib

    Bioconductor package installation gives the same error, but the package seems to have been installed.

    * installing *source* package ‘AnnotationDbi’ ...
    ** R
    ** inst
    ** preparing package for lazy loading
    Creating a new generic function for ‘packageName’ in package ‘AnnotationDbi’
    Creating a generic function for ‘toString’ from package ‘base’ in package ‘AnnotationDbi’
    Creating a generic function for ‘ls’ from package ‘base’ in package ‘AnnotationDbi’
    Creating a generic function for ‘eapply’ from package ‘base’ in package ‘AnnotationDbi’
    Creating a generic function for ‘exists’ from package ‘base’ in package ‘AnnotationDbi’
    Creating a generic function for ‘sample’ from package ‘base’ in package ‘AnnotationDbi’
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    Warning message:
    In doTryCatch(return(expr), name, parentenv, handler) :
      unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
      dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Symbol not found: _CGBitmapContextCreate
      Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
      Expected in: flat namespace
     in /Library/Frameworks/R.framework/Resources/modules//R_X11.so
    * DONE (AnnotationDbi)

    > library("AnnotationDbi", lib.loc="~/Library/R/3.3/library")

    Thursday, September 1, 2016 10:08 PM
  • Update for my previous report.

    Although some Bioconductor packages were successfully installed with MRO 3.3.1, some did not work. For example, the following command was aborted at a very early stage of installation:

    library(devtools)
    install_github("al2na/methylKit", build_vignettes=FALSE, 
    repos=BiocInstaller::biocinstallRepos(),
    dependencies=TRUE)

    I removed MRO 3.3.1 completely and installed CRAN R 3.3.1 (https://cran.r-project.org/bin/macosx/) from R-3.3.1pkg. The above package installation worked without an error.

    Then I removed CRAN R 3.3.1 completely and re-installed MRO 3.3.1 from a freshly downloaded package. But the above command stopped with errors.

    Then I removed MRO 3.3.1 completely and re-installed CRAN R 3.3.1. The above command completed without an error.

    I am not going into details of the errors with MRO 3.3.1 because I have an urgent task to be completed with the above mentioned package. I have to work with CRAN R 3.3.1 for now but hope this MRO 3.3.1 issue will be solved soon.

    Friday, September 2, 2016 5:26 PM
  • For what is worth, I am seeing a different behavior than in 3.3.0. When MRO starts in MacOS, the XQuartz icon is also displayed in the ribbon and stays all the time even after closing MRO. Previously it never showed up.

    Saturday, September 3, 2016 7:08 AM
  • Thanks for the report, Toshi.

    We have been unable to reproduce the problem with the al2na/methylKit installation; on our Mac test systems, the package installs with the warning above, but no errors, and the package loads successfully.

    We have created a build that no longer shows the warning, but without an actual error to compare with, we are unable to verify that it will resolve your issue. If you could share the actual output from the above commands at your convenience, it would be a help.

    Cheers,

    Rich Calaway

    Microsoft R Release Manager

    Wednesday, September 7, 2016 9:10 PM
  • I am having the same problem with the same error messages as shown above by others.

    I have uninstalled MRO, then freshly downloaded XQuartz 2.7.9 and MRO 3.3.1 and installed.

    Error messages persist.

    Particularly unable to install knitr.

    Additionally have the following message:

    Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

    Don't recall seeing this message before.

    Working on laptop as sole user.

    Thursday, September 8, 2016 10:27 AM
  • Just wondering if there are any updates or resolution of this issue?
    Monday, September 19, 2016 8:32 PM
  • I had the same problem. Reinstall and reboot of Xquartz failed for me. The only solution I found was to use the CRAN version of 3.3.1 and all package install and other errors disappeared.
    Thursday, September 22, 2016 2:04 PM
  • I take that partially back as some packages are causing fatal crashes of R. So, I deleted all instances of current and past R frameworks and RStudio. Reinstalled RStudio and CRAN R 3.3.1. Packages are installing with out error, except for agRee which seems to rely on OpenBUGS which fails to install. Things seems to be working now.

    Thursday, September 22, 2016 2:07 PM
  • Hi, it appears that the MRO 3.3.1 build is broken related to x11 libraries. You can effectively have similar functionality by installing CRAN R 3.3.1 and doing the following:

    1. Install "checkpoint" package

    2. Link to the Apple Accelerate vecLib in the command prompt

    ln -sf  /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib /Library/Frameworks/R.framework/Resources/lib/libRblas.dylib

    I've confirmed functional BLAS with vecLib with R benchmark.

    http://r.research.att.com/benchmarks/R-benchmark-25.R

    Tuesday, October 25, 2016 4:38 PM
  • This warning can be safely ignored for now. You will get this warning if you attempt to load an R package that needs to load 'R_X11.so'. One way to avoid the error is to only install R packages via the 'install.packages()' command as opposed to using the 'install_github()' function from the devtools package - we haven't seen this behavior for packages installed using 'install.packages()'.

    We will be incorporating a fix for this problem in a patch for Microsoft R Open 3.3.1 that you should be able to download early next week from the following website:

    https://mran.microsoft.com/open/

    Stephen Weller

    Microsoft R Product Team

    Tuesday, October 25, 2016 9:53 PM
  • Hi,

    Re-installed R open 3.3.1 for Mac, R studio, & XQuartz 2.7.10. Also I've constantly used "install.packages()" but just could not make it work due to the "R_X11.so" issue. 

    See the messages below all day

    Warning message:
    In doTryCatch(return(expr), name, parentenv, handler) :
      unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
      dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Symbol not found: _CGBitmapContextCreate
      Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
      Expected in: flat namespace
     in /Library/Frameworks/R.framework/Resources/modules//R_X11.so
    ERROR: failed to lock directory ‘/Users/hchuang/Library/R/3.3/library’ for modifying

    A patch to this will really be a life saver. Thanks.

    Wednesday, October 26, 2016 2:27 PM
  • Relevant question on SO: http://stackoverflow.com/questions/39618269. According to RStudio's Kevin Ushey:

    Microsoft is shipping you broken software that does not contain links to the libraries providing the symbols it needs.

    A little harsh but a patch for this issue would be greatly appreciated.
    • Edited by AaronWolen Tuesday, November 1, 2016 1:13 PM
    Tuesday, November 1, 2016 1:10 PM
  • This is happening again in 3.3.2, macOS platform.

    After launching MRO, the XQuartz app starts in the background and shows up in the ribbon. Previously XQuartz didn't show up in the ribbon.

    Reproduced in a new MacBook, no prior R or MRO installations.

    Tuesday, November 29, 2016 11:30 PM
  • So here's my take on this issue after installing MRO 3.2.2 today as well as the latest version of XQuartz 2.7.11

    The problem is NOT with XQuartz, as far as I can tell, but with the Microsoft R Open app, which is a wrapper over an X console. It doesn't matter whether you have the brew version or the dowloaded version, the R Open app won't work. It crashes as it comes up and gets stuck. You have to force quit the app.My guess is the problem is an incompatibility in the libraries of the latest version of XQuartz with the R Open app.

    Moreover, it's obvious that whoever is doing this over at Microsoft isn't a full time Mac developer. Brew is the tool of choice for Mac developers and it's silly that Microsoft didn't try to get it to work with the brew version. It actually doesn't make much sense to me, since brew is deploying the package to the exact same directory /opt/X11 and it is using the exact same software under the hood as far as I can tell.

    But honestly, who wants to work with R in X console on a Mac when there are so many better options? If you run MRO in the Mac terminal it works great. It also works in RStudio and you can run it in Jupyter. So my suggestion is just install MRO, drag the MRO app into the trash and enjoy a Mac native experience by using other options. But you do need XQuartz for RStudio - so yea install with brew :)

    • Proposed as answer by AronT-Emelai Tuesday, December 20, 2016 2:04 AM
    Tuesday, December 20, 2016 2:03 AM
  • PS Microsoft seems to have done something new in this new version: they over-write the /usr/local/bin link for R with a link to their version! If you want the brew version as well here's what you need to do:

    1. re-link the /usr/local to the brew version

    ln -s  /usr/local/Cellar/r/3.3.2/bin/R /usr/local/bin/R

    2. before you run R Studio do the following, depending on which you want to use:

    export RSTUDIO_WHICH_R=/Library/Frameworks/R.framework/R or export RSTUDIO_WHICH_R=/usr/local/bin/R

    Then you can run rstudio directly from terminal with this command:

    open /Applications/RStudio.app/

    Also if you like, you can create another link in /usr/local/bin to easily run MRO in the terminal:

    ln -s  /Library/Frameworks/R.framework/R /usr/local/bin/MRO

    Tuesday, December 20, 2016 2:16 AM
  • Whoops. Made a mistake on the last point. It should be:

    ln -s /Library/Frameworks/R.framework/Versions/Current/Resources/R /usr/local/bin/MRO

    Tuesday, December 20, 2016 2:22 AM