astamm / nloptr

nloptr provides an R interface to NLopt, a free/open-source library for nonlinear optimization providing a common interface to a number of different optimization routines which can handle nonlinear constraints and lower and upper bounds for the controls.
https://astamm.github.io/nloptr/
Other
105 stars 35 forks source link

Windows: build against nlopt 2.7.1 #92

Closed jeroen closed 2 years ago

jeroen commented 2 years ago

Tested to work + CI on R 4.1, 4.1, 4.2

astamm commented 2 years ago

Thank you so much @jeroen. Running the CI checks now. If I understand correctly, I think we should maybe add a step in the tools/winlibs.R script to copy nlopt headers into inst/include so that we can also directly call the C and C++ API of nlopt in other packages as well (as I do for example). Does that make sense?

eddelbuettel commented 2 years ago

And/or call another script or copy step. The current tools/winlibs.R looks like all the others for the 80-some libraries, it may be beneficial to keep it that way.

eddelbuettel commented 2 years ago

(And while you are doing some polishing before another upload, the Description: text about unconditional cmake and required cmake installation is no longer true. Maybe state as 'needed when building from source' and note where? Maybe 'macOS and Linux (unless NLopt installation found)' ?

astamm commented 2 years ago

I was just thinking about that indeed. The SystemRequirements field is text-free, right? So I guess we could provide details in parentheses there. But if we leave cmake in SystemRequirements, it is not technically true either...

eddelbuettel commented 2 years ago

Yes it is -- see for example what I did for package tiledb (where we either do installed or download or build, it even more messy). Hard to get right or perfect.