php compile: undefined reference to `xmlXPathContextSetCache’
I am doing some tests to prepare a new version of PHP on which I needed the xsl library. Everything was going ok after the ./configure command (I added -with-xsl=/usr/lib64 as one of the configure options).
I mention that I am using centos 5.3 as OS.
When I tried to execute the make command I got the following error:
“undefined reference to `xmlXPathContextSetCache'” and unfortunately didn’t found an answer on google that will solve my question.
After some trial & error I noticed that inside /usr/lib64 folder I had a symlink called libxml2.so that pointed to libxml2.so.2.6.23. I also had the file libxml2.so.2.6.26.
All I did is to change the symlink to point to the newer version of libxml2. In conclusion the problem seems to be in the libxml2 versions prior to 2.6.26 (2.6.25 and bellow)