Hi all :) I'm experiencing an issue with building Rcpp packages inside the OpenCPU sandbox. I think this issue was introduced with the upgrade to Rcpp 0.10.6. The problem is that g++ seems to ignore the TMPDIR environment variable, and instead always tries to use the default /tmp. When /tmp is not writable, this causes the compiling to fail.
I am personally using RAppArmor to enforce these security policies, but an easier way to reproduce the problem is by temporarily disable write access to /tmp. Something like this: #force custom TMP directory, replace jeroen with your username cd /tmp sudo mkdir test sudo chown jeroen test sudo chgrp jeroen test sudo chmod 755 /tmp TMPDIR=/tmp/test bash -c R #then in R do: tempdir() #check install.packages("RcppExamples") #or any other rcpp package The process fails with 'Fatal error: creating temporary file for '-e' failed -L/usr/lib/R/lib -lR'. When using AppArmor, the error is actually more detailed and says that g++ tried to create a file /tmp/tmpfDbJ9KD. How can I make g++ use the same TMPDIR as the R process?
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel