Skip to content

Compilation issue when running package_coverage on RcppParallel ( undefined symbol: __gcov_merge_add ) #624

@gowerc

Description

@gowerc

Not entirely sure if its a RcppParallel issue or a covr issue but my current guess is covr :(

Minimal Repex:

curl \
    -s \
    --output RcppParallel.tar.gz\
    https://cran.r-project.org/src/contrib/RcppParallel_5.1.11-1.tar.gz

tar -xzf RcppParallel.tar.gz

Rscript - <<HERE
covr::package_coverage(
    "RcppParallel",
    quiet = FALSE
)
HERE

Error message:

installing via 'install.libs.R' to /tmp/RtmpoTvtvj/R_LIBSa1226710cf12/RcppParallel
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'RcppParallel'
    RcppParallel.package.skeleton           example
    setThreadOptions                        example
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for 'RcppParallel':
 .onLoad failed in loadNamespace() for 'RcppParallel', details:
  call: dyn.load(path, local = FALSE, now = TRUE)
  error: unable to load shared object '/tmp/RtmpoTvtvj/R_LIBSa1226710cf12/RcppParallel/lib/libtbb.so.2':
  /tmp/RtmpoTvtvj/R_LIBSa1226710cf12/RcppParallel/lib/libtbb.so.2: undefined symbol: __gcov_merge_add
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/tmp/RtmpoTvtvj/R_LIBSa1226710cf12/RcppParallel'
Error in covr::package_coverage("RcppParallel", quiet = FALSE) : 
  Package installation did not succeed.
Execution halted

Debug info:

> sessionInfo()
R version 4.5.1 (2025-06-13)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0

locale:
[1] C

time zone: Etc/UTC
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.5.1
> installed.packages()[, "Version"]
          DT           R6        RUnit         Rcpp RcppParallel           S7 
    "0.34.0"      "2.6.1"   "0.4.33.1"      "1.1.0"   "5.1.11-1"      "0.2.0" 
     askpass    base64enc          box         brio        bslib       cachem 
     "1.2.1"      "0.1-3"      "1.2.0"      "1.1.5"      "0.9.0"      "1.1.0" 
       callr          cli         covr       crayon    crosstalk         curl 
     "3.7.6"      "3.6.5"      "3.6.5"      "1.5.3"      "1.2.2"      "7.0.0" 
        desc      diffobj       digest     evaluate      fastmap  fontawesome 
     "1.4.3"      "0.3.6"     "0.6.37"      "1.0.5"      "1.2.0"      "0.5.3" 
          fs         glue        highr    htmltools  htmlwidgets         httr 
     "1.6.6"      "1.8.0"       "0.11"    "0.5.8.1"      "1.6.4"      "1.4.7" 
   jquerylib     jsonlite        knitr        later     lazyeval    lifecycle 
     "0.1.4"      "2.0.0"       "1.50"      "1.4.4"      "0.2.2"      "1.0.4" 
    magrittr      memoise         mime      openssl         otel     pkgbuild 
     "2.0.4"      "2.0.1"       "0.13"      "2.3.4"      "0.2.0"      "1.4.8" 
     pkgload       praise     processx     promises           ps     rappdirs 
     "1.4.1"      "1.0.0"      "3.8.6"      "1.5.0"      "1.9.1"      "0.3.3" 
         rex        rlang    rmarkdown    rprojroot   rstudioapi         sass 
     "1.2.1"      "1.1.6"       "2.30"      "2.1.1"     "0.17.1"     "0.4.10" 
         sys     testthat      tinytex        waldo        withr         xfun 
     "3.4.3"      "3.2.3"       "0.57"      "0.6.2"      "3.0.2"       "0.54" 
        xml2         yaml   KernSmooth         MASS       Matrix         base 
     "1.4.1"     "2.3.10"    "2.23-26"     "7.3-65"      "1.7-4"      "4.5.1" 
        boot        class      cluster    codetools     compiler     datasets 
    "1.3-32"     "7.3-23"    "2.1.8.1"     "0.2-19"      "4.5.1"      "4.5.1" 
     foreign    grDevices     graphics         grid      lattice      methods 
    "0.8-90"      "4.5.1"      "4.5.1"      "4.5.1"     "0.22-5"      "4.5.1" 
        mgcv         nlme         nnet     parallel        rpart      spatial 
     "1.9-1"    "3.1-168"     "7.3-20"      "4.5.1"     "4.1.24"     "7.3-15" 
     splines        stats       stats4     survival        tcltk        tools 
     "4.5.1"      "4.5.1"      "4.5.1"      "3.8-3"      "4.5.1"      "4.5.1" 
       utils 
     "4.5.1" 
> cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions