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

Im having some problems getting XML::LibXML to build in cpan. I have decided to just download XML::LibXML::Common to try building the dependencies first and going from there. Below is the errors I am getting. I built perl from source on my box with dmake & mingw. it compiled ok and all test passed. In my path I have mingw/bin and perl/bin in my path. I got all of the binaries from Igor's site and have them in the appropriate mingw directories Does any one have any suggestions?
C:\CPAN~1\build\XML-LI~1.13>perl Makefile.PL INC=-IF:/MinGWEnv/include +/libxml LIB=-LF:/MinGWEnv/lib enable native perl UTF8 looking for -lxml2... yes Writing Makefile for XML::LibXML::Common C:\CPAN~1\build\XML-LI~1.13>dmake cp Common.pm blib\lib\XML\LibXML\Common.pm C:\perl\bin\perl.exe C:\perl\lib\ExtUtils/xsubpp -typemap C:\perl\lib +\ExtUtils\typemap -typemap typemap Common.xs > Common.xsc && C:\perl +\bin\perl.exe -MExtUtils::Command -e mv Common.xsc Common.c gcc -c -IF:/MinGWEnv/include/libxml -s -O2 -DWIN32 -DHAVE_DES_FCRY +PT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing - +DPERL_MSVCRT_READFIX -s -O2 -DV ERSION=\"0.13\" -DXS_VERSION=\"0.13\" "-IC:\perl\lib\CORE" - +DHAVE_UTF8 -DHAVE_BLANK Common.c C:\perl\bin\perl.exe -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"XML::LibXML::Common\", 'DLBASE' => 'Commo +n', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS +' => []);" Running Mkbootstrap for XML::LibXML::Common () C:\perl\bin\perl.exe -MExtUtils::Command -e chmod 644 Common.bs C:\perl\bin\perl.exe -MExtUtils::Command -e cp Common.bs blib\arch\aut +o\XML\LibXML\Common\Common.bs C:\perl\bin\perl.exe -MExtUtils::Command -e chmod 644 blib\arch\auto\X +ML\LibXML\Common\Common.bs dlltool --def Common.def --output-exp dll.exp g++ -o blib\arch\auto\XML\LibXML\Common\Common.dll -Wl,--base-file -Wl +,dll.base -mdll -s -L"c:\perl\lib\CORE" -L"F:\MinGWEnv\lib" Common.o +-Wl,--image-base,0x2c010000 C:\perl\lib\CORE\libperl58.a F:\MinGWEnv +\lib\libxml2.a F:\MinGWEnv\lib\zlib.a F:\MinGWEnv\lib\libmsvcrt.a F:\ +MinGWEnv\lib\libmoldname.a F:\MinGWEnv\lib\libkernel32.a F:\MinGWEnv\ +lib\libuser32.a F:\MinGWEnv\lib\libgdi32.a F:\MinGWEnv\lib\libwinspoo +l.a F:\MinGWEnv\lib\libcomdlg32.a F:\MinGWEnv\lib\libadvapi32.a F:\Mi +nGWEnv\lib\libshell32.a F:\MinGWEnv\lib\libole32.a F:\MinGWEnv\lib\li +boleaut32.a F:\MinGWEnv\lib\libnetapi32.a F:\MinGWEnv\lib\libuuid.a F:\MinGWEnv\lib\libws2_32.a F:\MinGWEnv\lib\libmpr.a F:\MinGWEnv\lib\l +ibwinmm.a F:\MinGWEnv\lib\libversion.a F:\MinGWEnv\lib\libodbc32.a dll.exp Common.o(.text+0x3bf):Common.c: undefined reference to `_imp__xmlFree' Common.o(.text+0x63f):Common.c: undefined reference to `_imp__xmlFree' collect2: ld returned 1 exit status dmake.exe: Error code 1, while making 'blib\arch\auto\XML\LibXML\Comm +on\Common.dll'

Replies are listed 'Best First'.
Re: LibXML On Windows Compile Issues
by InfiniteSilence (Curate) on Sep 26, 2005 at 19:27 UTC
    Where did you get version 1.13? I can only see 0.13 on CPAN. At any rate, there may be a bug in that version for Windows. Try CPAN testers for XML::LibXML::Common for v. 0.13. Looks like it failed to compile, where .10 seemed to have worked on 5.8.0.

    Celebrate Intellectual Diversity

      Ok. downloaded 0.10 and tried compiles ok but test five fails. heres my output
      C:\.cpan\build\XML-LibXML-Common-0.10>dmake test C:\perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl 1..5 # Running under perl version 5.008007 for MSWin32 # Current time local: Mon Sep 26 21:02:20 2005 # Current time GMT: Tue Sep 27 02:02:20 2005 # Using Test.pm version 1.25 ok 1 ok 2 ok 3 ok 4 not ok 5 # Failed test 5 in test.pl at line 42 # test.pl line 42 is: ok( length( $@ ) );

        Are you using at least version 2.4.20 of the libxml2 library? There is a check in the Makefile.PL of XML::LibXML::Common for this, but that may have been bypassed for your system.

        By the way, the failures reported on MSWin32 for XML-LibXML-Common-0.13 are due to lack of the libxml2 header files on the tester's machine. At least for Win32 ActivePerl 8xx, this version of XML-LibXML-Common builds and tests fine when a suitable libxml2 library is available.

        There's a discussion on the xml mailing list about the problem with an undefined reference to _imp__xmlFree error on mingw. This may be present in the libxml2 library you're using; if you can't find a more recent version, you might try building it yourself from the sources.

      The reason it says 1.13 is because of old dos 8.3 scheme i believe. For example "Program Files" becomes "Progra~1" or some thing like that. I am using 0.13 and will try 0.10
Re: LibXML On Windows Compile Issues
by planetscape (Chancellor) on Sep 27, 2005 at 06:24 UTC