New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Error] "cannot open the connection [...] /usr/lib/R/library/TMB/Matrix-version'" by package TMB needed by package mmrm #386
Comments
Due to restrictions in the WebAssembly environment, not all R packages work with webR. From what I can tell, it looks like the TMB package requires a system C++ compiler at runtime to work. This would mean building an entire C++ compiler suite that not only outputs Wasm bytecode, but also runs under Wasm. It is likely that such a compiler will not be available for a long time, so I am going to close this issue as "not planned" for the time being. |
I checked livecodes.io, the TMB package also fails there, with
in the JS error console. It is possible livecodes.io worked because it's running an older version of |
Thank you for the response! I'm posting an issue on the TMB github. |
Hello @georgestagg,
Would you be willing to exchange some details on this topic with @bbolker ? |
A couple of comments:
tools::package_dependencies("TMB", reverse = TRUE)
$TMB
[1] "disaggregation" "DLMtool" "dsem" "ef"
[5] "fishmethods" "FRK" "gadget3" "GeoAdjust"
[9] "gllvm" "glmmTMB" "hmmTMB" "LocalCop"
[13] "marked" "MLZ" "mmrm" "phylosem"
[17] "QFASA" "RTMB" "SAMtool" "sdmTMB"
[21] "SPAS" "SpatialGEV" "ssdtools" "stelfi"
[25] "stochvolTMB" "tmbstan" "tramME" "tsdistributions"
[29] "unmarked" Of these,
|
Also, FWIW I'm a little puzzled by the |
Quick update here, the TMB maintainer (Kasper Kristensen) has pushed a commit that removes the need to reference an external file, if anyone wants to re-test ... |
Thanks for clarifying @bbolker.
Yes, I can rebuild R packages for WebAssembly from forks or branches on GitHub.
Good to know. We can work to get this up and running in webR, with the understanding that it is only this pre-compiled part of the package that can be supported. I've reopened the issue.
Great! In truth, this issue was not a showstopper problem, it could be worked around by loading TMB with the webR specific option webr::install("TMB", mount = FALSE) Setting this to The other issue with TMB was that it failed to load in another way:
In previous versions of webR, it is this problem that manifested as the Strangely enough, I just recompiled the latest version of TMB for WebAssembly and this particular issue is now also fixed. I'm not entirely sure when that particular fix occurred, but I'm happy to push this updated version to the webR package repository now. I have now done this, and the latest TMB build now seems to load cleanly in webR 🎉 It would be good if there were some test code I could run before closing the issue as complete. |
There's not really anything you can do with ... which seems to work fine. |
Thank you wholeheartedly(!) both @bbolker and @georgestagg! I'm deeply grateful to both of you for fixing this! That's the power of open source, that's the power of collaboration! Now I think the issue can be closed. |
Hi,
I tried to download and use the mmrm package, used for modelling longitudinal clinical trials.
I was able to install it, however it failed to load - as follows:
The code:
Let's check what's going on deeper:
By the way, the reported version is 0.3.7, but 0.3.11 is on the CRAN. How often the packages are updated in the webr repository? (more/less)
The example wouldn't converge to a solution anyway, but this example does (taken from some mmrm issues)
cannot complete due to this problem, yet it completed in https://livecodes.io/?template=r
which seems to be based on WebR?
also this one:
vs.
The text was updated successfully, but these errors were encountered: