[Rd] configure fail for XML package on freebsd

Hiroyuki Kawakatsu hkawakat at gmail.com
Wed Mar 11 12:28:29 CET 2009


Hi,

I am having problems installing the XML package with R-devel on
freebsd. If I simply do install.packages("XML"), it says that the
parser.h file is not found. After reading the INSTALL file, I have set

setenv  XML_CONFIG /usr/local/bin/xml2-config
setenv  LIBXML_LIBDIR -L/usr/local/lib
setenv  LIBXML_INCDIR -I/usr/local/include/libxml2/libxml

and install.packages("XML") fails with

checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for libxml/parser.h... (cached) no
checking for gnome-xml/parser.h... (cached) no
Located parser file -I/usr/local/include/libxml2/libxml/parser.h
checking for gzopen in -lz... yes
checking for xmlParseFile in -lxml2... yes
You are trying to use a version 2.* edition of libxml
but an incompatible library. The header files and library seem to be
mismatched. If you have specified LIBXML_INCDIR, make certain to also
specify an appropriate LIBXML_LIBDIR if the libxml2 library is not in
the default
directories.
ERROR: configuration failed for package 'XML'
* Removing '/usr/local/share/R-devel/library/XML'
Warning in install.packages("XML", clean = TRUE) :
  installation of package 'XML' had non-zero exit status

Some version info on my machine:

erdos# portversion -F "libxml*"
libxml2-2.7.3               =

erdos# xml2-config --version
2.7.3

erdos# ls /usr/local/lib/libxml*
/usr/local/lib/libxml2.a         /usr/local/lib/libxmlparse.so@
/usr/local/lib/libxml2.la*       /usr/local/lib/libxmlparse.so.1*
/usr/local/lib/libxml2.so@       /usr/local/lib/libxmltok.a
/usr/local/lib/libxml2.so.5*     /usr/local/lib/libxmltok.la*
/usr/local/lib/libxmlparse.a     /usr/local/lib/libxmltok.so@
/usr/local/lib/libxmlparse.la*   /usr/local/lib/libxmltok.so.1*

The header LIBXML_INCDIR/xmlversion.h does define version as 2.7.3.
Does anyone have an idea of what may be going wrong?

h.
-- 
+---
| Hiroyuki Kawakatsu
| Business School, Dublin City University
| Dublin 9, Ireland. Tel +353 (0)1 700 7496



More information about the R-devel mailing list