[R-pkg-devel] R CMD build segfault (r88038)

2025-03-24 Thread Josiah Parry
In trying to address new WARNINGs on R-devel I'm trying to rebuild my
package environment on R 4.6 (r88038) so I can try and remediate. However,
I'm encountering a segfault when doing so which doesn't occur for R 4.5.0
alpha (2025-03-18 r87991).

Is there a known change to building using R CMD build that we have to
address?

rextendr ⚡ R CMD build .
* checking for file ‘./DESCRIPTION’ ... OK
* preparing ‘rextendr’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
  ---
* installing *source* package ‘rextendr’ ...
** this is package ‘rextendr’ version ‘0.3.1.9001’
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
sh: line 1: 20659 Segmentation fault: 11  R_TESTS=
'/Library/Frameworks/R.framework/Versions/4.6-arm64/Resources/bin/R'
--no-save --no-restore --no-echo 2>&1 <
'/var/folders/wd/xq999jjj3bx2w8cpg7lkfxlmgn/T//RtmpkyfWsl/file50adcb72e68'

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build segfault (r88038)

2025-03-24 Thread Dirk Eddelbuettel


On 24 March 2025 at 09:10, Josiah Parry wrote:
| In trying to address new WARNINGs on R-devel I'm trying to rebuild my
| package environment on R 4.6 (r88038) so I can try and remediate. However,
| I'm encountering a segfault when doing so which doesn't occur for R 4.5.0
| alpha (2025-03-18 r87991).
| 
| Is there a known change to building using R CMD build that we have to
| address?
| 
| rextendr ⚡ R CMD build .
| * checking for file ‘./DESCRIPTION’ ... OK
| * preparing ‘rextendr’:
| * checking DESCRIPTION meta-information ... OK
| * installing the package to build vignettes
|   ---
| * installing *source* package ‘rextendr’ ...
| ** this is package ‘rextendr’ version ‘0.3.1.9001’
| ** using staged installation
| ** R
| ** inst
| ** byte-compile and prepare package for lazy loading
| sh: line 1: 20659 Segmentation fault: 11  R_TESTS=
| '/Library/Frameworks/R.framework/Versions/4.6-arm64/Resources/bin/R'
| --no-save --no-restore --no-echo 2>&1 <
| '/var/folders/wd/xq999jjj3bx2w8cpg7lkfxlmgn/T//RtmpkyfWsl/file50adcb72e68'

It's been a while since I have seen such a segfault, but I have encountered
plenty in both the earlier days of Rcpp, or when working with for example the
geospatial satck. And it almost always traced back to different (binary,
i.e. 'native' code containing) packages requiring a rebuild.  While I haven't
seen it lately, my suggestion would still be to see if it persists if you
rebuild everything touched by that package / if it happens for subsets of
these packages. Subsetting to the other native packages may suffice. From a
quick check (see below) that is still 16 packages.

Dirk

> db <- data.table(tools::CRAN_package_db())
> pkgs <- data.table(Package=tools::package_dependencies("rextendr", db=db, 
> recursive=TRUE)[[1]])
> pkgs[,Package]
 [1] "brio"   "callr"  "cli""desc"   "dplyr" 
 [6] "glue"   "jsonlite"   "pkgbuild"   "processx"   "purrr" 
[11] "rlang"  "rprojroot"  "stringi""tibble" "vctrs" 
[16] "withr"  "R6" "utils"  "generics"   "lifecycle" 
[21] "magrittr"   "methods""pillar" "tidyselect" "ps"
[26] "tools"  "stats"  "fansi"  "pkgconfig"  "graphics"  
[31] "grDevices"  "utf8"  
> db[pkgs, on="Package"][NeedsCompilation=="yes", Package]
 [1] "brio"   "cli""dplyr"  "glue"   "jsonlite"  
 [6] "processx"   "purrr"  "rlang"  "stringi""tibble"
[11] "vctrs"  "magrittr"   "tidyselect" "ps" "fansi" 
[16] "utf8"  
> 

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build segfault (r88038)

2025-03-24 Thread Josiah Parry
👍

Josiah Parry reacted via Gmail


On Mon, Mar 24, 2025 at 9:48 AM Dirk Eddelbuettel  wrote:

>
> On 24 March 2025 at 09:10, Josiah Parry wrote:
> | In trying to address new WARNINGs on R-devel I'm trying to rebuild my
> | package environment on R 4.6 (r88038) so I can try and remediate.
> However,
> | I'm encountering a segfault when doing so which doesn't occur for R 4.5.0
> | alpha (2025-03-18 r87991).
> |
> | Is there a known change to building using R CMD build that we have to
> | address?
> |
> | rextendr ⚡ R CMD build .
> | * checking for file ‘./DESCRIPTION’ ... OK
> | * preparing ‘rextendr’:
> | * checking DESCRIPTION meta-information ... OK
> | * installing the package to build vignettes
> |   ---
> | * installing *source* package ‘rextendr’ ...
> | ** this is package ‘rextendr’ version ‘0.3.1.9001’
> | ** using staged installation
> | ** R
> | ** inst
> | ** byte-compile and prepare package for lazy loading
> | sh: line 1: 20659 Segmentation fault: 11  R_TESTS=
> | '/Library/Frameworks/R.framework/Versions/4.6-arm64/Resources/bin/R'
> | --no-save --no-restore --no-echo 2>&1 <
> |
> '/var/folders/wd/xq999jjj3bx2w8cpg7lkfxlmgn/T//RtmpkyfWsl/file50adcb72e68'
>
> It's been a while since I have seen such a segfault, but I have encountered
> plenty in both the earlier days of Rcpp, or when working with for example
> the
> geospatial satck. And it almost always traced back to different (binary,
> i.e. 'native' code containing) packages requiring a rebuild.  While I
> haven't
> seen it lately, my suggestion would still be to see if it persists if you
> rebuild everything touched by that package / if it happens for subsets of
> these packages. Subsetting to the other native packages may suffice. From a
> quick check (see below) that is still 16 packages.
>
> Dirk
>
> > db <- data.table(tools::CRAN_package_db())
> > pkgs <- data.table(Package=tools::package_dependencies("rextendr",
> db=db, recursive=TRUE)[[1]])
> > pkgs[,Package]
>  [1] "brio"   "callr"  "cli""desc"   "dplyr"
>  [6] "glue"   "jsonlite"   "pkgbuild"   "processx"   "purrr"
> [11] "rlang"  "rprojroot"  "stringi""tibble" "vctrs"
> [16] "withr"  "R6" "utils"  "generics"   "lifecycle"
> [21] "magrittr"   "methods""pillar" "tidyselect" "ps"
> [26] "tools"  "stats"  "fansi"  "pkgconfig"  "graphics"
> [31] "grDevices"  "utf8"
> > db[pkgs, on="Package"][NeedsCompilation=="yes", Package]
>  [1] "brio"   "cli""dplyr"  "glue"   "jsonlite"
>  [6] "processx"   "purrr"  "rlang"  "stringi""tibble"
> [11] "vctrs"  "magrittr"   "tidyselect" "ps" "fansi"
> [16] "utf8"
> >
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] R CMD build segfault (r88038)

