I am maintainer of an R package (sfnetworks) that depends on igraph. I have been contacted by CRAN that I am “using a optional feature of igraph, one that the igraph maintainer has broken the detection of on macOS”. I have looked through all recent igraph changelogs and cannot find anything that mentions something like that.
Thanks for the heads up; libxml2 is an optional component of the core C igraph library so it may be the case that the environment in which the R packages are built on CRAN does not have libxml2 available (or something goes wrong with the auto-detection) and the igraph versions on CRAN were built without libxml2.
I’ll look into this and post an update to CRAN if it is the case. We definitely did not mean to remove GraphML support from igraph on CRAN.
So it seems like the versions on CRAN were indeed compiled without GraphML support. However, I don’t know how it could have happened because a recent build on RHub detected libxml2 correctly on macOS:
It looks like the libxml2 detection code can fail in igraph’s configure.ac script under special circumstances because we are not using all the flags from the output of xml2-config --libs when trying to link to libxml2. This happens to be okay 99% of the time on macOS because libxml2 is on the system path so no special linker flags are needed, but it is not okay on the machines where CRAN builds the packages so the detection fails there. (Thanks to Prof Ripley for finding this).
igraph 1.2.10 is now on its way to CRAN; the sources are already there. Please give it a go when the macOS version is ready (you can follow the progress here ).
Just to clarify, sfnetworks is failing now on r-devel-windows-x86_64-new-TK as well. Since we are urged by CRAN to make libxml2 conditional on our end, we will remove the GraphML use for now. We will come back to you when we manage to fix this from our side if someone else finds it useful.