Skip to content

more system dependencies for language:r #339

Description

@lorenzwalthert

Some hook updates fail, e.g. this PR: lorenzwalthert/precommit#685. Looking at the diff, there are only two package versions updated and it seems they previously had recursive dependencies on R packages that depended on some system dependencies (like {V8}), but no code path actually checked for these dependencies previously. This apparently changed. In the pre-commit.ci build log, we get:

build attempt 1...
    => error
    [INFO] Installing environment for https://github.com/lorenzwalthert/precommit.
    [INFO] Once installed this environment will be reused.
    [INFO] This may take a few minutes...
    An unexpected error has occurred: CalledProcessError: command: ('/opt/r/bin/Rscript', '--vanilla', '/tmp/tmpx51lm3ap/script.R')
    return code: 1
    stdout:
        # Bootstrapping renv 1.2.3 ---------------------------------------------------
        - Downloading renv ... OK
        - Installing renv  ... OK
    
        - None of the packages recorded in the lockfile are currently installed.
        - Use `renv::restore()` to restore the project library.
        The following required system packages are not installed:
        - libcurl4-openssl-dev  [required by curl]
        - libnode-dev           [required by V8]
        - libxml2-dev           [required by xml2]
        - pandoc                [required by knitr]
        The R packages depending on these system packages may fail to install.
    
        An administrator can install these packages with:
        - sudo apt install libcurl4-openssl-dev libnode-dev libxml2-dev pandoc
    
        The following package(s) will be updated:
    

And further down:

    stderr:
        Warning messages:
        1: In file(file, "rt") :
          cannot open file '/opt/r/lib/R/doc/CRAN_mirrors.csv': No such file or directory
        2: In value[[3L]](cond) : cannot open the connection
        Error: error testing if 'V8' can be loaded [error code 1]
        /opt/r/lib/R/bin/R --vanilla -s -f '/tmp/RtmpN2MWVa/renv-install-3c21e7ad06e.R'
        ===============================================================================
    
        Error in dyn.load(file, DLLpath = DLLpath, ...) : 
          unable to load shared object '/pc/clone/LpTyOK7wR2u4Ro8izrEMqA/renv-default/renv/staging/1/V8/libs/V8.so':
          libnode.so.109: cannot open shared object file: No such file or directory
        Calls: loadNamespace -> library.dynam -> dyn.load
        Execution halted
        In addition: Warning messages:
        1: In file(file, "rt") :
          cannot open file '/opt/r/lib/R/doc/CRAN_mirrors.csv': No such file or directory
        2: In value[[3L]](cond) : cannot open the connection
        Execution halted
    Check the log at /pc/pre-commit.log

Can I send a PR to add these system dependencies similar to #334?

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