Unable to load the Rcpp Package in Windows Server 2008

I have been trying to load the most recent version of the Rcpp package (GIT version XXXX) on a Windows Server 2008 R2 platform. When I do so I get the following error:

> library(Rcpp)
Error : .onLoad failed in load Namespace() for 'Rcpp', details:
  call: new_dummyObject(.dummyInstancePointer)
  error: object 'class__dummyInstance' not found
In addition: Warning message:
package 'Rcpp' was built under R version 3.0.3
Error: package or namespace load failed for 'Rcpp'

I have discussed this with one of the package authors on GitHub and we have determined that it is most likely a local issue. (That being said after more careful investigation, the problem in that post is not exactly the same as what I am getting) I am able to load the same package using Windows Server 2003 using R version 3.0.1 and 3.0.3. I am coping portions of the linked post here for convenience. The procedure that I followed to generate the package was the following:

  1. Downloaded the most recent master code from Github (Should be commit 5b510ed)
  2. Uncompressed the zip file in a temporary directory and rename ‘Rcpp-master’ to ‘Rcpp’
  3. Installed Rtools version 3.1
  4. Ensured that RTools bin and the related gcc bin directory was at the beginning of my path
  5. Used the command “R CMD BUILD Rcpp” to generate the Rcpp_0.11.1.2.tar.gz file
  6. Use the command “R CMD INSTALL –build –compile-both Rcpp_0.11.1.2.tar.gz to generate the Rcpp_0.11.1.2.zip
  7. Copy the resulting zip archive to the Windows Server 2008 machine
  8. Used the R native install local package to install the Rcpp package

Based on the package authors suggestion, I looked at the .libPaths() output on both the working and the not working R versions. In both cases the output was exactly the same:

[1] "\\\\vnxserver/home/MYACCT/My Documents/R/win-library/3.0"
[2] "C:/Program Files/R/R-3.0.2/library"

I am really at a loss for what to try next in the debugging chain and I am hopeful that some of the SO community can point me in the right direction. (That is why I am kind of reposting here). Any comments are welcome.

Though I posted it in the paragraph earlier, it might not be clear that the related discussion on GitHub is at https://github.com/RcppCore/Rcpp/issues/147

  • How to effectively use git repositories / submodules for a C++ product that has many dependencies?
  • How can I access a subversion repository using a local path in Windows?
  • Public key issue with command line in sourceTree (git )
  • How to use gitk with msys2?
  • Setup Git without SSH
  • How to create Git repository accessible via ssh on Windows?
  • How to register newly mounted drive in git bash?
  • Do I need a github to have a locale source control?
  • One Solution collect form web for “Unable to load the Rcpp Package in Windows Server 2008”

    After working to properly debug the problem, the issue was with Windows in the long run. Our security administraitors had setup the permissions of the system such that dll files could not be loaded from specific directories. After working with our IT staff I was able to get R packages that use dll files placed in a special location and then simply add that special location onto the library search path by using the .libPaths() function. To make is easier for the end users I placed the appropriate code in the system wide RProfile.site file to handle this extra library search directory issue.

    Problem solved…

    As an aside, I think that R should have notified that there were some strangeness going on when it tried to open a library and did not have any associated symbols… At least a warning…

    I have edited this answer to have the relevant snipplet from my Rprofile.site file to add directories to the library search path. The file was placed in c:/program files/R/R-3.0.2/etc.

    .First = function() {
      cat('Adding LocalLibrary to the Library Search Path ... ')
      .libPaths(c(.libPaths(), <your library path you want to add>))
    
      if(<your path you want to add> %in% .libPaths()) {
        cat('Success\n')
      } else {
        cat('Failure\n')
        cat('You may encounter problems using libraries that depend on dynamically loaded dll files\n')
      }
    }
    
    Git Baby is a git and github fan, let's start git clone.