From 0e96c542254c517d0b92c71869c101594d6ff2fa Mon Sep 17 00:00:00 2001 From: Benjamin Christoffersen Date: Wed, 3 Mar 2021 16:07:58 +0100 Subject: [PATCH] fix issue on Windows --- DESCRIPTION | 2 +- cran-comments.md | 10 +++------- mdgc.Rproj | 2 +- src/arma-wrap.h | 2 ++ src/fast-commutation.h | 5 +++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 56a7ad9..7a371b7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mdgc Type: Package Title: Missing Data Imputation Using Gaussian Copulas -Version: 0.1.2 +Version: 0.1.3 Authors@R: c( person("Benjamin", "Christoffersen", email = "boennecd@gmail.com", diff --git a/cran-comments.md b/cran-comments.md index 113e7b3..0fecbfe 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -11,7 +11,7 @@ R devel 2021-02-05 r79941 with ASAN and UBSAN * Github actions on windows-latest (release), macOS-latest (release), ubuntu-20.04 (release), and ubuntu-20.04 (devel) -* win-builder (devel and release) +* win-builder (devel, oldrelease, and release) * `rhub::check_for_cran()` * `rhub::check(platform = c("fedora-clang-devel", "solaris-x86-patched", "macos-highsierra-release-cran"))` @@ -20,12 +20,8 @@ There were no WARNINGs or ERRORs. There is a NOTE about the package size in some cases. -For some reason, using `std::current_exception()` with Rcpp does not seem to -work Fedora with clang-11 using libc++. I have made a workaround. Details of the -issue is provided at https://stackoverflow.com/q/66362932/5861244 and -https://github.com/RcppCore/Rcpp/issues/972#issuecomment-785670233. - -I have fixed the LTO issue. +I have fixed the error on the older version of Windows which showed up on +2020-02-29. I am still working on the Solaris issue. The ASAN and UBSAN checks with clang-6.0.0 yields a false positive I think. I get the following: diff --git a/mdgc.Rproj b/mdgc.Rproj index 42630ed..c85deac 100644 --- a/mdgc.Rproj +++ b/mdgc.Rproj @@ -18,4 +18,4 @@ StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source -PackageBuildArgs: --run-donttest +PackageCheckArgs: --run-donttest --as-cran --no-multiarch --no-stop-on-test-error diff --git a/src/arma-wrap.h b/src/arma-wrap.h index 214efc2..9dbab71 100644 --- a/src/arma-wrap.h +++ b/src/arma-wrap.h @@ -12,6 +12,8 @@ #define ARMA_NO_DEBUG #endif +#define ARMA_DONT_PRINT_ERRORS + #include #endif diff --git a/src/fast-commutation.h b/src/fast-commutation.h index ba6264b..6b30139 100644 --- a/src/fast-commutation.h +++ b/src/fast-commutation.h @@ -1,12 +1,13 @@ #ifndef FAST_COM_H #define FAST_COM_H #include "arma-wrap.h" +#include inline std::unique_ptr get_commutation_unequal_vec (unsigned const n, unsigned const m, bool const transpose){ unsigned const nm = n * m, - nnm_p1 = n * nm + 1L, - nm_pm = nm + m; + nnm_p1 = n * nm + 1L, + nm_pm = nm + m; std::unique_ptr out(new size_t[nm]); size_t * const o_begin = out.get(); size_t idx = 0L;