A new version of the
nloptr
package has been released! The NLopt library has switched to CMake as build system. I am replacing Jelmer Ypma as maintainer of the package.
nlopt
The NLopt library (Johnson 2021) is a free/open-source library for nonlinear optimization, providing a common interface for a number of different free optimization routines available online as well as original implementations of various other algorithms.
Starting from v2.5.0
, NLopt has switched to cmake
as build system, making the latest versions incompatible with the way nloptr
used to interface the library.
nloptr
As of v2.0.0
, we now provide an R interface to nlopt >= 2.7.0
. This is achieved in different ways depending on the operating system you are using.
Windows
There is no dependency required for Windows users.
- If you are running on
R <= 4.1.x
, installation ofnloptr
will rely on a valid internet connexion to download thenlopt 2.7.1
headers and static library fromrwinlib
and use it. - If you are running on
R >= 4.2.x
, installation ofnloptr
will directly link withnlopt 2.7.1
from theRtools42
toolchain.
Linux and macOS
On Unix-like systems, installation of nloptr
will go through the following steps:
Is pkg-config
available on your PATH
?
NO: compile
nlopt 2.7.1
from included sources usingcmake >= 3.15.0
.YES: can
pkg-config
detect a system build ofnlopt >= 2.7.0
?- NO: compile
nlopt 2.7.1
from included sources usingcmake >= 3.15.0
. - YES: install
nloptr
using the detected system build ofnlopt
.
- NO: compile
Hence, cmake >= 3.15.0
can become a system requirement for installing nloptr
on your machine if you are running on a Unix-like system without pkg-config
or without a system build of nlopt >= 2.7.0
.