r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
684 stars 62 forks source link

pak devel solver fails #718

Open pat-s opened 10 hours ago

pat-s commented 10 hours ago

Tested in rocker/r-ver.

pak devel

install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/devel/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))
#> Installing package into '/usr/local/lib/R/site-library'
#> (as 'lib' is unspecified)
pak::repo_get()
#> ! Optional package `pillar` is not available for pak.
#>   Use `pak::pak_install_extra()` to install optional packages.
#>   Use `options(pak.no_extra_messages = TRUE)` to suppress this message.
#>            name                                                    url type
#> 1          CRAN                            https://p3m.dev/cran/latest cran
#> 2      BioCsoft            https://bioconductor.org/packages/3.20/bioc bioc
#> 3       BioCann https://bioconductor.org/packages/3.20/data/annotation bioc
#> 4       BioCexp https://bioconductor.org/packages/3.20/data/experiment bioc
#> 5 BioCworkflows       https://bioconductor.org/packages/3.20/workflows bioc
#> 6     BioCbooks           https://bioconductor.org/packages/3.20/books bioc
#>   r_version bioc_version
#> 1         *         <NA>
#> 2     4.4.2         3.20
#> 3     4.4.2         3.20
#> 4     4.4.2         3.20
#> 5     4.4.2         3.20
#> 6     4.4.2         3.20
pak::pak("DBI")
#> Error: R session crashed with exit code -7

Created on 2024-11-23 with reprex v2.1.1

Crash output:


#13 1.099 R session crashed with exit code -7
#13 1.100 NULL
#13 1.100 NULL
#13 1.100 NULL
#13 1.100 7
#13 1.100 1732381463
#13 1.100 0                                                                           , 1                                                                           , 2                                                                           , 3                                                                           , TRUE                                                                        , TRUE                                                                        , TRUE                                                                        , TRUE                                                                        , NA                                                                          , pak                                                                         , pak                                                                         , NA                                                                          ,                                                                             , ::                                                                          , :::                                                                         ,                                                                             , 7                                                                           , 7                                                                           , 7                                                                           , 7                                                                           , pak::pak(c("DBI",          , pkg_install(pkg, ...)                                                       , remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...), ,     list(pkg = pkg, lib = lib, upgrade = upgrade, ask = ask,                , err$throw(res$error)                                                        

pak stable

install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))
#> Installing package into '/usr/local/lib/R/site-library'
#> (as 'lib' is unspecified)
pak::repo_get()
#> ! Optional package `pillar` is not available for pak.
#>   Use `pak::pak_install_extra()` to install optional packages.
#>   Use `options(pak.no_extra_messages = TRUE)` to suppress this message.
#>            name                                                    url type
#> 1          CRAN                            https://p3m.dev/cran/latest cran
#> 2      BioCsoft            https://bioconductor.org/packages/3.20/bioc bioc
#> 3       BioCann https://bioconductor.org/packages/3.20/data/annotation bioc
#> 4       BioCexp https://bioconductor.org/packages/3.20/data/experiment bioc
#> 5 BioCworkflows       https://bioconductor.org/packages/3.20/workflows bioc
#> 6     BioCbooks           https://bioconductor.org/packages/3.20/books bioc
#>   r_version bioc_version
#> 1         *         <NA>
#> 2     4.4.2         3.20
#> 3     4.4.2         3.20
#> 4     4.4.2         3.20
#> 5     4.4.2         3.20
#> 6     4.4.2         3.20
pak::pak("DBI")
#>
#> ✔ Updated metadata database: 2.53 MB in 8 files.
#>
#> ℹ Updating metadata database
#> ✔ Updating metadata database ... done
#>
#>
#> → Will install 1 package.
#> → Will download 1 CRAN package (1.14 MB).
#> + DBI   1.2.3 [bld][dl] (1.14 MB)
#>
#> ℹ Getting 1 pkg (1.14 MB)
#> ✔ Got DBI 1.2.3 (source) (1.14 MB)
#> ℹ Building DBI 1.2.3
#> ✔ Built DBI 1.2.3 (1.7s)
#> ✔ Installed DBI 1.2.3  (28ms)
#> ✔ 1 pkg: added 1, dld 1 (1.14 MB) [7.3s]

Created on 2024-11-23 with reprex v2.1.1

gaborcsardi commented 10 hours ago
> .libPaths("/usr/local/lib/R/site-library/pak/library")
> library(curl)

 *** caught bus error ***
address 0xffff00000001, cause 'invalid alignment'

Traceback:
 1: dyn.load(file, DLLpath = DLLpath, ...)
 2: library.dynam(lib, package, package.lib)
 3: loadNamespace(package, lib.loc)
 4: doTryCatch(return(expr), name, parentenv, handler)
 5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 6: tryCatchList(expr, classes, parentenv, handlers)
 7: tryCatch({    attr(package, "LibPath") <- which.lib.loc    ns <- loadNamespace(package, lib.loc)    env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)}, error = function(e) {    P <- if (!is.null(cc <- conditionCall(e)))         paste(" in", deparse(cc)[1L])    else ""    msg <- gettextf("package or namespace load failed for %s%s:\n %s",         sQuote(package), P, conditionMessage(e))    if (logical.return && !quietly)         message(paste("Error:", msg), domain = NA)    else stop(msg, call. = FALSE, domain = NA)})
 8: library(curl)
gaborcsardi commented 10 hours ago

Also, specific to aarch64. Probably from https://github.com/r-lib/pak/pull/715

Specific to glibc systems as well. At least Alpine does not crash.