Re: [xslt] Compiling LibXSLT on Win32 using MinGW

On 02/09/2010 01:25, Michael Ludwig wrote:
Preliminary note: This is a sibling to another post of mine on the
ActivePerl (Perl for Windows) mailing list, which is here:

Compiling XML::LibXSLT and prereqs using MinGW

I'm trying to compile LibXSLT on Win32 (XP Pro) using MinGW, but I'm
going wrong somehow.

I downloaded the latest sources (libxml2 2.7.7 and libxslt 1.1.26) from and unpacked them to the following setup:

C:\Opt\Src\libxslt                              - LibXSLT
C:\Opt\Src\libxslt\win32                        - Win32 build env
C:\Opt\Src\libxslt\win32\configure.js           - configure script
C:\Opt\Src\libxml2                              - LibXML2
C:\Opt\Src\libxml2\include                      - added to INCLUDE
C:\Opt\Src\libxml2\include\libxml\xmlversion.h  - one included header

This is what I'm doing:

dmake clean
dmake distclean

configure.js compiler=mingw ^                    - using MinGW
   prefix=C:\Opt\Lib\LibXSLT  ^                   - target dir
   include=C:\Opt\Src\libxml2\include ^           - libxml2 headers
   lib=D:\ActivePerl512\site\lib\auto\XML\LibXML  - LibXML.dll

I have to edit the Makefile to adapt the subst makro for dmake. Not

But then, the error that stops me:

gcc.exe -DWIN32 -D_WINDOWS -D_MBCS -I.. -I..\libxslt
-IC:\Opt\Lib\LibXSLT\include -D_DEBUG -g -DLIBXML_STATIC
mingw\attributes.o ..\libxslt\attributes.c
In file included from ..\libxslt\libxslt.h:16,
                  from ..\libxslt\attributes.c:13:
../config.h:92:31: libxml/xmlversion.h: No such file or directory

Note the -IC:\Opt\Lib\LibXSLT\include flag. There's nothing there and I
didn't instruct dmake to look there, at least not consciously. Instead,
I told it to look in include=C:\Opt\Src\libxml2\include, but it doesn't
do that.

Is the build script configure.js broken or supposed to work? Just asking
because the Makefile it generated didn't seem 100 % up to par.

It is supposed to work at least with MSVC. Can you try to pass 'incdir' instead of 'include' to configure.js?


aevum gmbh
rumfordstr. 4
80469 münchen

tel: +49 89 3838 0653

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]