2025-03-24 Thread Josiah Parry
Thank you! I suspect it is because I installed stringi from a binary
created on r-universe and it may not have been compatible with my machine
or version of R-devel.

On Mon, Mar 24, 2025 at 9:48 AM Dirk Eddelbuettel  wrote:

>
> On 24 March 2025 at 09:10, Josiah Parry wrote:
> | In trying to address new WARNINGs on R-devel I'm trying to rebuild my
> | package environment on R 4.6 (r88038) so I can try and remediate.
> However,
> | I'm encountering a segfault when doing so which doesn't occur for R 4.5.0
> | alpha (2025-03-18 r87991).
> |
> | Is there a known change to building using R CMD build that we have to
> | address?
> |
> | rextendr ⚡ R CMD build .
> | * checking for file ‘./DESCRIPTION’ ... OK
> | * preparing ‘rextendr’:
> | * checking DESCRIPTION meta-information ... OK
> | * installing the package to build vignettes
> |   ---
> | * installing *source* package ‘rextendr’ ...
> | ** this is package ‘rextendr’ version ‘0.3.1.9001’
> | ** using staged installation
> | ** R
> | ** inst
> | ** byte-compile and prepare package for lazy loading
> | sh: line 1: 20659 Segmentation fault: 11  R_TESTS=
> | '/Library/Frameworks/R.framework/Versions/4.6-arm64/Resources/bin/R'
> | --no-save --no-restore --no-echo 2>&1 <
> |
> '/var/folders/wd/xq999jjj3bx2w8cpg7lkfxlmgn/T//RtmpkyfWsl/file50adcb72e68'
>
> It's been a while since I have seen such a segfault, but I have encountered
> plenty in both the earlier days of Rcpp, or when working with for example
> the
> geospatial satck. And it almost always traced back to different (binary,
> i.e. 'native' code containing) packages requiring a rebuild.  While I
> haven't
> seen it lately, my suggestion would still be to see if it persists if you
> rebuild everything touched by that package / if it happens for subsets of
> these packages. Subsetting to the other native packages may suffice. From a
> quick check (see below) that is still 16 packages.
>
> Dirk
>
> > db <- data.table(tools::CRAN_package_db())
> > pkgs <- data.table(Package=tools::package_dependencies("rextendr",
> db=db, recursive=TRUE)[[1]])
> > pkgs[,Package]
>  [1] "brio"   "callr"  "cli""desc"   "dplyr"
>  [6] "glue"   "jsonlite"   "pkgbuild"   "processx"   "purrr"
> [11] "rlang"  "rprojroot"  "stringi""tibble" "vctrs"
> [16] "withr"  "R6" "utils"  "generics"   "lifecycle"
> [21] "magrittr"   "methods""pillar" "tidyselect" "ps"
> [26] "tools"  "stats"  "fansi"  "pkgconfig"  "graphics"
> [31] "grDevices"  "utf8"
> > db[pkgs, on="Package"][NeedsCompilation=="yes", Package]
>  [1] "brio"   "cli""dplyr"  "glue"   "jsonlite"
>  [6] "processx"   "purrr"  "rlang"  "stringi""tibble"
> [11] "vctrs"  "magrittr"   "tidyselect" "ps" "fansi"
> [16] "utf8"
> >
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] New API in R-devel & minimum version of R

2025-03-24 Thread Dirk Eddelbuettel


On 19 March 2025 at 09:29, Michael Chirico wrote:
| data.table is doing the same in a number of places, Ivan even went so far
| as to pin down a specific SVN commit for those as well:
| 
| #if R_VERSION < R_Version(4, 5, 0) || R_SVN_REVISION < 86702
| #  define isDataFrame(x) isFrame(x) // #6180
| #endif
| 
| 
https://github.com/Rdatatable/data.table/blob/0909048017d35f8b8a910c74549650f5de5a74a9/src/data.table.h#L21-L23
| 
| Sneaking onto my soapbox to complain that it really seems incorrect that R
| CMD check started complaining about these issues before the API-compliant
| functions were included in an R release. I was really surprised to see
| these functions were not included in the most recent past release, for
| example.

Seconded.  

(Also I was wrong in them previous email: we learned from Ben as lme4 got the 
nag.)

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel