Re: [R-pkg-devel] Linker / System Requirement

2024-05-07 Thread Kevin Ushey
Hi Josiah, Indeed, the right thing to do is to declare the library in the SystemRequirements file. However, other than some specific documented usages which affect how R builds the package (e.g. C++ standards and GNU make), I believe the field is meant more just to inform users of the external

Re: [R-pkg-devel] Order of repo access from options("repos")

2024-03-31 Thread Kevin Ushey
It may also be useful to use: options(internet.info = 1) to get more information on the web requests R is making. (See the documentation in ?options for more details.) Looking at the source code in available.packages, R does iterate through the repositories in the same order they're

Re: [R-pkg-devel] RFC: C backtraces for R CMD check via just-in-time debugging

2024-03-03 Thread Kevin Ushey
Would libSegFault be useful here? https://lemire.me/blog/2023/05/01/under-linux-libsegfault-and-addr2line-are-underrated/ On Sun, Mar 3, 2024, 5:15 PM Rolf Turner wrote: > On Sun, 3 Mar 2024 11:14:44 +0300 > Ivan Krylov via R-package-devel wrote: > > > Hello, > > > > This may be of interest to

Re: [R-pkg-devel] Unusually long execution time for R.utils::gzip on r-devel-windows

2024-02-17 Thread Kevin Ushey
FWIW, as far as I can tell, Sys.readlink() still doesn't handle symlinks (or junction points) on Windows. Were you thinking of normalizePath()? That does now resolve both symlinks and junction points on Windows (courtesy of a lot of work from Tomas), although I don't recall the exact versions in

Re: [R-pkg-devel] Feedback on "Using Rust in CRAN packages"

2023-07-12 Thread Kevin Ushey
Package authors could use 'cargo vendor' to include Rust crate sources directly in their source R packages. Would that be acceptable? Presumedly, the vendored sources would be built using the versions specified in an accompanying Cargo.lock as well.

Re: [R-pkg-devel] problem with regdmp finding v4.2.x under Windows

2022-07-05 Thread Kevin Ushey
Hi Jonathan, I'm not certain if this is the issue you're encountering, but I've noticed that different versions of R may write to different locations in the registry. Right now, on my machine, I see entries for R 4.1.3 installed at: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\R-core\R

Re: [R-pkg-devel] CRAN submission error when running tests in testthat

2021-11-25 Thread Kevin Ushey
That shouldn't be happening, at least not by default. However, RcppParallel does ship with tbbmalloc_proxy, which is a library that, when loaded, will overload the default allocators to use TBB's allocators instead. The intention is normally that these libraries would be loaded via e.g. LD_PRELOAD

Re: [R-pkg-devel] windows and configure scripts

2021-08-07 Thread Kevin Ushey
On Fri, Aug 6, 2021 at 3:47 PM Tim Keitt wrote: > > As configure is not run on windows, but according to the writing extensions > docs you can run commands in Makevars, is that not preferable for simple > cases? IMHO it's ultimately up to you. Do what makes your life easier as a package

Re: [R-pkg-devel] Package not building for i386 after adding configure.win

2021-05-16 Thread Kevin Ushey
Based on this output: ** libs Warning: this package has a non-empty 'configure.win' file, so building only the main architecture Does adding Biarch: TRUE to your package DESCRIPTION file help? Best, Kevin On Sun, May 16, 2021 at 2:47 PM David Cortes wrote: > > I recently tried adding a

Re: [R-pkg-devel] compiling C sources on windows

2021-04-19 Thread Kevin Ushey
I suspect the cause is this: https://github.com/bradleyjeck/epanet2toolkit/blob/aa698568ab85db133f8634928e8cfe661b41ed57/src/epanet2.h#L42-L61 Usually, you only need to explicitly use __declspec if you're compiling with MSVC -- it shouldn't be necessary when using a MinGW toolchain (as R's

Re: [R-pkg-devel] Package gcc-ASAN issue

2021-04-16 Thread Kevin Ushey
>From https://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-ASAN/rTLS/00check.log, you can see errors of the form: ==3566104==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7fffc2651f80 at pc 0x7f7ba5b635de bp 0x7fffc2651eb0 sp 0x7fffc2651ea0 < ... > The slides here explain what that

