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

Can't build xml2 with non-system-wide libxml2? #163

jonathanronen opened this Issue Jan 10, 2017 · 4 comments


None yet
3 participants

jonathanronen commented Jan 10, 2017

Building this on a system where I don't have root access (so I have libxml and other libraries in a custom path, not /usr). I get the following error:

xml2_output.cpp: In function ‘Rcpp::IntegerVector xml_save_options()’:
xml2_output.cpp:45: error: ‘XML_SAVE_WSNONSIG’ was not declared in this scope
make: *** [xml2_output.o] Error 1 ERROR: compilation failed for package ‘xml2’

which I think might be because it's compiling with the system libxml, which might be too old?

g++ -I/home/jronen/R-3.3.1/lib64/R/include -DNDEBUG -I../inst/include -I/usr/include/libxml2 -I/usr/local/include -I"/home/jronen/R-3.3.1/lib64/R/library/Rcpp/include" -I"/home/jronen/R-3.3.1/lib64/R/library/BH/include" -fpic -g -O2 -c xml2_output.cpp -o xml2_output.o

Do you know how I can pass other flags to the compiler when installing this to tell it where to find the correct libxml, or if this is a different error?



This comment has been minimized.


jimhester commented Jan 11, 2017

R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'"

Also can you say what version of libxml2 is on your system? We should be able to add support for earlier versions as well.

jimhester added a commit that referenced this issue Jan 11, 2017


This comment has been minimized.

alexvorobiev commented Jan 17, 2017

(Sorry for copying my comment I added to that commit but we have rather strict policies and can't use packages directly from github for work projects)...
When do you think this will be on CRAN? As it stands, the package can't be installed on RHEL 6.x because of the older libxml2.


This comment has been minimized.


jimhester commented Jan 18, 2017

I can submit a point release soon, but I would like to verify this issue is fixed before doing so. @alexvorobiev Can you verify the current master fixes the installation issue?


This comment has been minimized.

alexvorobiev commented Jan 18, 2017

@jimhester Yes, I was able to install from master with no issues.

@jimhester jimhester closed this Jan 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment