Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML has troubles installing on R 4.2 #559

Closed
schloerke opened this issue May 16, 2022 · 14 comments
Closed

XML has troubles installing on R 4.2 #559

schloerke opened this issue May 16, 2022 · 14 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@schloerke
Copy link
Contributor

Describe the bug

{XML} is being installed on ubuntu and is having issues with R >= v4.2

{XML} is installing system requirements and is being built from source. This is expected. It fails during compilation.

To Reproduce

Workflow run: https://github.com/rstudio/shinycoreci/runs/6458218526?check_suite_focus=true

Expected behavior

I expect {XML} to be installed on ubuntu without error.

Additional context

Reprex workflow
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
  push:
    branches: [main, master]

name: XML Debug

jobs:
  debug:
    runs-on: ${{ matrix.config.os }}

    name: ${{ matrix.config.os }} (${{ matrix.config.r }})

    strategy:
      fail-fast: false
      matrix:
        config:
          - {os: ubuntu-latest,   r: 'devel', http-user-agent: 'release'}
          - {os: ubuntu-latest,   r: 'release'}
          - {os: ubuntu-latest,   r: 'oldrel-1'}

    env:
      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
      R_KEEP_PKG_SOURCE: yes

    steps:
      - uses: actions/checkout@v2

      - uses: r-lib/actions/setup-pandoc@v2

      - uses: r-lib/actions/setup-r@v2
        with:
          r-version: ${{ matrix.config.r }}
          http-user-agent: ${{ matrix.config.http-user-agent }}
          use-public-rspm: true

      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          packages: any::XML, any::sessioninfo
          extra-packages: any::rcmdcheck
          needs: check
