[R] Loading problem with XML_1.9
Duncan Temple Lang
duncan at wald.ucdavis.edu
Sun Jul 8 08:12:52 CEST 2007
Well, as you mention at the end of the mail,
several people have given you suggestions about
how to solve the problem using different approaches.
You might search on the Web for how to install a 64 bit version of libxml2?
Using xmlTreeParse(, useInternalNodes = TRUE) is an approach
to reducing the memory consumption as is using the handlers
argument. And if size is really the issue, you should consider
the SAX model which is very memory efficient and made available
via the xmlEventParse() function in the XML package.
And it even provides the concepts of branches to provide a
hybrid of SAX and DOM-style parsing together.
However, to solve the problem of the xmlMemDisplay
symbol not being found, you can look for where
that is used and remove it. It is in src/DocParse.c
in the routine RS_XML_MemoryShow(). You can remove
the line
xmlMemDisplay(stderr)
or indeed the entire routine. Then re-install and
reload the package.
D.
Luo Weijun wrote:
> Hello Dr. Lang and all,
> I posted this message in R-help mail list, but haven’t
> solved my problem so far. Therefore, could you help me
> look at it?
> I have loading problem with XML_1.9 under 64 bit
> R2.3.1 for Mac OS X, which I got from
> http://R.research.att.com/. XML_1.9 works fine under
> 32 bit R2.5.0. I thought that could be installation
> problem, and I tried install.packages or biocLite,
> every time the package installed fine, except some
> warning messages below:
> ld64 warning: in /usr/lib/libxml2.dylib, file does not
> contain requested architecture
> ld64 warning: in /usr/lib/libz.dylib, file does not
> contain requested architecture
> ld64 warning: in /usr/lib/libiconv.dylib, file does
> not contain requested architecture
> ld64 warning: in /usr/lib/libz.dylib, file does not
> contain requested architecture
> ld64 warning: in /usr/lib/libxml2.dylib, file does not
> contain requested architecture
>
> Here is the error messages I got, when XML is loaded:
>> library(XML)
> Error in dyn.load(x, as.logical(local),
> as.logical(now)) :
> unable to load shared library
> '/usr/local/lib64/R/library/XML/libs/XML.so':
> dlopen(/usr/local/lib64/R/library/XML/libs/XML.so,
> 6): Symbol not found: _xmlMemDisplay
> Referenced from:
> /usr/local/lib64/R/library/XML/libs/XML.so
> Expected in: flat namespace
> Error: .onLoad failed in 'loadNamespace' for 'XML'
> Error: package/namespace load failed for 'XML'
>
> Session information
>> sessionInfo()
> Version 2.3.1 Patched (2006-06-27 r38447)
> powerpc64-apple-darwin8.7.0
>
> attached base packages:
> [1] "methods" "stats" "graphics" "grDevices"
> "utils" "datasets"
> [7] "base"
>
> Prof Brian Ripley also suggested that this could be
> that I don’t have a 64-bit version of libxml2
> installed. Where I get it and where/how to install it,
> if that’s the problem?
> The reason I need to use R64 is that I have memory
> limitation issue with R 32 bit version when I load
> some very large XML trees (the data file is about
> 800M). And Martin suggested me to use 'handler'
> argument of xmlTreeParse, tried 'handler' with
> useInternalNodes=T, but I still got this memory
> problem with R 32 bit version. Please tell me what I
> can do now. Thank you so much!
> Weijun
>
>
>
>
> ____________________________________________________________________________________
>
> Comedy with an Edge to see what's on, when.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list