XML-LibXML fails to load with Perl 5.36.3 (worked with 5.36.0)

I recently upgraded from Perl 5.36.0 to 5.36.3. Since then, “use XML::LibXML” doesn’t work. I suspect the ActiveState distribution is missing files. Here are the details:

C:\Perl\exec\perl.exe -e “use XML::LibXML” yields the following error message:

Can't load 'C:/Perl/site/lib/auto/XML/LibXML/LibXML.dll' for module XML::LibXML: load_file:The specified module could not be found at C:/Perl/lib/XSLoader.pm line 94.
  at C:/Perl/site/lib/XML/LibXML.pm line 150.
BEGIN failed--compilation aborted at C:/Perl/site/lib/XML/LibXML.pm line 156.
Compilation failed in require at D:\Incoming\Backups\test-libXML.pl line 4.
BEGIN failed--compilation aborted at D:\Incoming\Backups\test-libXML.pl line 4.

There were no errors in building this project. I had no issues installing it on my Windows 10 computer:

state-remote-installer.exe => State Tool Package Manager has been successfully installed.
state checkout gamin-mb/Perl-5.36-Windows --runtime-path C:/Perl => "All dependencies have been installed and verified"
state use Perl-5.36-Windows => "Switched to project gamin-mb/Perl-5.36-Windows, located at C:\Users\root\Perl-5.36-Windows."
state packages =>
█ Listing Packages

Operating on project gamin-mb/Perl-5.36-Windows, located at C:\Users\root\Perl-5.36-Windows.

  Name                   Version
──────────────────────────────────
  Excel-Writer-XLSX      Auto
  File-Copy-Recursive    Auto
  Image-ExifTool         Auto
  PadWalker              Auto
  Pod-Simple-Wiki        Auto
  Spreadsheet-Read       Auto
  Term-ProgressBar       Auto
  Test-Cmd               Auto
  Text-CSV_XS            Auto
  Win32-API              Auto
  Win32-Console          Auto
  Win32-File             Auto
  XML-LibXML             Auto

The ‘C:/Perl/site/lib/auto/XML/LibXML/LibXML.dll’ file exists and is readable. Knowing that this file usually provides only bindings for the actual libxml.dll, I looked for other files with a similar name under C:\Perl and found only 5 files with that name, regardless of type or extension. In my previous installation of Perl 5.36.0 (which I had fortunately moved elsewhere instead of deleting it), with the same package list (except for Tkx and PAR-Packer, which fail to build on 5.36.3), there are 68 files with a name matching ‘libxml’.

I therefore suspect that the XML-LibXML package that is currently available on the ActiveState platform is missing a significant number of files (notably, usr/bin/libxml2.dll) and that is why it doesn’t load in Perl 5.36.3.

I deleted everything and reinstalled from scratch, and rebooted a few times, with the same results.

I’d like to know if others have this problem, and I hope the above will help provide a resolution.

Thanks!

Hi gamin-mb!

I’ve successfully reproduced a similar problem on Linux as well, so I’ve asked our build team to look into how we’re building XML-LibXML.

While we’re looking into a solution, can you find a file named libiconv.dll in your installation? That gave me problems on Linux, and it should be in both of our projects. It’s okay if not–there could be a separate problem, but I can definitely reproduce something not quite right here.

Hi ShaneW,

Thanks for reproducing the problem.

On my side, there’s no libiconv in my Perl 5.36.3 installation.
There were three such files in my Perl 5.36.0 installation:

C:\Perl\usr\lib\libiconv.la
C:\Perl\usr\lib\libiconv.dll.a
C:\Perl\usr\bin\libiconv-2.dll

Thanks for responding. Good news–I’ve verified that our latest data update has fixed the problem I had on Linux. I think it’ll fix the problem you have too. I think I see that you’ve updated your project, so you’re using the current revision of our catalog.

Please let me know if you still have trouble working with XML-LibXML now. (I see you’re also using PAR-Packer, which we’re also working on now too.)

1 Like

Yes, XML-LibXML seems to work now.
Thanks for the quick fix!

1 Like