r-lib / xml2

Bindings to libxml2
https://xml2.r-lib.org/
Other
218 stars 83 forks source link

Error during installation of xml2 #418

Closed Unaimend closed 9 months ago

Unaimend commented 9 months ago

Brief description of the problem Installing xml2 package results in following error.

xml2_init.cpp: In function 'SEXPREC* init_libxml2()':
xml2_init.cpp:46:35: error: invalid conversion from 'void (*)(void*, xmlError*)' {aka 'void (*)(void*, _xmlError*)'} to 'xmlStructuredErrorFunc' {aka 'void (*)(void*, const _xmlError*)'} [-fpermissive]
   46 |   xmlSetStructuredErrorFunc(NULL, handleStructuredError);
      |                                   ^~~~~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   void (*)(void*, xmlError*) {aka void (*)(void*, _xmlError*)}
In file included from xml2_init.cpp:8:
/home/td/Projects/Aging/Baseline/GIN/MicrobiomeGS/community_modeling_coupling/.snakemake/conda/d02a769616c111eca43b9ae67bcda15f_/include/libxml2/libxml/xmlerror.h:898:57: note:   initializing argument 2 of 'void xmlSetStructuredErrorFunc(void*, xmlStructuredErrorFunc)'
  898 |                                  xmlStructuredErrorFunc handler);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
make: *** [/home/td/Projects/Aging/Baseline/GIN/MicrobiomeGS/community_modeling_coupling/.snakemake/conda/d02a769616c111eca43b9ae67bcda15f_/lib/R/etc/Makeconf:200: xml2_init.o] Error 1
ERROR: compilation failed for package ‘xml2’
* removing ‘/home/td/Projects/Aging/Baseline/GIN/MicrobiomeGS/community_modeling_coupling/.snakemake/conda/d02a769616c111eca43b9ae67bcda15f_/lib/R/library/xml2’

The downloaded source packages are in
    ‘/tmp/RtmpBgSu61/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Libxml version: + libxml2 2.12.0 h232c23b_0 conda-forge/linux-64 Cached R version 4.3.2 (2023-10-31) -- "Eye Holes" OS: Ubuntu 22.04.2 LTS

Conda environment that was used to install R

name: MicrobiomeGS2
channels:
  - conda-forge
dependencies:
  - glpk
  - r-base
  - r-rcurl
Not applicable
RandomTypek commented 9 months ago

Until the fix gets merged, you can install with pak::pak("KNnut/xml2@fix-build") in R cmdline