Running 'test-all.R'
Running the tests in 'tests/test-all.R' failed.
Complete output:
  > if(require("testthat", quietly = TRUE)) {
  +     test_check("nloptr")
  + } else {
  +     print( "package 'testthat' not available, cannot run unit tests" )
  + }
  Loading required package: nloptr
  
  ERROR(s) during compilation: source code errors or compiler configuration errors!
  make cmd is
    make -f "C:/msys64/home/tomas/ucrt3/svn/ucrt3/R_PACK~1/rinst/etc/x64/Makeconf" -f "C:/msys64/home/tomas/ucrt3/svn/ucrt3/R_PACK~1/rinst/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="file127e82b65b18.dll" WIN=64 TCLBIN= OBJECTS="file127e82b65b18.o"
  
  make would use
  Warning message:
  In system(paste(cmd, "-n")) : 'make' not found
  
  Program source:
    1: #include <R.h>
    2: #include <Rdefines.h>
    3: #include <R_ext/Error.h>
    4: 
    5: #include "nloptrAPI.h"
    6: 
    7: extern "C" {
    8:   SEXP file127e82b65b18 (  );
    9: }
   10: 
   11: SEXP file127e82b65b18 (  ) {
   12: 
   13:       // get version of NLopt
   14:       int major, minor, bugfix;
   15:       nlopt_version(&major, &minor, &bugfix);
   16:   
   17:       SEXP retvec = PROTECT(allocVector(INTSXP, 3));
   18:       INTEGER(retvec)[0] = major;
   19:       INTEGER(retvec)[1] = minor;
   20:       INTEGER(retvec)[2] = bugfix;
   21:       
   22:       UNPROTECT(1);
   23:       return retvec;
   24:   warning("your C program does not return anything!");
   25:   return R_NilValue;
   26: }
  
  Compilation ERROR, function(s)/method(s) not created!
  
  ERROR(s) during compilation: source code errors or compiler configuration errors!
  make cmd is
    make -f "C:/msys64/home/tomas/ucrt3/svn/ucrt3/R_PACK~1/rinst/etc/x64/Makeconf" -f "C:/msys64/home/tomas/ucrt3/svn/ucrt3/R_PACK~1/rinst/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="file127e84ba130a8.dll" WIN=64 TCLBIN= OBJECTS="file127e84ba130a8.o"
  
  make would use
  Warning message:
  In system(paste(cmd, "-n")) : 'make' not found
  
  Program source:
    1: #include <R.h>
    2: #include <Rdefines.h>
    3: #include <R_ext/Error.h>
    4: 
    5: 
    6: #include <math.h>
    7: #include "nloptrAPI.h"
    8: 
    9: double myfunc(unsigned n, const double *x, double *grad, void *my_func_data)
   10: {
   11:     if (grad) {
   12:         grad[0] = 0.0;
   13:         grad[1] = 0.5 / sqrt(x[1]);
   14:     }
   15:     return sqrt(x[1]);
   16: }
   17: 
   18: typedef struct {
   19:     double a, b;
   20: } my_constraint_data;
   21: 
   22: double myconstraint(unsigned n, const double *x, double *grad, void *data)
   23: {
   24:     my_constraint_data *d = (my_constraint_data *) data;
   25:     double a = d->a, b = d->b;
   26:     if (grad) {
   27:         grad[0] = 3 * a * (a*x[0] + b) * (a*x[0] + b);
   28:         grad[1] = -1.0;
   29:     }
   30:     return ((a*x[0] + b) * (a*x[0] + b) * (a*x[0] + b) - x[1]);
   31: }
   32: 
   33: 
   34: extern "C" {
   35:   SEXP file127e84ba130a8 (  );
   36: }
   37: 
   38: SEXP file127e84ba130a8 (  ) {
   39: 
   40: double lb[2] = { -HUGE_VAL, 0 }; /* lower bounds */
   41: nlopt_opt opt;
   42: 
   43: opt = nlopt_create(NLOPT_LD_MMA, 2); /* algorithm and dimensionality */
   44: nlopt_set_lower_bounds(opt, lb);
   45: nlopt_set_min_objective(opt, myfunc, NULL);
   46: 
   47: my_constraint_data data[2] = { {2,0}, {-1,1} };
   48: 
   49: nlopt_add_inequality_constraint(opt, myconstraint, &data[0], 1e-8);
   50: nlopt_add_inequality_constraint(opt, myconstraint, &data[1], 1e-8);
   51: 
   52: nlopt_set_xtol_rel(opt, 1e-4);
   53: 
   54: double x[2] = { 1.234, 5.678 };  /* some initial guess */
   55: double minf; /* the minimum objective value, upon return */
   56: if (nlopt_optimize(opt, x, &minf) < 0) {
   57:     //Rprintf("nlopt failed!\n");
   58: }
   59: else {
   60:     //Rprintf("found minimum at f(%g,%g) = %0.10g\n", x[0], x[1], minf);
   61: }
   62: 
   63: nlopt_destroy(opt);
   64: 
   65: // Convert result to SEXP.
   66: SEXP result = PROTECT(allocVector(REALSXP, 2));
   67: REAL(result)[0] = x[0];
   68: REAL(result)[1] = x[1];
   69: UNPROTECT(1);
   70: 
   71: return result;
   72:   warning("your C program does not return anything!");
   73:   return R_NilValue;
   74: }
  
  Compilation ERROR, function(s)/method(s) not created!
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-C-api.R:43:5): Test exposing NLopt C function nlopt_version. ────
  Error in `compileCode(f, code, language, verbose)`: Warning message:In system(cmd) : 'make' not found
  Backtrace:
      █
   1. └─inline::cfunction(...) test-C-api.R:43:4
   2.   └─inline:::compileCode(f, code, language, verbose)
  ── Error (test-C-api.R:126:5): Test exposed NLopt C code using example from NLopt tutorial. ──
  Error in `compileCode(f, code, language, verbose)`: Warning message:In system(cmd) : 'make' not found
  Backtrace:
      █
   1. └─inline::cfunction(...) test-C-api.R:126:4
   2.   └─inline:::compileCode(f, code, language, verbose)
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 44 ]
  Error: Test failures
  Execution halted