From duncan at wald.ucdavis.edu  Wed Mar 11 14:14:24 2009
From: duncan at wald.ucdavis.edu (Duncan Temple Lang)
Date: Wed, 11 Mar 2009 06:14:24 -0700
Subject: [Rd] configure fail for XML package on freebsd
In-Reply-To: <307b90470903110428i1635c94btd2f457b893e3580c@mail.gmail.com>
References: <307b90470903110428i1635c94btd2f457b893e3580c@mail.gmail.com>
Message-ID: <49B7B930.9090003@wald.ucdavis.edu>


Hi Hiroyuki



Hiroyuki Kawakatsu wrote:
> 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

That should probably be
  setenv  LIBXML_INCDIR -I/usr/local/include/libxml2

(rather than having the additional /libxml after it.)

Did you install libxml2 version 2.7.3 yourself,
i.e. separately from the installation of the operating system?
Is /usr/local/lib being searched for .so files by your dynamic
loader?

Try

   ldd `which xmllint`

to see what shared libraries it finds? Does it list
libxml2.so.2 and if so, where is the file to which it points -
/usr/lib or /usr/local/lib ? If it is /usr/lib, that is the
problem.

If this doesn't identify the problem, please download
the XML_2.3-0.tar.gz file and issue the commands

   tar zxf XML_2.3-0.tar.gz
   R CMD INSTALL XML

and send me the file XML/config.log and I can try to
find out what is going wrong form the details in that.

Thanks,
   D.


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



[Rd] configure fail for XML package on freebsd
Duncan Temple Lang