From ab836a27c10432507afa603295e8efbdec5bb2b1 Mon Sep 17 00:00:00 2001 From: Balasubramanian Narasimhan Date: Tue, 3 Sep 2024 05:35:11 -0700 Subject: [PATCH] CRAN fixes Report rust and cargo versions used. --- DESCRIPTION | 6 +++--- src/Makevars.in | 4 +++- src/Makevars.win | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 64cab7e..7814160 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: clarabel Type: Package Title: Interior Point Conic Optimization Solver -Version: 0.9.0 +Version: 0.9.0.1 Authors@R: c(person("Balasubramanian", "Narasimhan", role=c("aut", "cre"), email = "naras@stanford.edu"), person("Paul", "Goulart", role=c("aut", "cph")), @@ -10,7 +10,7 @@ Authors@R: c(person("Balasubramanian", "Narasimhan", role=c("aut", "cre"), comment = "For vendoring/Makefile hints/R scripts for generating crate authors/licenses"), person(given = "The authors of the dependency Rust crates", role = c("ctb"), comment = "see inst/AUTHORS file for details")) -Description: A versatile interior point solver that solves linear programs (LPs), quadratic programs (QPs), second-order cone programs (SOCPs), semidefinite programs (SDPs), and problems with exponential and power cone constraints (). For quadratic objectives, unlike interior point solvers based on the standard homogeneous self-dual embedding (HSDE) model, 'Clarabel' handles quadratic objective without requiring any epigraphical reformulation of its objective function. It can therefore be significantly faster than other HSDE-based solvers for problems with quadratic objective functions. Infeasible problems are detected using using a homogeneous embedding technique. +Description: A versatile interior point solver that solves linear programs (LPs), quadratic programs (QPs), second-order cone programs (SOCPs), semidefinite programs (SDPs), and problems with exponential and power cone constraints (). For quadratic objectives, unlike interior point solvers based on the standard homogeneous self-dual embedding (HSDE) model, Clarabel handles quadratic objective without requiring any epigraphical reformulation of its objective function. It can therefore be significantly faster than other HSDE-based solvers for problems with quadratic objective functions. Infeasible problems are detected using using a homogeneous embedding technique. License: Apache License (== 2.0) Encoding: UTF-8 Roxygen: list(markdown = TRUE) @@ -24,6 +24,6 @@ Suggests: rmarkdown, tinytest VignetteBuilder: knitr -SystemRequirements: Cargo (Rust package manager), rustc and GNU Make +SystemRequirements: Cargo (Rust's package manager), rustc (>= 1.67.1), and GNU Make Imports: methods diff --git a/src/Makevars.in b/src/Makevars.in index e23da09..18c7b2e 100644 --- a/src/Makevars.in +++ b/src/Makevars.in @@ -12,7 +12,7 @@ STATLIB = $(LIBDIR)/libclarabel.a PKG_LIBS = -L$(LIBDIR) -lclarabel $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) CARGOTMP = $(CURDIR)/rust/.cargo -CARGO_BUILD_ARGS = --jobs 2 --verbose --lib --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) +CARGO_BUILD_ARGS = -j 2 --lib --manifest-path=./rust/Cargo.toml --target-dir $(TARGET_DIR) all: C_clean @@ -23,6 +23,8 @@ $(STATLIB): # to set it here to ensure cargo can be invoked. It is appended to PATH and # therefore is only used if cargo is absent from the user's PATH. export PATH="$(PATH):$(HOME)/.cargo/bin" && \ + echo "Rust version:" `rustc --version` && \ + echo "Cargo version:" `cargo --version` && \ if [ "$(TARGET)" != "wasm32-unknown-emscripten" ]; then \ if [ "$(VENDORING)" = "yes" ]; then \ mkdir -p $(CARGOTMP); \ diff --git a/src/Makevars.win b/src/Makevars.win index 98ca41b..292fa1a 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -27,11 +27,13 @@ $(STATLIB): mkdir -p $(LIBDIR)/libgcc_mock && touch $(LIBDIR)/libgcc_mock/libgcc_eh.a mkdir -p $(CARGOTMP) && cp ./rust/cargo_vendor_config.toml $(CARGOTMP)/config.toml $(TAR) --extract --xz -f ./rust/vendor.tar.xz -C ./rust + echo "Rust version:" `rustc --version` + echo "Cargo version:" `cargo --version` export CARGO_HOME="$(CARGOTMP)" && \ export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER="$(CARGO_LINKER)" && \ export LIBRARY_PATH="$${LIBRARY_PATH};$(LIBDIR)/libgcc_mock" && \ - cargo build --jobs 2 --target $(TARGET) --lib --offline --release --manifest-path ./rust/Cargo.toml --target-dir $(TARGET_DIR) + cargo build -j 2 --target $(TARGET) --lib --offline --release --manifest-path ./rust/Cargo.toml --target-dir $(TARGET_DIR) rm -Rf $(CARGOTMP) rm -Rf $(VENDOR_DIR) rm -Rf $(LIBDIR)/build