Failure when creating lock file
2022-05-16T18:51:17.0629973Z ##[group]Installing/updating packages
2022-05-16T18:51:17.9373398Z ℹ Installing lockfile '.github/pkg.lock'
2022-05-16T18:51:18.4865568Z  
2022-05-16T18:51:18.4877018Z → Will install 2 packages.
2022-05-16T18:51:18.5053260Z → Will download 2 CRAN packages (1.04 MB).
2022-05-16T18:51:18.5106169Z + rcmdcheck   1.4.0    [bld][dl] (73.52 kB)
2022-05-16T18:51:18.5107232Z + XML         3.99-0.3 [bld][cmp][dl] (968.54 kB)
2022-05-16T18:51:18.5255911Z ℹ Getting 2 pkgs (1.04 MB)
2022-05-16T18:51:19.4482746Z ✔ Got XML 3.99-0.3 (source) (971.31 kB)
2022-05-16T18:51:19.5022140Z ✔ Got rcmdcheck 1.4.0 (source) (168.57 kB)
2022-05-16T18:51:19.5264322Z ℹ Installing system requirements
2022-05-16T18:51:19.5323639Z ℹ Executing `sudo sh -c apt-get install -y libcurl4-openssl-dev`
2022-05-16T18:51:19.5853332Z Reading package lists...
2022-05-16T18:51:19.7785138Z Building dependency tree...
2022-05-16T18:51:19.9592547Z Reading state information...
2022-05-16T18:51:20.1468750Z The following additional packages will be installed:
2022-05-16T18:51:20.1476100Z curl libcurl4
2022-05-16T18:51:20.1483209Z Suggested packages:
2022-05-16T18:51:20.1484023Z   libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev
2022-05-16T18:51:20.2097111Z The following NEW packages will be installed:
2022-05-16T18:51:20.2110613Z libcurl4-openssl-dev
2022-05-16T18:51:20.2134825Z The following packages will be upgraded:
2022-05-16T18:51:20.2144050Z curl libcurl4
2022-05-16T18:51:20.2596272Z 2 upgraded, 1 newly installed, 0 to remove and 73 not upgraded.
2022-05-16T18:51:20.3444271Z Need to get 718 kB of archives.
2022-05-16T18:51:20.3445231Z After this operation, 1543 kB of additional disk space will be used.
2022-05-16T18:51:20.3446556Z Get:1 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 curl amd64 7.68.0-1ubuntu2.11 [162 kB]
2022-05-16T18:51:20.4050806Z Get:2 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4 amd64 7.68.0-1ubuntu2.11 [235 kB]
2022-05-16T18:51:20.4351556Z Get:3 http://azure.archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4-openssl-dev amd64 7.68.0-1ubuntu2.11 [322 kB]
2022-05-16T18:51:20.8653647Z Fetched 718 kB in 0s (4830 kB/s)
2022-05-16T18:51:20.9093610Z (Reading database ...
2022-05-16T18:51:20.9177470Z (Reading database ... 5%
2022-05-16T18:51:20.9178123Z (Reading database ... 10%
2022-05-16T18:51:20.9180457Z (Reading database ... 15%
2022-05-16T18:51:20.9180939Z (Reading database ... 20%
2022-05-16T18:51:20.9181435Z (Reading database ... 25%
2022-05-16T18:51:20.9183833Z (Reading database ... 30%
2022-05-16T18:51:20.9184317Z (Reading database ... 35%
2022-05-16T18:51:20.9184717Z (Reading database ... 40%
2022-05-16T18:51:20.9185135Z (Reading database ... 45%
2022-05-16T18:51:20.9185546Z (Reading database ... 50%
2022-05-16T18:51:20.9186027Z (Reading database ... 55%
2022-05-16T18:51:20.9211374Z (Reading database ... 60%
2022-05-16T18:51:20.9253458Z (Reading database ... 65%
2022-05-16T18:51:20.9305755Z (Reading database ... 70%
2022-05-16T18:51:20.9332385Z (Reading database ... 75%
2022-05-16T18:51:20.9469765Z (Reading database ... 80%
2022-05-16T18:51:20.9493730Z (Reading database ... 85%
2022-05-16T18:51:20.9907200Z (Reading database ... 90%
2022-05-16T18:51:21.0305946Z (Reading database ... 95%
2022-05-16T18:51:21.0375610Z (Reading database ... 100%
2022-05-16T18:51:21.0376383Z (Reading database ... 250123 files and directories currently installed.)
2022-05-16T18:51:21.0502553Z Preparing to unpack .../curl_7.68.0-1ubuntu2.11_amd64.deb ...
2022-05-16T18:51:21.0542520Z Unpacking curl (7.68.0-1ubuntu2.11) over (7.68.0-1ubuntu2.10) ...
2022-05-16T18:51:21.1252915Z Preparing to unpack .../libcurl4_7.68.0-1ubuntu2.11_amd64.deb ...
2022-05-16T18:51:21.1286093Z Unpacking libcurl4:amd64 (7.68.0-1ubuntu2.11) over (7.68.0-1ubuntu2.10) ...
2022-05-16T18:51:21.1785943Z Selecting previously unselected package libcurl4-openssl-dev:amd64.
2022-05-16T18:51:21.2052119Z Preparing to unpack .../libcurl4-openssl-dev_7.68.0-1ubuntu2.11_amd64.deb ...
2022-05-16T18:51:21.2072847Z Unpacking libcurl4-openssl-dev:amd64 (7.68.0-1ubuntu2.11) ...
2022-05-16T18:51:21.3006210Z Setting up libcurl4:amd64 (7.68.0-1ubuntu2.11) ...
2022-05-16T18:51:21.3054358Z Setting up curl (7.68.0-1ubuntu2.11) ...
2022-05-16T18:51:21.3075154Z Setting up libcurl4-openssl-dev:amd64 (7.68.0-1ubuntu2.11) ...
2022-05-16T18:51:21.3132051Z Processing triggers for man-db (2.9.1-1) ...
2022-05-16T18:51:22.4328966Z Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
2022-05-16T18:51:25.8109071Z ℹ Executing `sudo sh -c apt-get install -y libxml2-dev`
2022-05-16T18:51:25.8650850Z Reading package lists...
2022-05-16T18:51:25.8847353Z Building dependency tree...
2022-05-16T18:51:26.0864752Z Reading state information...
2022-05-16T18:51:26.2959746Z libxml2-dev is already the newest version (2.9.10+dfsg-5ubuntu0.20.04.2).
2022-05-16T18:51:26.2960688Z libxml2-dev set to manually installed.
2022-05-16T18:51:26.3921774Z 0 upgraded, 0 newly installed, 0 to remove and 73 not upgraded.
2022-05-16T18:51:26.4728815Z ℹ Executing `sudo sh -c apt-get install -y libssl-dev`
2022-05-16T18:51:26.5266170Z Reading package lists...
2022-05-16T18:51:26.5461285Z Building dependency tree...
2022-05-16T18:51:26.7422347Z Reading state information...
2022-05-16T18:51:26.9237819Z libssl-dev is already the newest version (1.1.1f-1ubuntu2.13).
2022-05-16T18:51:27.0159731Z 0 upgraded, 0 newly installed, 0 to remove and 73 not upgraded.
2022-05-16T18:51:27.1191252Z ℹ Building XML 3.99-0.3
2022-05-16T18:51:27.3890538Z ℹ Building rcmdcheck 1.4.0
2022-05-16T18:51:27.6809253Z ✔ Built rcmdcheck 1.4.0 (264ms)
2022-05-16T18:51:27.7775507Z ✔ Installed rcmdcheck 1.4.0  (44ms)
2022-05-16T18:51:30.2366977Z ✖ Failed to build XML 3.99-0.3
2022-05-16T18:51:30.3370808Z 
2022-05-16T18:51:30.3412895Z ##[error]Error: <callr_remote_error: Failed to build source package 'XML'>
2022-05-16T18:51:30.3422775Z  in process 8256 
2022-05-16T18:51:30.3423254Z -->
2022-05-16T18:51:30.3423770Z Failed to build source package 'XML', stdout + stderr:
2022-05-16T18:51:30.3423989Z 
2022-05-16T18:51:30.3424371Z OE> * installing *source* package ‘XML’ ...
2022-05-16T18:51:30.3424976Z OE> ** package ‘XML’ successfully unpacked and MD5 sums checked
2022-05-16T18:51:30.3425446Z OE> staged installation is only possible with locking
2022-05-16T18:51:30.3425888Z OE> ** using non-staged installation
2022-05-16T18:51:30.3426229Z OE> checking for gcc... gcc
2022-05-16T18:51:30.3426624Z OE> checking whether the C compiler works... yes
2022-05-16T18:51:30.3427089Z OE> checking for C compiler default output file name... a.out
2022-05-16T18:51:30.3427510Z OE> checking for suffix of executables... 
2022-05-16T18:51:30.3427914Z OE> checking whether we are cross compiling... no
2022-05-16T18:51:30.3428325Z OE> checking for suffix of object files... o
2022-05-16T18:51:30.3428769Z OE> checking whether we are using the GNU C compiler... yes
2022-05-16T18:51:30.3429255Z OE> checking whether gcc accepts -g... yes
2022-05-16T18:51:30.3429706Z OE> checking for gcc option to accept ISO C89... none needed
2022-05-16T18:51:30.3430199Z OE> checking how to run the C preprocessor... gcc -E
2022-05-16T18:51:30.3430575Z OE> checking for sed... /usr/bin/sed
2022-05-16T18:51:30.3431059Z OE> checking for pkg-config... /usr/bin/pkg-config
2022-05-16T18:51:30.3431576Z OE> checking for xml2-config... /usr/bin/xml2-config
2022-05-16T18:51:30.3431907Z OE> USE_XML2 = yes
2022-05-16T18:51:30.3432243Z OE> SED_EXTENDED_ARG: -E
2022-05-16T18:51:30.3432573Z OE> Minor 9, Patch 10 for 2.9.10
2022-05-16T18:51:30.3433054Z OE> Located parser file -I/usr/include/libxml2/parser.h
2022-05-16T18:51:30.3433550Z OE> Checking for 1.8:  -I/usr/include/libxml2
2022-05-16T18:51:30.3434426Z OE> Using libxml2.*
2022-05-16T18:51:30.3434842Z OE> checking for gzopen in -lz... yes
2022-05-16T18:51:30.3435320Z OE> checking for xmlParseFile in -lxml2... yes
2022-05-16T18:51:30.3435789Z OE> checking for xmlHashSize in -lxml2... yes
2022-05-16T18:51:30.3436202Z OE> Using built-in xmlHashSize
2022-05-16T18:51:30.3436959Z OE> Checking DTD parsing (presence of externalSubset)...
2022-05-16T18:51:30.3437481Z OE> checking for xmlHashSize in -lxml2... yes
2022-05-16T18:51:30.3437932Z OE> Found xmlHashSize
2022-05-16T18:51:30.3438469Z OE> checking for xmlOutputBufferCreateBuffer in -lxml2... yes
2022-05-16T18:51:30.3438903Z OE> have xmlOutputBufferCreateBuffer()
2022-05-16T18:51:30.3439472Z OE> checking for xmlDocDumpFormatMemoryEnc in -lxml2... yes
2022-05-16T18:51:30.3439931Z OE> checking libxml/xmlversion.h usability... yes
2022-05-16T18:51:30.3440359Z OE> checking libxml/xmlversion.h presence... yes
2022-05-16T18:51:30.3440767Z OE> checking for libxml/xmlversion.h... yes
2022-05-16T18:51:30.3441088Z OE> Expat:  FALSE
2022-05-16T18:51:30.3441483Z OE> Checking for return type of xmlHashScan element routine.
2022-05-16T18:51:30.3441875Z OE> No return value for xmlHashScan
2022-05-16T18:51:30.3442215Z OE> xmlNs has a context field
2022-05-16T18:51:30.3442560Z OE> Checking for cetype_t enumeration
2022-05-16T18:51:30.3443039Z OE> Using recent version of R with cetype_t enumeration type for encoding
2022-05-16T18:51:30.3443517Z OE> checking for xmlsec1-config... no
2022-05-16T18:51:30.3443840Z OE> nodegc default 
2022-05-16T18:51:30.3444188Z OE> xml-debug default 
2022-05-16T18:51:30.3444506Z OE> Version has XML_WITH_ZLIB
2022-05-16T18:51:30.3444841Z OE> Version has xmlHasFeature()
2022-05-16T18:51:30.3445098Z OE> 
2022-05-16T18:51:30.3445391Z OE> ****************************************
2022-05-16T18:51:30.3445719Z OE> Configuration information:
2022-05-16T18:51:30.3445972Z OE> 
2022-05-16T18:51:30.3446230Z OE> Libxml settings
2022-05-16T18:51:30.3446462Z OE> 
2022-05-16T18:51:30.3446887Z OE> libxml include directory: -I/usr/include/libxml2
2022-05-16T18:51:30.3447391Z OE> libxml library directory: -lxml2 -lz  -lxml2
2022-05-16T18:51:30.3447841Z OE> libxml 2:                 -DLIBXML2=1
2022-05-16T18:51:30.3448095Z OE> 
2022-05-16T18:51:30.3449805Z OE> Compilation flags:         -DLIBXML -I/usr/include/libxml2 -DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DDUMP_WITH_ENCODING=1 -DUSE_XML_VERSION_H=1 -DXML_ELEMENT_ETYPE=1 -DXML_ATTRIBUTE_ATYPE=1 -DNO_XML_HASH_SCANNER_RETURN=1 -DLIBXML_NAMESPACE_HAS_CONTEXT=1 -DHAVE_R_CETYPE_T=1 -DHAVE_XML_WITH_ZLIB=1 -DHAVE_XML_HAS_FEATURE=1 -DUSE_R=1 -D_R_=1  -DHAVE_VALIDITY=1 -DXML_REF_COUNT_NODES=1 
2022-05-16T18:51:30.3450747Z OE> Link flags:               -lxml2 -lz  -lxml2
2022-05-16T18:51:30.3451012Z OE> 
2022-05-16T18:51:30.3451302Z OE> ****************************************
2022-05-16T18:51:30.3451843Z OE> configure: creating ./config.status
2022-05-16T18:51:30.3452244Z OE> config.status: creating src/Makevars
2022-05-16T18:51:30.3452634Z OE> config.status: creating R/supports.R
2022-05-16T18:51:30.3453052Z OE> config.status: creating inst/scripts/RSXML.csh
2022-05-16T18:51:30.3453469Z OE> config.status: creating inst/scripts/RSXML.bsh
2022-05-16T18:51:30.3453787Z OE> ** libs
2022-05-16T18:51:30.3492699Z OE> gcc -I"/opt/R/4.2.0/lib/R/include" -DNDEBUG -DLIBXML -I/usr/include/libxml2 -DUSE_EXTERNAL_SUBSET=1 -DROOT_HAS_DTD_NODE=1 -DDUMP_WITH_ENCODING=1 -DUSE_XML_VERSION_H=1 -DXML_ELEMENT_ETYPE=1 -DXML_ATTRIBUTE_ATYPE=1 -DNO_XML_HASH_SCANNER_RETURN=1 -DLIBXML_NAMESPACE_HAS_CONTEXT=1 -DHAVE_R_CETYPE_T=1 -DHAVE_XML_WITH_ZLIB=1 -DHAVE_XML_HAS_FEATURE=1 -DUSE_R=1 -D_R_=1  -DHAVE_VALIDITY=1 -DXML_REF_COUNT_NODES=1  -I. -DLIBXML2=1  -I/usr/local/include   -fpic  -g -O2  -Wall -pedantic -c DocParse.c -o DocParse.o
2022-05-16T18:51:30.3493939Z OE> DocParse.c: In function ‘RS_XML_ParseTree’:
2022-05-16T18:51:30.3512919Z OE> DocParse.c:165:7: error: ‘PROBLEM’ undeclared (first use in this function)
2022-05-16T18:51:30.3513529Z OE>   165 |       PROBLEM "Can't find file %s", CHAR_DEREF(STRING_ELT(fileName, 0))
2022-05-16T18:51:30.3513872Z OE>       |       ^~~~~~~
2022-05-16T18:51:30.3514368Z OE> DocParse.c:165:7: note: each undeclared identifier is reported only once for each function it appears in
2022-05-16T18:51:30.3514952Z OE> DocParse.c:165:14: error: expected ‘;’ before string constant
2022-05-16T18:51:30.3515759Z OE>   165 |       PROBLEM "Can't find file %s", CHAR_DEREF(STRING_ELT(fileName, 0))
2022-05-16T18:51:30.3516235Z OE>       |              ^~~~~~~~~~~~~~~~~~~~~
2022-05-16T18:51:30.3516612Z OE>       |              ;
2022-05-16T18:51:30.3517125Z OE> DocParse.c:229:14: error: expected ‘;’ before string constant
2022-05-16T18:51:30.3517542Z OE>   229 |       PROBLEM "error in creating parser for %s", name
2022-05-16T18:51:30.3517912Z OE>       |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-16T18:51:30.3518171Z OE>       |              ;
2022-05-16T18:51:30.3518632Z OE> DocParse.c:249:11: error: expected ‘;’ before string constant
2022-05-16T18:51:30.3519010Z OE>   249 |    PROBLEM "XML document is invalid"
2022-05-16T18:51:30.3519341Z OE>       |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-16T18:51:30.3519600Z OE>       |           ;
2022-05-16T18:51:30.3520109Z OE> DocParse.c: In function ‘RS_XML_internalNodeNamespaceDefinitions’:
2022-05-16T18:51:30.3520724Z OE> DocParse.c:519:8: error: ‘PROBLEM’ undeclared (first use in this function)
2022-05-16T18:51:30.3521270Z OE>   519 |        PROBLEM "R_internalNodeNamespaceDefinitions expects InternalXMLNode objects"
2022-05-16T18:51:30.3521652Z OE>       |        ^~~~~~~
2022-05-16T18:51:30.3522105Z OE> DocParse.c:519:15: error: expected ‘;’ before string constant
2022-05-16T18:51:30.3522623Z OE>   519 |        PROBLEM "R_internalNodeNamespaceDefinitions expects InternalXMLNode objects"
2022-05-16T18:51:30.3523111Z OE>       |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-16T18:51:30.3523402Z OE>       |               ;
2022-05-16T18:51:30.3523814Z OE> DocParse.c: In function ‘R_getNodeChildByIndex’:
2022-05-16T18:51:30.3524383Z OE> DocParse.c:1254:2: error: ‘PROBLEM’ undeclared (first use in this function)
2022-05-16T18:51:30.3524874Z OE>  1254 |  PROBLEM "cannot index an internal node with a negative number %d", num
2022-05-16T18:51:30.3525199Z OE>       |  ^~~~~~~
2022-05-16T18:51:30.3525651Z OE> DocParse.c:1254:9: error: expected ‘;’ before string constant
2022-05-16T18:51:30.3526111Z OE>  1254 |  PROBLEM "cannot index an internal node with a negative number %d", num
2022-05-16T18:51:30.3526529Z OE>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-16T18:51:30.3526802Z OE>       |         ;
2022-05-16T18:51:30.3527216Z OE> DocParse.c: In function ‘RS_XML_setDocumentName’:
2022-05-16T18:51:30.3527778Z OE> DocParse.c:1303:2: error: ‘PROBLEM’ undeclared (first use in this function)
2022-05-16T18:51:30.3528229Z OE>  1303 |  PROBLEM "NULL pointer supplied for internal document"
2022-05-16T18:51:30.3528535Z OE>       |  ^~~~~~~
2022-05-16T18:51:30.3528970Z OE> DocParse.c:1303:9: error: expected ‘;’ before string constant
2022-05-16T18:51:30.3529391Z OE>  1303 |  PROBLEM "NULL pointer supplied for internal document"
2022-05-16T18:51:30.3529775Z OE>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-16T18:51:30.3530043Z OE>       |         ;
2022-05-16T18:51:30.3530469Z OE> DocParse.c: In function ‘RS_XML_getDocumentName’:
2022-05-16T18:51:30.3531027Z OE> DocParse.c:1326:2: error: ‘PROBLEM’ undeclared (first use in this function)
2022-05-16T18:51:30.3531467Z OE>  1326 |  PROBLEM "NULL pointer supplied for internal document"
2022-05-16T18:51:30.3531916Z OE>       |  ^~~~~~~
2022-05-16T18:51:30.3532370Z OE> DocParse.c:1326:9: error: expected ‘;’ before string constant
2022-05-16T18:51:30.3532796Z OE>  1326 |  PROBLEM "NULL pointer supplied for internal document"
2022-05-16T18:51:30.3533181Z OE>       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-16T18:51:30.3533444Z OE>       |         ;
2022-05-16T18:51:30.3533903Z OE> DocParse.c: In function ‘RS_XML_xmlXIncludeProcessTreeFlags’:
2022-05-16T18:51:30.3534607Z OE> DocParse.c:1375:2: error: ‘PROBLEM’ undeclared (first use in this function)
2022-05-16T18:51:30.3534992Z OE>  1375 |  PROBLEM "failed in XInclude"
2022-05-16T18:51:30.3535263Z OE>       |  ^~~~~~~
2022-05-16T18:51:30.3535853Z OE> DocParse.c:1375:9: error: expected ‘;’ before string constant
2022-05-16T18:51:30.3536220Z OE>  1375 |  PROBLEM "failed in XInclude"
2022-05-16T18:51:30.3536603Z OE>       |         ^~~~~~~~~~~~~~~~~~~~~
2022-05-16T18:51:30.3536858Z OE>       |         ;
2022-05-16T18:51:30.3537241Z OE> make: *** [/opt/R/4.2.0/lib/R/etc/Makeconf:168: DocParse.o] Error 1
2022-05-16T18:51:30.3537708Z OE> ERROR: compilation failed for package ‘XML’
2022-05-16T18:51:30.3538182Z OE> * removing ‘/tmp/RtmpafhyXs/pkg-lib204014b5fb69/XML’
2022-05-16T18:51:30.3538377Z 
2022-05-16T18:51:30.3538581Z  Stack trace:
2022-05-16T18:51:30.3538701Z 
2022-05-16T18:51:30.3538833Z  12. (function (...)  ...
2022-05-16T18:51:30.3539248Z  13. base:::withCallingHandlers(cli_message = function(msg) { ...
2022-05-16T18:51:30.3539682Z  14. get("lockfile_install_internal", asNamespace("pak"))(...)
2022-05-16T18:51:30.3539999Z  15. plan$install()
2022-05-16T18:51:30.3540395Z  16. pkgdepends:::install_package_plan(plan, lib = private$library,  ...
2022-05-16T18:51:30.3540826Z  17. base:::withCallingHandlers({ ...
2022-05-16T18:51:30.3541175Z  18. pkgdepends:::handle_events(state, events)
2022-05-16T18:51:30.3541529Z  19. pkgdepends:::handle_event(state, i)
2022-05-16T18:51:30.3541870Z  20. pkgdepends:::stop_task(state, worker)
2022-05-16T18:51:30.3542235Z  21. pkgdepends:::stop_task_build(state, worker)
2022-05-16T18:51:30.3542690Z  22. base:::throw(new_pkg_build_error("Failed to build source package {pkg}",  ...
2022-05-16T18:51:30.3543060Z  23. base:::signalCondition(cond)
2022-05-16T18:51:30.3543335Z  24. (function (e)  ...
2022-05-16T18:51:30.3543572Z  25. base:::stop(e)
2022-05-16T18:51:30.3543824Z  26. (function (e)  ...
2022-05-16T18:51:30.3543963Z 
2022-05-16T18:51:30.3544210Z  x Failed to build source package 'XML' 
2022-05-16T18:51:30.3544378Z 
2022-05-16T18:51:30.3544495Z Execution halted
2022-05-16T18:51:30.3632270Z ##[error]Process completed with exit code 1.
2022-05-16T18:51:30.3762480Z Post job cleanup.
2022-05-16T18:51:30.3800956Z Post job cleanup.
2022-05-16T18:51:30.5111433Z [command]/usr/bin/git version
2022-05-16T18:51:30.5164154Z git version 2.36.1
2022-05-16T18:51:30.5210679Z Temporarily overriding HOME='/home/runner/work/_temp/f0b8abfa-e599-42c2-9f56-a18bd91127dd' before making global git config changes
2022-05-16T18:51:30.5213442Z Adding repository directory to the temporary git global config as a safe directory
2022-05-16T18:51:30.5220236Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/shinycoreci/shinycoreci
2022-05-16T18:51:30.5266980Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2022-05-16T18:51:30.5309376Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2022-05-16T18:51:30.5641586Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2022-05-16T18:51:30.5722198Z http.https://github.com/.extraheader
2022-05-16T18:51:30.5744356Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2022-05-16T18:51:30.5789989Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2022-05-16T18:51:30.6333280Z Cleaning up orphan processes
@schloerke schloerke added the bug an unexpected problem or unintended behavior label May 16, 2022
@gaborcsardi
Copy link
Member

This is a bug in pak. It might work if you drop the any:: prefix for XML.

@schloerke
Copy link
Contributor Author

Yes! It works as expected by dropping the any::

@schloerke
Copy link
Contributor Author

Closing as in pack and there is a work around

@gaborcsardi
Copy link
Member

This is actually a relatively common error, and it needs to be fixed in pak.

@gaborcsardi gaborcsardi reopened this May 18, 2022
@gaborcsardi gaborcsardi pinned this issue May 18, 2022
@tarensanders
Copy link

In case it's helpful for anyone else, adding

extra-packages: any::rcmdcheck, any::XML

solved this for me when XML was a dependency of a dependency, but wasn't building on ubuntu.

(Maybe that is obvious to others, but took me a couple of attempts to get it working).

@grimbough
Copy link

In case it's useful, this was also reported at https://community.rstudio.com/t/public-rspm-presents-outdated-version-of-xml-package/130118 where it was pointed out that there are two versions of {XML} on CRAN (https://cran.r-project.org/src/contrib/Older/) and in the GitHub action context {pak} seems to be trying to get the older one.

hulsiejames added a commit to udsleeds/openinfra that referenced this issue Jun 13, 2022
kupietz added a commit to KorAP/RKorAPClient that referenced this issue Jun 29, 2022
r-lib/actions#559

Change-Id: I5cc1399141fd1cfea471e7bb1a864726c30fa1a4
idsgerrit pushed a commit to KorAP/RKorAPClient that referenced this issue Jun 29, 2022
https: //github.com/r-lib/actions/issues/559
Change-Id: I0d8fd1739dc4c7bb4ae279b00008882cc4449cc6
jayhesselberth added a commit to rnabioco/valr that referenced this issue Jul 2, 2022
joelnitta added a commit to ropensci/restez that referenced this issue Jul 7, 2022
achubaty added a commit to achubaty/NLMR that referenced this issue Aug 11, 2022
@IndrajeetPatil
Copy link
Contributor

Including any::XML no longer seems to do the trick; builds still fail.

@bersbersbers
Copy link

Including any::XML no longer seems to do the trick; builds still fail.

I cannot confirm this observation. Just added any::XML to my workflows and that fixed my problems.

ChristopherEeles added a commit to bhklab/AnnotationGx that referenced this issue Sep 19, 2022
@jeffreyhanson
Copy link

If you're still having trouble with any::XML like me (e.g., with Ubuntu on GitHub Actions), it fails to install due to compiliation errors during installation. This is because pak currently installs an older version of XML (version 3.99-0.3). As a work around, we can tell pak to install the latest version of XML (version 3.99-0.10) using the GitHub CRAN mirror by using cran/XML. Although I tried using cran::XML, this didn't seem to work for me.

@jeffreyhanson
Copy link

Note that using cran/XML will fail on Windows instances, so you'll want to use any::XML for Windows runs.

njtierney added a commit to idem-lab/conmat that referenced this issue Oct 2, 2022
milanmlft added a commit to statOmics/msqrob2 that referenced this issue Oct 10, 2022
* Simplify GHA

Use actions from https://github.com/grimbough/bioc-actions

* Add code coverage testing

* Bug fix in `build-check` job

* Let BiocCheck error on Warnings

* Fix XML installation in `test-coverage`

Using suggestion from r-lib/actions#559 (comment)

* Disable version number checking
NiccoloSalvini added a commit to CORE-forge/corel190 that referenced this issue Oct 15, 2022
NiccoloSalvini added a commit to CORE-forge/corel190 that referenced this issue Oct 15, 2022
giuseppec added a commit to openml/openml-r that referenced this issue Oct 19, 2022
@gaborcsardi
Copy link
Member

gaborcsardi commented Oct 21, 2022

So the problem is that pak does not use the version numbers to decide between two candidates for a package. It relies on the dependency solver to select one candidate, which should be the one with the fewest dependencies.

If they have the same (recursive) dependencies, then the choice might be arbitrary, the solver seems to choose the first one. This is OK for the CRAN repo, because the latest package is always (?) first, i.e. for XML it has

Package: XML
Version: 3.99-0.11
Depends: R (>= 4.0.0), methods, utils
Suggests: bitops, RCurl
License: BSD_3_clause + file LICENSE
MD5sum: dccc7171ea3d8492c7bd4c8de5bbe51d
NeedsCompilation: yes

Package: XML
Version: 3.99-0.3
Depends: R (>= 2.13.0), methods, utils
Suggests: bitops, RCurl
License: BSD_3_clause + file LICENSE
MD5sum: 424ade48afa7ab9da1ba5b9443b565ff
NeedsCompilation: yes
Path: Older

But RSPM has them reversed. (IDK if this is deterministic in RSPM, it might be by chance.)

This would be all fine if XML 3.99-0.3 worked on R 4.2.x, but it does not. (So it should specify R (< 4.2), really.)

So the solution is to make pkgdepends mimic what install.packages() does and choose the latest version between candidates that have the same platform. (The platform condition is important, because we still want to be able to choose an older binary instead of a newer sources package.)

gaborcsardi added a commit to r-lib/pkgdepends that referenced this issue Oct 21, 2022
For r-lib/actions#559

So the problem is that pak does not use the version numbers to
decide between two candidates for a package. It relies on the
dependency solver to select one candidate, which should be
the one with the fewest dependencies.

If they have the same (recursive) dependencies, then the choice
might be arbitrary, the solver seems to choose the first one.
This is OK for the CRAN repo, because the latest package is
always (?) first, i.e. for XML it has

```
Package: XML
Version: 3.99-0.11
Depends: R (>= 4.0.0), methods, utils
Suggests: bitops, RCurl
License: BSD_3_clause + file LICENSE
MD5sum: dccc7171ea3d8492c7bd4c8de5bbe51d
NeedsCompilation: yes

Package: XML
Version: 3.99-0.3
Depends: R (>= 2.13.0), methods, utils
Suggests: bitops, RCurl
License: BSD_3_clause + file LICENSE
MD5sum: 424ade48afa7ab9da1ba5b9443b565ff
NeedsCompilation: yes
Path: Older
```

But RSPM has them reversed. (IDK if this is deterministic
in RSPM, it might be by chance.)

This would be all fine if XML 3.99-0.3 worked on R 4.2.x,
but it does not. (So it should specify R (< 4.2), really.)

So the solution is to make pkgdepends mimic what
install.packages() does and choose the latest version between
candidates that have the same platform. (The platform condition
is important, because we still want to be able to choose an
older binary instead of a newer sources package.)
@gaborcsardi
Copy link
Member

This should be now fixed with pak-version: devel.

lcolladotor added a commit to lcolladotor/biocthis that referenced this issue Oct 31, 2022
clnsmth added a commit to EDIorg/EMLassemblyline that referenced this issue Oct 31, 2022
This temporary fix resolves the failing website build and deployment to the gh-pages branch of the EMLassemblyline GitHub (GH) repository. This GH Action is defined in pkgdown.yml. More information on the fix is at r-lib/actions#559.
clnsmth added a commit to EDIorg/EMLassemblyline that referenced this issue Nov 1, 2022
* Fix GH Action dependency issue

This temporary fix resolves the failing website build and deployment to the gh-pages branch of the EMLassemblyline GitHub (GH) repository. This GH Action is defined in pkgdown.yml. More information on the fix is at r-lib/actions#559.

* Tag internal only funcs for doc build

Internal only use functions should be tagged or pkgdown fails.
milanmlft added a commit to statOmics/TargetDecoy that referenced this issue Nov 4, 2022
ndrewwm added a commit to ndrewwm/shiny-mtgperf that referenced this issue Nov 5, 2022
@github-actions
Copy link

github-actions bot commented Nov 5, 2022

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2022
@gaborcsardi
Copy link
Member

The new version of pak is out, so this does not need pak-version: devel any more.

@gaborcsardi gaborcsardi unpinned this issue Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

7 participants