[R] Building XML package for MacOS X

Sean Davis Sean.Davis at dcb.cit.nih.gov
Tue Sep 9 14:51:27 CEST 2003

I am working to build the XML package for R on MacOS X.  I have installed
libxml2-2.5.9 into /usr/local.  I set the
LIBXML_INCDIR=/usr/local/include/libxml2.  I use R INSTALL, I get the

R INSTALL -c -l /usr/local/R/library XML_0.94-1.tar.gz
gcc -bundle -flat_namespace -undefined suppress -L/sw/lib -L/usr/local/lib
-o XML.so DocParse.o EventParse.o ExpatParse.o HTMLParse.o RSDTD.o
RUtils.o Utils.o XMLEventParse.o XMLTree.o -lz  -lxml2
ld: multiple definitions of symbol _xmlParserError
Utils.o definition of _xmlParserError in section (__TEXT,__text)
/usr/local/lib/libxml2.dylib(libxml2.2.5.9.dylib-master.o) definition of
make: *** [XML.so] Error 1
ERROR: compilation failed for package 'XML'

How can I fix the problem?  I have tried compiling straight source that
has other problems.  I think that I need to modify the "makefile" to let
the compiler to use only the first definition of _xmlParserError, but I
don't know how to do this when using R INSTALL.


More information about the R-help mailing list