I have a perl script that uses XML::Xerces and, therefore, xerces-c. I'm compiling with: pp -o xtest -l libxerces.so.25 x.pl
When I run xtest the first time, I get the following error messages:
Undefined subroutine &XML::Xerces::XMLPlatformUtils::Initialize called at XML/Xerces.pm line 16.
INIT failed--call queue aborted.
Undefined subroutine &XML::Xerces::XMLPlatformUtils::Terminate called at XML/Xerces.pm line 24.
END failed--call queue aborted.
When I run the second (and subsequent) times, everything works.
I've determined via strace, that on the first run, it cannot find the shared libary but it does find it on
subsequent runs because it is cached in /tmp.
There are cache directories getting created (and left) in /tmp (the first time it runs) that contain the
libxerces.so.25 file.
I cannot understand why xtest cannot find the shared library during the first run.
I've also tried: pp -o xtest -l xerces x.pl as well as adding -M XML::Xerces::XMLPlatformUtils to the mix
But I had even less luck with that.
At this point, it's mostly an annoyance that I have to run the script twice after it's deployed.
Anyone have any clues?
-Rob
P.S. This is all on RedHat Linux....
