GraphML support on MacOS

Dear igraph maintainers!

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.

Given the warnings resulting from the CRAN checks on MacOS (CRAN Package Check Results for Package sfnetworks) it seems to me the issue relates to support for reading GraphML files:

At foreign-graphml.c:1446 : GraphML support is disabled, Unimplemented function call

My question is: is it true that, as stated by CRAN, support for GraphML is recently disabled on MacOS by the igraph maintainers? The only thing I can find about it relates to Windows and not MacOS: Reading GraphML files not enables · Issue #32 · conda-forge/python-igraph-feedstock · GitHub If yes, should this be mentioned somewhere in the igraph changelogs?

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:

I need to investigate this in more detail.

Just checking: is libxml2 also disabled in the Windows binary from CRAN?

Most likely not, otherwise the checks for sfnetworks should have failed on Windows as well.

1 Like

It looks like the libxml2 detection code can fail in igraph’s 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).

I’ll submit a patched version to CRAN soon.


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 ).

1 Like

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.

1 Like