0

I'm struggling on setting up LibXML on ActiveState Perl version 5.16.0.

So far I followed the instrutions from this post How can I install Lib::XML on ActiveState Perl 5.20?:

First, get the libxml2 binaries from http://xmlsoft.org/sources/win32/ (currently also available at http://www.zlatkovic.com/pub/libxml/).

You need:

iconv-VERSION.win32.zip
libxml2-VERSION.win32.zip
zlib-VERSION.win32.zip
Download the latest version of each. (Each package will probably have a different version.) When you extract them, you'll get directories named iconv-VERSION.win32, libxml2-VERSION.win32, and zlib-VERSION.win32, each containing bin, lib, and include directories.

Combine all the bin, include, and lib directories under c:\Prog\LibXML. (You can use any directory you prefer; just adjust the instructions accordingly.)

Get the latest version of XML-LibXML from CPAN. Extract it.

Issue these commands in the XML-LibXML-VERSION directory:

perl Makefile.PL INC=-Ic:\Prog\LibXML\include LIBS=-Lc:\Prog\LibXML\lib
dmake
copy c:\Prog\LibXML\bin\*.dll blib\arch\auto\XML\LibXML
dmake test
dmake install

So I downloaded all the packages and everthing works fine, I can run the makefile.pl

But when I now try to run dmake, I get the following error:

Devel.o:Devel.c:(.text+0x985): undefined reference to `_imp__xmlMemStrdup'
LibXML.o:LibXML.c:(.text+0x4374): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x4d5b): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x513c): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x52bb): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x5c23): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x5d13): more undefined references to `_imp__xmlFree' follow
LibXML.o:LibXML.c:(.text+0xef7a): undefined reference to `_imp__xmlMalloc'
LibXML.o:LibXML.c:(.text+0xefb6): undefined reference to `_imp__xmlMalloc'
LibXML.o:LibXML.c:(.text+0xf042): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0xf053): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0xf907): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x10384): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x10399): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x106f9): more undefined references to `_imp__xmlFree' follow
LibXML.o:LibXML.c:(.text+0x2a092): undefined reference to `_imp__xmlIsBaseCharGroup'
LibXML.o:LibXML.c:(.text+0x2a171): undefined reference to `_imp__xmlIsDigitGroup'
LibXML.o:LibXML.c:(.text+0x2a1d4): undefined reference to `_imp__xmlIsCombiningGroup'
LibXML.o:LibXML.c:(.text+0x2a1ed): undefined reference to `_imp__xmlIsExtenderGroup'
LibXML.o:LibXML.c:(.text+0x2a211): undefined reference to `_imp__xmlIsBaseCharGroup'
LibXML.o:LibXML.c:(.text+0x2a374): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x2a4b7): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x2a60c): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x2a720): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x2a72a): undefined reference to `_imp__xmlFree'
LibXML.o:LibXML.c:(.text+0x2a76f): more undefined references to `_imp__xmlFree' follow
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x7fa): undefined reference to `_imp__xmlMalloc'
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x831): undefined reference to `_imp__xmlMalloc'
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x97d): undefined reference to `_imp__xmlFree'
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0xfa4): undefined reference to `_imp__xmlMalloc'
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x1004): undefined reference to `_imp__xmlFree'
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x168c): undefined reference to `_imp__xmlFree'
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x16a5): undefined reference to `_imp__xmlFree'
perl-libxml-mm.o:perl-libxml-mm.c:(.text+0x1795): undefined reference to `_imp__xmlFree'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1a34): undefined reference to `_imp__xmlMalloc'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1a65): undefined reference to `_imp__xmlMalloc'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1aab): undefined reference to `_imp__xmlFree'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1af4): undefined reference to `_imp__xmlFree'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1b67): undefined reference to `_imp__xmlMalloc'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1bf0): undefined reference to `_imp__xmlMalloc'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x1d04): undefined reference to `_imp__xmlFree'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x271a): undefined reference to `_imp__xmlFree'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x272f): undefined reference to `_imp__xmlFree'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x2839): undefined reference to `_imp__xmlFree'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x2847): undefined reference to `_imp__xmlFree'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x28e1): more undefined references to `_imp__xmlFree' follow
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x5ce5): undefined reference to `_imp__xmlMalloc'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x5d94): undefined reference to `_imp__xmlMalloc'
perl-libxml-sax.o:perl-libxml-sax.c:(.text+0x5efc): undefined reference to `_imp__xmlFree'
xpath.o:xpath.c:(.text+0x260): undefined reference to `_imp__xmlFree'
xpath.o:xpath.c:(.text+0x2ab): undefined reference to `_imp__xmlFree'
xpath.o:xpath.c:(.text+0x3e7): undefined reference to `_imp__xmlFree'
collect2.exe: error: ld returned 1 exit status
dmake.exe:  Error code 129, while making 'blib\arch\auto\XML\LibXML\LibXML.dll'

Does anyone know how to resolve this issue? Any help is greatly appreciated!

Thanks!

Community
  • 1
  • 1
  • Are you under any proxy? And how are you installing this? – serenesat Jul 19 '16 at 14:00
  • 1
    From experience: It's a massive pain, but it's bundled in Strawberry perl. Which is why I switched. – Sobrique Jul 19 '16 at 14:01
  • ` can run the makefile.pl` show how you ran it. Show how you combined the various binaries for the prereqs. Needs more info from you – Dr.Avalanche Jul 19 '16 at 14:04
  • If you are not using any proxy, this should work `cpan install Lib::XML` – serenesat Jul 19 '16 at 14:04
  • I am in a company network so I'm running under a proxy – user6608600 Jul 19 '16 at 14:08
  • I downloaded the iconv, libxml2 and zlib binaries and merged then into one folder (under C:\libXML) and after that I downloaded XML-LibXML. From the directory I just typed perl Makefile.PL INC=-Ic:\LibXML\include LIBS=-Lc:\LibXML\lib. And no if I want to execute dmake there is the above mentioned error – user6608600 Jul 19 '16 at 14:11
  • could it be that there are some problems with MinGW? – user6608600 Jul 22 '16 at 06:08

1 Answers1

0

As you said you are using a proxy. Go with this:

You can use these commands to install module from ppm or cpan.

Open a command prompt and run these commands :

set http_proxy=http://xxx.xxx.xxx.x:yyyy (xxx is your system proxy and yyyy is port)
set http_proxy_user=username (system login username)
set http_proxy_pass=password (login password)

To install a module from cpan type:

cpan install modulename
serenesat
  • 4,611
  • 10
  • 37
  • 53
  • I tried this but it doesnt find xml2 or libxml2 then: Checking for ability to link against xml2...no Checking for ability to link against libxml2...libxml2, zlib, and/or the Math library (-lm) have not been found. – user6608600 Jul 19 '16 at 14:15
  • And if I try it with ppm it just says "No missing packages to install" – user6608600 Jul 19 '16 at 14:38