in reply to Can't locate loadable module error for XML::LibXSLT on Strawberry Perl

we had to make some changes as suggested here:
-> http://osdir.com/ml/lang.perl.xml/2004-01/msg00105.html


That looks to be on the right path - though it's done a little differently to the way PGPLOT does it (where the same issue arises). In PGPLOT, DLEXT => 'xs.dll' is passed to WriteMakefile(). Setting $Config{DLEXT} as per the above webpage looks a little strange to me. But if dmake install for XML::LibXSLT installed a site/lib/auto/XML/LibXSLT/libxslt.dll.xs, then that part of the fix has worked fine.

The only other thing that needs to be checked is that DynaLoader.pm knows that it needs to load a dynamic library named libxslt.xs.dll (instead of the usual libxslt.dll). In PGPLOT.pm this is achieved with:
if($^O =~ /mswin32/i) { local $DynaLoader::dl_dlext = 'xs.dll'; bootstrap PGPLOT $VERSION; }
That's all that should need to be done ... Oh, no ...wait.. I've just remembered that the DynaLoader.pm that ships with 5.10.0 won't allow that fix !! You'll need to grab a patched version of DynaLoader.pm (such as the one that ships with Activeperl builds 1002 and 1003) and replace Strawberry's existing DynaLoader.pm with it. (That's the first thing you should try - it may now be the *only* thing that you need to do.)

1. We have modified the @INC to directly look-up the "LibXSLT.xs.dll" that is present in "\site\lib\auto\XML\LibXML\". Still the same error persists.
2. The .dll file was read-only, and we made it read-write.


Neither of those steps should be necessary.
Update: And libxslt.xs.dll should *not* be located in site\lib\auto\XML\LibXML. It should be in site\lib\auto\XML\LibXSLT. (I'm hoping that was a typo :-)
Update 2: DynaLoader.pm will be fixed in 5.10.1. (The problem with the current version was reported a few days before 5.10.0 was released - but they went ahead and released 5.10.0 anyway.)

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Can't locate loadable module error for XML::LibXSLT on Strawberry Perl
by jey_suresh (Novice) on Jun 13, 2008 at 06:53 UTC
    Thank you very much for that, Rob!

    I am glad you caught the gist of my posting. Yes, you are right - typos seem to be the order of the day (as far as my posts fo at least ;-) )

    We have done all that you have recommended. We have just replaced the "new"er DynaLoader.pm (1.0802) from an ActivePerl, build 1002 in the strawberry lib directory (re-booted PC for good measure).

    However, it did not solve the problem :-((. We are still (and persistently) getting the  Can't locate the loadable object for module XML::LibXSLT!
    Anything else that needs to be done by me (short of chanting Abracadabra and spinning three times on one foot like Baba-yaga! :-(( )

    Rob, many, many thanks for your considerate help in this matter.
    Victory seems tantalisingly close, but my nose seems to be all bunged up (I know, I know, I am mixing my metaphors)!

    Thanks and regards,
    Suresh.

      Can't locate the loadable object for module XML::LibXSLT

      This simply means that the object (dll/xs.dll) that DynaLoader.pm needs to load can't be found. Assuming that site/lib/auto/XML/LibXSLT contains a file named libxslt.xs.dll (and doesn't contain a file named libxslt.dll), then it seems that DynaLoader.pm is still trying to load libxslt.dll. This would indicate that LibXSLT.pm has not been correctly modified (as per PGPLOT.pm).

      Cheers,
      Rob