[lxml-dev] Building Python2.6 Windows eggs

Laurence Rowe l at lrowe.co.uk
Sun May 23 02:42:59 CEST 2010


I've been unable to build lxml under windows using mingw, having
followed the instructions from:

 * http://plone.org/documentation/kb/using-buildout-on-windows
 * http://codespeak.net/lxml/build.html#static-linking-on-windows

The full error message is attached, but this seems to be the same
undefined refernece problems people have run into before (e.g.
http://osdir.com/ml/python.lxml.devel/2007-07/msg00039.html).

Any idea what I'm doing wrong? Or do I need visual studio?

It would be great if someone could build a python 2.6 Windows egg and
upload it to pypi!

Laurence
-------------- next part --------------
C:\scratch\lxmlbuild\lxml-2.2.6>python setup.py bdist_wininst --static
Building lxml version 2.2.6.
NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' need
s to be available.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
Building against libxml2/libxslt in one of the following directories:
  ..\libxml2-2.7.6.win32\lib
  ..\libxslt-1.1.26.win32\lib
  ..\zlib-1.2.3.win32\lib
  ..\iconv-1.9.2.win32\lib
running bdist_wininst
running build
running build_py
running build_ext
building 'lxml.etree' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -I..\libxml2-2.7.6.win32\include
 -I..\libxslt-1.1.26.win32\include -I..\zlib-1.2.3.win32\include -I..\iconv-1.9.
2.win32\include -IC:\Python26\include -IC:\Python26\PC -c src/lxml/lxml.etree.c
-o build\temp.win32-2.6\Release\src\lxml\lxml.etree.o -w
writing build\temp.win32-2.6\Release\src\lxml\etree.def
C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.6\Release\src\lxm
l\lxml.etree.o build\temp.win32-2.6\Release\src\lxml\etree.def -L..\libxml2-2.7.
6.win32\lib -L..\libxslt-1.1.26.win32\lib -L..\zlib-1.2.3.win32\lib -L..\iconv-1
.9.2.win32\lib -LC:\Python26\libs -LC:\Python26\PCbuild -llibxslt_a -llibexslt_a
 -llibxml2_a -liconv_a -lzlib -lWS2_32 -lpython26 -lmsvcr90 -o build\lib.win32-2
.6\lxml\etree.pyd
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"ws
2_32.lib" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"ad
vapi32.lib" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MS
VCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
Warning: .drectve `/DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
..\libxslt-1.1.26.win32\lib/libxslt_a.lib(int.xslta.msvc/xsltutils.obj):..\libxs
lt\xsltuti:(.text[_xsltTimestamp]+0xa5): undefined reference to `_ftol2'
..\libxslt-1.1.26.win32\lib/libxslt_a.lib(int.xslta.msvc/numbers.obj):..\libxslt
\numbers:(.text[_xsltNumberFormatDecimal]+0x9c): undefined reference to `_ftol2'

..\libxslt-1.1.26.win32\lib/libxslt_a.lib(int.xslta.msvc/numbers.obj):..\libxslt
\numbers:(.text[_xsltNumberFormatAlpha]+0x4b): undefined reference to `_ftol2'
..\libxslt-1.1.26.win32\lib/libxslt_a.lib(int.xslta.msvc/numbers.obj):..\libxslt
\numbers:(.text[_xsltNumberFormat]+0x6): undefined reference to `_chkstk'
..\libxslt-1.1.26.win32\lib/libexslt_a.lib(int.exslta.msvc/date.obj):..\libexslt
\date.c:(.text[_exsltDateParseDuration]+0x226): undefined reference to `_ftol2'
..\libxslt-1.1.26.win32\lib/libexslt_a.lib(int.exslta.msvc/date.obj):..\libexslt
\date.c:(.text[_exsltDateParseDuration]+0x230): undefined reference to `_ftol2'
..\libxslt-1.1.26.win32\lib/libexslt_a.lib(int.exslta.msvc/date.obj):..\libexslt
\date.c:(.text[_exsltDateFormatDuration]+0x119): undefined reference to `_ftol2'

..\libxslt-1.1.26.win32\lib/libexslt_a.lib(int.exslta.msvc/date.obj):..\libexslt
\date.c:(.text[_exsltDateFormatDuration]+0x175): undefined reference to `_ftol2'

..\libxslt-1.1.26.win32\lib/libexslt_a.lib(int.exslta.msvc/date.obj):..\libexslt
\date.c:(.text[_exsltDateFormatDuration]+0x213): undefined reference to `_ftol2'

..\libxslt-1.1.26.win32\lib/libexslt_a.lib(int.exslta.msvc/date.obj):..\libexslt
\date.c:(.text[_exsltDateFormatDuration]+0x28a): more undefined references to `_
ftol2' follow
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/valid.obj):..\valid.c:(.text
[_xmlValidBuildContentModel]+0x6): undefined reference to `_chkstk'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/valid.obj):..\valid.c:(.text
[_xmlValidateElementContent]+0x6): undefined reference to `_chkstk'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/encoding.obj):..\encoding.c:
(.text[_xmlByteConsumed]+0x6): undefined reference to `_chkstk'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/xpointer.obj):..\xpointer.c:
(.text[_xmlXPtrStringRangeFunction]+0x65): undefined reference to `_ftol2'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/xpointer.obj):..\xpointer.c:
(.text[_xmlXPtrStringRangeFunction]+0x9d): undefined reference to `_ftol2'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/debugXML.obj):..\debugXML.c:
(.text[_xmlCtxtDumpElemDecl]+0x6): undefined reference to `_chkstk'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/xmlschemastypes.obj):..\xmls
chemastypes:(.text[_xmlSchemaValidateDuration]+0x21c): undefined reference to `_
ftol2'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/xmlschemastypes.obj):..\xmls
chemastypes:(.text[_xmlSchemaValidateDuration]+0x226): undefined reference to `_
ftol2'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/xmlschemastypes.obj):..\xmls
chemastypes:(.text[_xmlSchemaCompareDurations]+0x2f): undefined reference to `_f
tol2'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/xmlschemastypes.obj):..\xmls
chemastypes:(.text[__xmlSchemaDateAdd]+0xfe): undefined reference to `_ftol2'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/xmlschemastypes.obj):..\xmls
chemastypes:(.text[__xmlSchemaDateAdd]+0x120): undefined reference to `_ftol2'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/xmlschemastypes.obj):..\xmls
chemastypes:(.text[__xmlSchemaDateAdd]+0x171): more undefined references to `_ft
ol2' follow
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/nanohttp.obj):..\nanohttp.c:
(.text[_xmlNanoHTTPReadLine]+0x6): undefined reference to `_chkstk'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/nanoftp.obj):..\nanoftp.c:(.
text[_xmlNanoFTPList]+0x6): undefined reference to `_chkstk'
..\libxml2-2.7.6.win32\lib/libxml2_a.lib(int.a.msvc/nanoftp.obj):..\nanoftp.c:(.
text[_xmlNanoFTPGet]+0x6): undefined reference to `_chkstk'
..\iconv-1.9.2.win32\lib/iconv_a.lib(iconv.obj):./iconv.c:(.text[_libiconvlist]+
0x9): undefined reference to `_chkstk'
..\zlib-1.2.3.win32\lib/zlib.lib(gzio.obj):gzio.c:(.text[_gzprintf]+0x6): undefi
ned reference to `_chkstk'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

C:\scratch\lxmlbuild\lxml-2.2.6>


More information about the lxml-dev mailing list