LIBXML and LibXSLT

Hi,

I installed libxml-ruby and libxslt-ruby. It took a while but it's running now. However, on the libxml site (http://libxml.rubyforge.org/install.xml) it says:

"...libxml requires a few other libraries to be installed in order to build and function properly.

    * libm (math routines: very standard)     * libz (zlib)     * libiconv     * libxml2 ..."

And there's similar stuff on the limxslt-ruby page (http://libxsl.rubyforge.org/)

My question is - is it enough for me to just install the gems (have they already been built using the appropriate libraries), or do I have to go and find these other libraries? If so can you point me to details on where to get them and how to install?

Thanks

Paul

It depends on your OS. Many come with the libraries installed already. libxml-ruby is a Ruby binding to the libxml2 library, so it absolutely has to be there for things to work. Since you have gotten it to work, then you had the libraries already. (Or you're on Windows, in which case the libxml2.dll may have been bundled with the gem)

-- Mark.

Paul Harv wrote:

Hi,

I installed libxml-ruby and libxslt-ruby. It took a while but it's running now. However, on the libxml site (http://libxml.rubyforge.org/install.xml) it says:

"...libxml requires a few other libraries to be installed in order to build and function properly.

    * libm (math routines: very standard)     * libz (zlib)     * libiconv     * libxml2 ..."

And there's similar stuff on the limxslt-ruby page (http://libxsl.rubyforge.org/)

My question is - is it enough for me to just install the gems (have they already been built using the appropriate libraries), or do I have to go and find these other libraries? If so can you point me to details on where to get them and how to install?

Thanks

Paul

I get these warnings when I install either libxml-ruby or libxslt-ruby:

# gem install libxml-ruby Building native extensions. This could take a while... Successfully installed libxml-ruby-0.9.7 1 gem installed Installing ri documentation for libxml-ruby-0.9.7...

Enclosing class/module 'mXPath' for class Expression not known

Enclosing class/module 'mXPath' for class Object not known

Enclosing class/module 'mXPath' for class Context not known

Enclosing class/module 'cXMLParser' for class Context not known Installing RDoc documentation for libxml-ruby-0.9.7...

Enclosing class/module 'mXPath' for class Expression not known

Enclosing class/module 'mXPath' for class Object not known

Enclosing class/module 'mXPath' for class Context not known

Enclosing class/module 'cXMLParser' for class Context not known

Can I safely ignore them or am I missing a dependency (if so which one?)

Anthony E. wrote:

Paul Harv wrote:

My question is - is it enough for me to just install the gems (have they already been built using the appropriate libraries), or do I have to go and find these other libraries? If so can you point me to details on where to get them and how to install?

Can I safely ignore them or am I missing a dependency (if so which one?)

The answer to both these questions is that .so files, unlike .rb files, enjoy early binding. If you run an .rb file with missing dependencies, you don't learn that until when (or _if_) you hit the require '...' line that pulls them in.

However, when .so files (or .dll files) load, the loader itself immediately finds all the registered dependencies and loads them too. This early binding happens at the machine language level, so all these libraries can fixup their addresses to the functions in the libraries they use.

If you can run ruby -e "require 'libxml'", and not get any complaints, then you have enough libxml, because that line forces ruby's executable image in memory to then pull in all those .so files!

Also, run all your tests...