fgxy has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks!

Here is my problem. I am using XML::LibXML in one of my scripts. I wanted to use the script on a server running IBM AIX, so I asked the admin to install the modules. He did so, installed everything. Problem is, only some of the users is able to use the module.

To be a little more specific: We are developing telecommunications software on the servers. Each instance of the telecommunications framework we are using has its own user. The developers have access to the module, but not to the data of the framework. Logging in as the framework user, I have access to the framework data, which I should be processing with my script, but not to the module, although the admin installed everything.

So they asked me to reinstall the perl modules somehow for the framework users, because they can't get it to work. Now running Makefile.PL only says it can't find libxml2. I tried just about everything and googled for days, but haven't found anything useful.

Libxml2, libxml2-devel, libz and libiconv are installed. This is what i get:

elink2@q4de3msya04:/projects/elink2/USERS/mor/XML-LibXML-1.70> perl Makefile.PL DEBUG=1
enable native perl UTF8
running xml2-config...xml2-config --version
xml2-config --libs
xml2-config --cflags
ok (2.6.23)
looking for -lxml2... perl Makefile.PL 'INC=-I/opt/freeware/include/libxml2' 'LIBS=-L/opt/freeware/lib -lxml2 -lz -lpthread -liconv -lm' 'DEFINE= -DHAVE_UTF8'
INC = -I/opt/freeware/include/libxml2
LIBS = -L/opt/freeware/lib -lxml2 -lz -lpthread -liconv -lm
DEFINE = -DHAVE_UTF8
Warning: PERL_LIB (/temp/cpt5hli/comptel_common/tmp_cpt5hli/install/AIX/perl/lib/5.8.9) seems not to be a perl library directory
(strict.pm not found) at /projects/elink2/common/current/perl/lib/5.8.9/ExtUtils/MM_Unix.pm line 1727.
Have /projects/elink2/common/current/perl/lib/5.8.9/aix-thread-multi-64all/Config.pm expected /temp/cpt5hli/comptel_common/tmp_cpt5hli/install/AIX/perl/lib/5.8.9/aix-thread-multi-64all/Config.pm
Your perl and your Config.pm seem to have different ideas about the architecture they are running on.
Perl thinks: aix-thread-multi-64all
Config says: aix-thread-multi-64all
This may or may not cause problems. Please check your installation of perl if you have problems building this extension.
Writing Makefile for Conftest
make test 'OTHERLDFLAGS='
make: 1254-002 Cannot find a rule to create target /temp/cpt5hli/comptel_common/tmp_cpt5hli/install/AIX/perl/lib/5.8.9/aix-thread-multi-64all/Config.pm from dependencies.
Stop.
system call to 'make test 'OTHERLDFLAGS='' failed at Makefile.PL line 470.
no
looking for -llibxml2... perl Makefile.PL 'INC=-I/opt/freeware/include/libxml2' 'LIBS=-L/opt/freeware/lib -lxml2 -lz -lpthread -liconv -lm' 'DEFINE= -DHAVE_UTF8'
INC = -I/opt/freeware/include/libxml2
LIBS = -L/opt/freeware/lib -lxml2 -lz -lpthread -liconv -lm
DEFINE = -DHAVE_UTF8
Warning: PERL_LIB (/temp/cpt5hli/comptel_common/tmp_cpt5hli/install/AIX/perl/lib/5.8.9) seems not to be a perl library directory
(strict.pm not found) at /projects/elink2/common/current/perl/lib/5.8.9/ExtUtils/MM_Unix.pm line 1727. Have /projects/elink2/common/current/perl/lib/5.8.9/aix-thread-multi-64all/Config.pm expected /temp/cpt5hli/comptel_common/tmp_cpt5hli/install/AIX/perl/lib/5.8.9/aix-thread-multi-64all/Config.pm
Your perl and your Config.pm seem to have different ideas about the architecture they are running on.
Perl thinks: aix-thread-multi-64all
Config says: aix-thread-multi-64all
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Writing Makefile for Conftest
make test 'OTHERLDFLAGS='
make: 1254-002 Cannot find a rule to create target /temp/cpt5hli/comptel_common/tmp_cpt5hli/install/AIX/perl/lib/5.8.9/aix-thread-multi-64all/Config.pm from dependencies.
Stop.
system call to 'make test 'OTHERLDFLAGS='' failed at Makefile.PL line 470.
no
libxml2 not found
Try setting LIBS and INC values on the command line Or get libxml2 from http://xmlsoft.org/
If you install via RPMs, make sure you also install the -devel RPMs, as this is where the headers (.h files) are.
Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter to see the exact reason why the detection of libxml2 installation failed or why Makefile.PL was not able to compile a test program.



The libraries are there, the user has execute/read right for them. Someone wrote that to detect libxml2 the installer script needed libz, which is installed as well.

If anyone has any idea on this matter, it would be greatly appreciated! Thank you!

Replies are listed 'Best First'.
Re: XML::LibXML installation on AIX
by Corion (Patriarch) on May 17, 2011 at 12:26 UTC
    Warning: PERL_LIB (/temp/cpt5hli/comptel_common/tmp_cpt5hli/install/AI +X/perl/lib/5.8.9) seems not to be a perl library directory (strict.pm not found)

    This sounds to me as if you have at least two versions of perl on your path, one in /temp/cpt5hli/comptel_common/tmp_cpt5hli/install/AIX/perl/ and one in /projects/elink2/common/current/perl. Make up your mind which one you want to use and set up $ENV{PATH} so that the other one cannot be found anymore.

      Thank you, this could be the problem, since one of those directories does not exist anymore.

      Could you please tell me which environment variables the perl install script took those values from? I can't seem to find them in PATH, there is no env variable named PERL_LIB and PERL5LIB contains entirely different values.

        See Config.pm somewhere under the Perl tree. If you are unlucky, perl has been built with the directories hardcoded into the binary. Then you need to reconfigure and recompile.

Re: XML::LibXML installation on AIX
by anonymized user 468275 (Curate) on May 17, 2011 at 13:28 UTC
    Is it really so hard to communicate the problem to the admin that caused it, that you have to work around it? It could be for example that he just has to do a single chmod -R taking ten seconds to provide access to the modules he installed rather than you having to do his job the hard way.

    One world, one people

      Well yeah, I would prefer that way too, but unfortunately he either can't or won't solve this problem

Re: XML::LibXML installation on AIX
by Anonymous Monk on May 17, 2011 at 14:48 UTC

    IBM is not known for its support on OpenSource software. What is available is mostly ancient stuff. I'd suggest an upgrade: of the OS. AIX sucks, all other OS's do better: Linux, Solaris, and HP-UX are good options for AIX replacements, they all have recent perl builds available.

    You have perl5.8.9 that probably conflicts with other perl versions hanging around.

    Knowing the above reputation, is /opt/freeware providing you with a recent enough version of libxml2?

      What OS my company uses is not my decision :( Libxml2 works just fine, as I found out the problem lies with the perl installation. Thanks for the suggestion anyways!