Re: [R-pkg-devel] Win-builder not finding binaries provided by LinkingTo: cargo?

2021-04-06 Thread Kevin Ushey
I think this is the pertinent error: > make: cargo: Command not found That is, make is assuming that the cargo utility is installed and available on the PATH, but that doesn't appear to be true on the CRAN winbuilder machine. The salso package (https://cran.r-project.org/package=salso)

Re: [R-pkg-devel] Rcpp with clang++ -stdlib=libc++ ?

2020-09-12 Thread Kevin Ushey
My understanding is that many Linux OSes package the clang compiler, the libc++ standard library, and the headers used by the libc++ standard library separately. To install those headers, you likely need (e.g. on Ubuntu): sudo apt install libc++-dev libc++abi-dev to be able to build and

Re: [R-pkg-devel] Problem with package using reticulate (and Config in DESCRIPTION)

2020-01-10 Thread Kevin Ushey
Note that by calling py_module_available() in your .onLoad(), as done here: https://github.com/r-cas/caracas/blob/418b3a552de0203c3d2f960f0e4235f7891db71d/R/init.R#L51 you are forcing reticulate to initialize the Python session eagerly when your package is loaded (so before the user might've had

Re: [R-pkg-devel] suggestion: conda for third-party software

2020-01-08 Thread Kevin Ushey
es/2 Best, Kevin On Wed, Jan 8, 2020 at 8:34 AM Kevin Ushey wrote: > > On Tue, Jan 7, 2020 at 10:42 PM Sokol Serguei wrote: > > > > Thanks for this hint. > > > > Le 07/01/2020 à 20:47, Kevin Ushey a écrit : > > > The newest version of reticulate does som

Re: [R-pkg-devel] suggestion: conda for third-party software

2020-01-08 Thread Kevin Ushey
On Tue, Jan 7, 2020 at 10:42 PM Sokol Serguei wrote: > > Thanks for this hint. > > Le 07/01/2020 à 20:47, Kevin Ushey a écrit : > > The newest version of reticulate does something very similar: R > > packages can declare their Python package dependencies in the >

Re: [R-pkg-devel] Set env variables for cmake

2019-11-08 Thread Kevin Ushey
It would help if you shared your source code, so we know what you've tried. Presumably, you need to either export the variables you're setting, or just pass them along when invoking CMake. For example: ENVVAR=1 export ENVVAR cmake <...> or ENVVAR=1 cmake <...> Best, Kevin On

Re: [R-pkg-devel] Cran submission - warning with windows (cpp build library gmp)

2019-02-22 Thread Kevin Ushey
The 'long long' type does not exist in the C++98 standard, so you need to explicitly request C++11 or C++14 (the former which is now fairly broadly supported across compilers on different systems). For more detail, see in the R extensions manual:

Re: [R-pkg-devel] Making adjustments to the R CMD check/install commands

2018-08-27 Thread Kevin Ushey
Hi Erin, The R extensions manual should be helpful here -- in particular, see the sections on the 'src/Makevars' file and configuration of the Fortran compiler: https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-Makevars In particular, in your 'src/Makevars' file, you'll likely

Re: [R-pkg-devel] R_registerRoutines, R_useDynamicSymbols

2018-08-13 Thread Kevin Ushey
Note that your attachment was lost, so we don't know what your package code looks like. It's helpful to host your package sources somewhere publicly accessible (e.g. GitHub) to make it easier for others to access sources quickly from a web browser. My best guess is that your 'init.c' is missing

Re: [R-pkg-devel] Help with reproducing (and solving) clang-UBSAN and Solaris installation errors

2018-07-10 Thread Kevin Ushey
The UBSAN error: cvode.cpp:58:11: runtime error: call to function cv_Roberts_dns(double, Rcpp::Vector<14, Rcpp::PreserveStorage>) through pointer to incorrect function type 'Rcpp::Vector<14, PreserveStorage> (*)(double, Rcpp::Vector<14, PreserveStorage>)'

Re: [R-pkg-devel] Solaris and ggplot2

2018-02-13 Thread Kevin Ushey
Hi, Glancing at the R CMD check errors, available at: https://www.r-project.org/nosvn/R.check/r-patched-solaris-x86/RJafroc-00install.html) It seems like the issues relate to ambiguous calls to 'sqrt()'. This particular issue is discussed in R-exts, at:

