Good afternoon,
I am having difficulties with libxml2.
I tried to build the Perl module XML-LibXML which is part of our standard runtime environment. However, this time the installation on a RHEL5 box failed, because the build process complained about missing libxml2:
$> perl Makefile.PL LIB=/foo/lib/perl PREFIX=/foo INSTALLDIRS=site enable native perl UTF8 running xml2-config...ok (2.7.6) looking for -lxml2... no looking for -llibxml2... no libxml2 not found
However, the file was available. Starting the build with
perl Makefile.PL LIB=/usr/inform/target/lib/perl PREFIX=/usr/inform/target INSTALLDIRS=site
led to more evidence of the real problem:
[...] Can't load 'blib/arch/auto/Conftest/Conftest.so' for module Conftest: /usr/inform/target/lib/libxml2.so.2: cannot restore segment prot after reloc: Permission denied at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230. at test.pl line 2 [...]
After some investigations I found that the problem appears to be that libxml2.so
is created with text relocation:
[tess91@INF-AW] lib$ eu-findtextrel libxml2.so.2.7.6 the file containing the function 'get_crc_table' is not compiled with -fpic/-fPIC the file containing the function 'crc32' is not compiled with -fpic/-fPIC the file containing the function 'gzerror' is not compiled with -fpic/-fPIC [...]
Ans since we have SElinux active on the target machine, linking against libxml.2 failed!
Is there any possibility to create libxml2
properly, or do I have to ask the admin to twist SElinux to allow relocations?
I really can't believe I am the olny one having this problem on Linux with SElinux active. What am I missing?
Any help apprecitated!
Regards, Stefan