1

In some ways this is a continuation of this older post, R packages with Rcpp and nloptr.

Mostly, this solution proved temporary, for several reasons, some minor, but mostly I am working to prefect this project for a cran submission and this remains the last hurdle.

That said, I attempted and failed to get this example running https://github.com/jyypma/nloptr/issues/39. The error here is "..../sourceCpp_2.so Reason: image not found"

After, this I made a test package with nlopt installed into the 'inst' folder and 'makevars' and 'makevars.win' in the 'src' along with the test example from above. This package is now on GitHub: https://github.com/shortyatz/Nlopt-and-Rcpp.

And gives me a similar error message to the one above.

Here is my session info:

R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] Rcpp_0.12.18

loaded via a namespace (and not attached):
[1] compiler_3.5.0            tools_3.5.0               RcppArmadillo_0.8.600.0.0 yaml_2.2.0 
skatz
  • 115
  • 7
  • Having the full source code for a [mcve] would be helpful. In the meantime: Which R version and which compiler version do you use? Can you include more context from the error message? – Ralf Stubner Aug 15 '18 at 08:59
  • 2
    The solution in [issue #39](https://github.com/jyypma/nloptr/issues/39) should work once nloptr is updated on CRAN -- and nloptr 1.2.0 is in the queue (though I do not know what holds it back). – Dirk Eddelbuettel Aug 15 '18 at 11:53
  • First, I really only needed a 1 algorithm from the nlopt library so I just wrote my own version as that seemed easier. Second, I am using what ever compiler is the default with Xcode (which I updated to the most recent), all I know is that this doesn't provide openmp sport. – skatz Aug 20 '18 at 07:50

0 Answers0