karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Jun 12, 2011 2:02 pm Post subject: /usr/lib/libxslt.so: undefined reference to `xmlXPathContext |
|
|
some people have experienced the above message when running the make of icecast on centos systems. seeing that it keeps popping up I'll mention how to fix it.
Icecast uses both libxslt and libxml2 and libxslt requires a certain interface from libxml2 which can change in subtle ways. The upshot of which means that the versions of libxml2 and libxslt have to be in sync, when they are not then message like the "undefined reference" above appear. The actual missing item is not referenced by icecast, it is used by libxslt and it should be in libxml2
In the case below we can see by a simple investigation.
Quote: |
ls -l /usr/lib/libxml2*so*
..... /usr/lib/libxml2.so -> libxml2.so.2.6.23*
..... /usr/lib/libxml2.so.2 -> libxml2.so.2.6.26*
..... /usr/lib/libxml2.so.2.6.23*
..... /usr/lib/libxml2.so.2.6.26* |
The .so link is used to locate the library to link with but as you can see it refers to .so.2.6.23 which is an earlier version than the other installed .so.2.6.26. This version difference is enough to trigger the above message.
It's perfectly acceptable to have multiple versions of a runtime library installed which is why the version number is included but when building an application like icecast then the link file needs to refer to the correct one.
In the above case the fix is trivial
Quote: |
rm /usr/lib/libxml2.so
ln -s /usr/lib/libxml2.so.2.6.26 /usr/lib/libxml2.so
|
rerun configure and make again.
karl. |
|