Re: [R-pkg-devel] CRAN and packages bundling third party C/C++ code

2018-01-23 Thread Kevin Ushey
uld handle these warnings emitted myself from TBB would still be appreciated (for myself and other package authors who might want to embed 3rd party code in their packages). Thanks, Kevin On Thu, Jan 18, 2018 at 11:19 AM, Kevin Ushey <kevinus...@gmail.com> wrote: > > Hi, > > This is mostly

[R-pkg-devel] CRAN and packages bundling third party C/C++ code

2018-01-18 Thread Kevin Ushey
Hi, This is mostly a question for the CRAN team, but I figured posting here would be best since other package maintainers could see the responses as well. I'm currently in the process of preparing a submission of RcppParallel to CRAN. RcppParallel bundles Intel's Threading Building Blocks

Re: [R-pkg-devel] Warning of DDRTree

2017-04-13 Thread Kevin Ushey
You can try placing this in your src/Makevars[.win] file: CXXFLAGS = -DBOOST_NO_LONG_LONG The dplyr package does this (and more) to avoid 'long long' leaking in from Boost headers. See e.g. https://github.com/tidyverse/dplyr/blob/ff719f53f88f2f03a298fa0ea489b902527ee2f1/src/Makevars#L2 The

Re: [R-pkg-devel] no visible global function definition for ‘par’

2017-01-30 Thread Kevin Ushey
Most importantly, this _is_ a recent-ish change in R CMD check. Previously, R CMD check did not warn about missing imports from 'base' R packages (that is, R packages distributed with R, having priority 'base'); now it correctly does. While packages with priority 'base' are loaded by default in

Re: [R-pkg-devel] R package with external C++ library

2016-08-03 Thread Kevin Ushey
On Wed, Aug 3, 2016 at 3:09 PM, MTurgeon wrote: > Hi Ege, > > For writing to standard output/error, you can use Rcout or Rcerr (defined by > Rcpp; they even have a vignette showing how to use it in the Rcpp gallery). > Alternatively, if you're using C code, you can

Re: [R-pkg-devel] R package with external C++ library

2016-08-03 Thread Kevin Ushey
It looks like most of these usages of std::cout, std::cerr and abort are coming from the logging infrastructure: https://github.com/micolous/s2-geometry-library/blob/master/geometry/base/logging.h If you wanted to make this work on CRAN, you could patch these files in a number of ways: You

Re: [R-pkg-devel] package build warning

2016-07-24 Thread Kevin Ushey
me conflict. For now, it is just a warning soI will keep > looking for the problem and if I can solve it post back here as it must be > quite subtle given all else is working fine. > > Glenn > > >> On Jul 24, 2016, at 3:27 PM, Kevin Ushey <kevinus...@gmail.com> wrot

Re: [R-pkg-devel] package build warning

2016-07-24 Thread Kevin Ushey
Did you call `devtools::document()` before building and checking your package? Everything looks fine to me with your test example. You should also double-check that you have up-to-date versions of the devtools and roxygen2 packages. It's also worth knowing that nowadays you can generally just use

Re: [R-pkg-devel] What to do when you can't reproduce CRAN R CMD check unit test failures?

2016-05-12 Thread Kevin Ushey
Is it possible that `getwd()` is reporting something on the CRAN build servers that your `decompose_path()` doesn't handle? For example, your tests fail for me if I run them while in the root directory (on OS X). Kevin On Thu, May 12, 2016 at 12:37 AM, Richard Cotton

Re: [R-pkg-devel] Redefinition of generic for plot function breaks plot.formula

2015-09-01 Thread Kevin Ushey
FWIW, it's a very _very_ bad idea to add methods to S3 generics for classes you don't 'own'. Some code might be written with the expectation that `plot(df)` actually does dispatch to `plot.default`. This implies that simply loading your package would break code in surprising ways. I would

Re: [R-pkg-devel] no visible global function definition

2015-06-29 Thread Kevin Ushey
Hi Uwe, It seems like this is quite a major change; I imagine it will affect many packages (since lots of packages implicitly assume other 'base' packages, like 'utils', will always be available in an R session). IIUC, in the latest versions of R-devel, only the 'base' package can be assumed