configure cannot find libxml2

I wan to rebuild a source rpm package (cfengine). configure doesn’t find libxml2 but I have already installed libxml2 and libxml2-devel. I don’t know why…

Please do nott (only) tell stories, but show the computer text you get so people here can make their own assessments of your problem, not influenced by your interpretation.

Copy/paste the text (prompt, command, output and next prompt) in a post between CODE tags. You get he CODE tags by clicking on the # button in the tool bar of the post editor.

daylight1 wrote:
>
> I wan to rebuild a source rpm package (cfengine). configure doesn’t find
> libxml2 but I have already installed libxml2 and libxml2-devel. I don’t
> know why…
>
>
Better approach would have been to install it from the repos
http://software.opensuse.org/package/cfengine

GNOME 3.6.2
openSUSE Release 12.3 (Dartmouth) 64-bit
Kernel Linux 3.7.10-1.16-desktop

More specific what I’m doing.

> rpmbuild --rebuild cfengine-3.5.2-65.1.src.rpm
Installing cfengine-3.5.2-65.1.src.rpm
warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID a0e46e11
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.7504
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd /usr/src/packages/BUILD
+ rm -rf cfengine-3.5.2
+ /usr/bin/gzip -dc /usr/src/packages/SOURCES/cfengine-3.5.2.tar.gz
+ tar -xf -
+ STATUS=0


...]


checking acl/libacl.h presence... yes
checking for acl/libacl.h... yes
checking for xmlFirstElementChild in -lxml2... no
configure: error: Cannot find libxml2
error: Bad exit status from /var/tmp/rpm-tmp.62819 (%build)




RPM build errors:
    InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID a0e46e11
    Bad exit status from /var/tmp/rpm-tmp.62819 (%build)



And which versions of libxml2 and libxml2-devel do you have?

Apparently, xmlFirstElementChild is only available since libxml 2.7.3:
https://github.com/sparklemotion/nokogiri/issues/303

And cfengine doesn’t support older versions anymore:
https://github.com/cfengine/core/pull/340

The installed versions are older. Both packages have the version 2.6.23-15.37.1. That means that I have no chance to get it working?

Apparently not.

Either build an older version of cfengine, or install newer libxml2 packages.

On which distribution/version are you trying to build, btw?
Even 10.2 (7 years old!) included a higher version (2.6.26) already…