-
Notifications
You must be signed in to change notification settings - Fork 34
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
minimal patch for build against nlopt 2.9.x #176
Conversation
I've checked this PR against all of nlopt 2.7.0, 2.7.1, 2.8.0, 2.9.0, 2.9.1, and 2.10.0, as well as without a system nlopt, when nlopt 2.7.1 is built from the internal source tarball. Two tests in |
A corollary of this PR is that
so packages with Adding just the necessary typedefs to the top of |
Any idea about the GH failures? It "works for me" with the standard |
Not sure and hard to say without the configure/install logs. Maybe the failure arises only if there is no system nlopt, though I tested that case locally (macOS). What happens if you disable pkg-config, forcing a local build of nlopt? The |
Being a personal fan of (much) simpler CI settings, I copied my own standard (generally 'constant' but here needed one How packages use other packages at the compiled level is actually surprisingly tricky as there are in fact multiple approaches. I recently created / overhauled the (at is core very simple) PRNG package |
Thanks for the additional checks. Locally, for me, even RcppNLoptExample fails to build (with error |
Yes -- I am not certain the example works without a system nlopt. This arose in part out of two users having persistent issue with this so I wanted a worked example which worked for them too at the time. Consistently supplying an external library either as system or as baked-in is twice as hard. It get easier with explicit dependencies. |
Yes, that is one which has randomness built into it and so is a bit hard to get to converge to the same value at same precision across Windows/Mac/Linux flavors. Fine with commenting it out for now and once the big issue of the package robustness to nlopt is solved, I will go back and review all the tests and see what I can do to make them more robust. Thank you! |
Thanks @jaganmn. Yes I will do that which I always do before submitting to CRAN anyway. |
We can add nlopt in the |
Please do not do that forced update. Version 2.7.1 as present in Debian and Ubuntu and hence on a lot of systems is perfectly fine. |
I would defer to @eddelbuettel here; he has significant experience in maintaining packages with system library requirements (RcppArmadillo, etc.). So long as @jaganmn patch allows any version of |
I'll update you all on the result of the reverse dependency checks to see if the current fix fails other reverse |
I can get it to pass in another local branch of this PR branch under both system nlopt and the included nlopt if exclude just one line in test file ... as well as the final 16 of 48 tests in a larger test file. See https://github.com/eddelbuettel/nloptr/actions/runs/13634481074 |
Great. Not sure what's wrong with I suspect that with the addition in my first commit here, all tests pass. So you can unskip the one you had to skip. I am in favour of the simple CI you used. Do you want to merge your local branch? Or do you prefer I simply reuse your |
Oh no, I got it wrong. You meant you skip the rest of the testing suite in that file to avoid the buffer size limit issue. |
Correct. That, plus one commenting out of one other line does it. I am not a fan of My recommendation is still to move ahead, get the package cleaned and onto CRAN and then dive into details. |
I will do that. Since I investigated a bit, it seems only the 33rd is at fault. See https://github.com/r-hub2/demented-alkalisable-chameleon-nloptr/actions/runs/13636482812. Not sure yet what's wrong with this test but it seems we can still perform all the other 15. |
I get it to by commenting out the next eight. I first tried the next four, that did not work. So 'NLOPT_LN_NEWUOA_BOUND' and 'NLOPT_GN_ESCH' are skipped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me. Once we have the program working, we can work on bringing the coverage back to 90+%. Also, given that nlopt 2.9 doesn't have the NLOPT_LD_LBFGS_NOCEDAL
at all, it makes sense why that test would fail on 2.9. Since I expect we need to support 2.9 AND 2.10 for a while, that test should probably be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #173 and fixes #175.