-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Specify explicitly only the needed symbols to export from the DLL. #616
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR. Gonna tag @bgoodri to take a look since he knows a lot more about this topic than I do. |
This is going to be fine. We need to test whether it continues to work on older Windows releases of R and if not, bump the minimum R version up to whatever it works with. The larger question is whether we also want to do this in rstantools after the next R release in April? |
Tagging @andrjohns to see if he has a preference about rstantools |
A bit orthogonal, if this works fine for you, it might be worth generating the .def file automatically - so that when someone adds a new model, the .def file doesn't have to be manually updated. |
Yes, if we enabled LTO for many, many other packages via rstantools, then we would generate the package's .def file when the The PR seems to fail to load rstanarm with the message:
This error comes comes from |
…is is safer wrt to possible naming conflicts and fixes linking on Windows using gcc 13.2, which produces weak symbols, which in turn cannot be exported from the DLL.
de029ca
to
c73828e
Compare
Hmm, sorry, lets separate the two things. I've updated the pull request to just fix linking on Windows to export only selected symbols. I've removed my attempt to fix the registration from the patch, which is unrelated and will need further investigation. |
I don't know. The problem is non-deterministic on my system, sometimes it happens and sometimes not. |
Specify explicitly only the needed symbols to export from the DLL. This is safer wrt to possible naming conflicts and fixes linking on Windows using gcc 13.2, which produces weak symbols, which in turn cannot be exported from a DLL.
Also fixed R_init_rstanarm to be found by R.