[lxml-dev] Unable to build lxml 2.2.6 on WinXP

I'm attempting to built lxml 2.2.6 with MinGW for Python 2.7b2 on Windows XP Pro SP 3 using static linking, but the build fails with the following error. Any suggestions? C:\lxml-2.2.6>python setup.py install --static Building lxml version 2.2.6. NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs 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: ..\iconv-1.9.2.win32\lib ..\libxml2-2.7.6.win32\lib ..\libxslt-1.1.26.win32\lib ..\zlib-1.2.3.win32\lib running install install_dir C:\Python27\Lib\site-packages\ running bdist_egg running egg_info writing src\lxml.egg-info\PKG-INFO writing top-level names to src\lxml.egg-info\top_level.txt writing dependency_links to src\lxml.egg-info\dependency_links.txt reading manifest file 'src\lxml.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'lxml.etree.c' under directory 'src\lxml' warning: no files found matching 'lxml.objectify.c' under directory 'src\lxml' warning: no files found matching 'lxml.etree.h' under directory 'src\lxml' warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxml' warning: no files found matching 'etree_defs.h' under directory 'src\lxml' warning: no files found matching 'pubkey.asc' under directory 'doc' warning: no files found matching 'tagpython*.png' under directory 'doc' writing manifest file 'src\lxml.egg-info\SOURCES.txt' installing library code to build\bdist.win32\egg running install_lib running build_py running build_ext building 'lxml.etree' extension C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -I..\iconv-1.9.2.win32\include - I..\libxml2-2.7.6.win32\include -I..\libxslt-1.1.26.win32\include -I..\zlib-1.2. 3.win32\include -IC:\Python27\include -IC:\Python27\PC -c src/lxml/lxml.etree.c -o build\temp.win32-2.7\Release\src\lxml\lxml.etree.o -w writing build\temp.win32-2.7\Release\src\lxml\etree.def C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.7\Release\src\lxm l\lxml.etree.o build\temp.win32-2.7\Release\src\lxml\etree.def -L..\iconv-1.9.2. win32\lib -L..\libxml2-2.7.6.win32\lib -L..\libxslt-1.1.26.win32\lib -L..\zlib-1 .2.3.win32\lib -LC:\Python27\libs -LC:\Python27\PCbuild -llibxslt_a -llibexslt_a -llibxml2_a -liconv_a -lzlib -lWS2_32 -lpython27 -lmsvcr90 -o build\lib.win32-2 .7\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 -- snip -- collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1

On Tue, Jun 1, 2010 at 2:34 PM, Russ Johnson <Russell.S.Johnson@gmail.com> wrote:
I'm attempting to built lxml 2.2.6 with MinGW for Python 2.7b2 on Windows XP Pro SP 3 using static linking, but the build fails with the following error. Any suggestions?
I have never tried to build with MinGW, so no clue on that. I know there are many people waiting for a 2.2.6 build for Windows, which I forgot to upload when I built the others. Stefan advised me to build it against libxml2 2.7.7 because of some potential crasher bugs, so I'm waiting for a new build from http://www.zlatkovic.com/libxml.en.html, which is where I get the libxml2 binaries from. OTOH, I *can* make a 2.2.6 build with libxml2 2.7.6 right now if people are willing to put up with potential crashes. Sorry everyone for not speaking up earlier. Between traveling and news that I will be dad of twins, life has been crazy lately. I'll make sure to put up a Baby Registry on Amazon where you can kindly contribute to my happiness as I do to yours *wink*. -- Sidnei

Russ Johnson, 01.06.2010 19:34:
I'm attempting to built lxml 2.2.6 with MinGW for Python 2.7b2 on Windows XP Pro SP 3 using static linking, but the build fails with the following error. Any suggestions?
C:\lxml-2.2.6>python setup.py install --static Building lxml version 2.2.6. NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs 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 **
It tells you that you need to have "xslt-config" in your PATH. It comes with libxslt. Not sure if this is required for the static build, though.
Using build configuration of libxslt Building against libxml2/libxslt in one of the following directories: ..\iconv-1.9.2.win32\lib ..\libxml2-2.7.6.win32\lib ..\libxslt-1.1.26.win32\lib ..\zlib-1.2.3.win32\lib
This looks ok.
running install install_dir C:\Python27\Lib\site-packages\ running bdist_egg running egg_info writing src\lxml.egg-info\PKG-INFO writing top-level names to src\lxml.egg-info\top_level.txt writing dependency_links to src\lxml.egg-info\dependency_links.txt reading manifest file 'src\lxml.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'lxml.etree.c' under directory 'src\lxml' warning: no files found matching 'lxml.objectify.c' under directory 'src\lxml' warning: no files found matching 'lxml.etree.h' under directory 'src\lxml' warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxml' warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
This looks weird. They seem to exist below ...
writing manifest file 'src\lxml.egg-info\SOURCES.txt' installing library code to build\bdist.win32\egg running install_lib running build_py running build_ext building 'lxml.etree' extension C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -I..\iconv-1.9.2.win32\include - I..\libxml2-2.7.6.win32\include -I..\libxslt-1.1.26.win32\include -I..\zlib-1.2. 3.win32\include -IC:\Python27\include -IC:\Python27\PC -c src/lxml/lxml.etree.c -o build\temp.win32-2.7\Release\src\lxml\lxml.etree.o -w writing build\temp.win32-2.7\Release\src\lxml\etree.def C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.7\Release\src\lxm l\lxml.etree.o build\temp.win32-2.7\Release\src\lxml\etree.def -L..\iconv-1.9.2. win32\lib -L..\libxml2-2.7.6.win32\lib -L..\libxslt-1.1.26.win32\lib -L..\zlib-1 .2.3.win32\lib -LC:\Python27\libs -LC:\Python27\PCbuild -llibxslt_a -llibexslt_a -llibxml2_a -liconv_a -lzlib -lWS2_32 -lpython27 -lmsvcr90 -o build\lib.win32-2 .7\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
-- snip --
collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1
The "snip" hides the interesting part. Stefan

That's the thing, I got the libraries from ftp://ftp.zlatkovic.com/pub/libxml/, as indicated in http://codespeak.net/lxml/build.html#static-linking-on-windows. However, I can't find xslt-config anywhere in libxslt. Is there somewhere else I should/could get them from? Full output is here: http://docs.google.com/document/pub?id=1lFTEQaW-76immaD3f9pDGDVZj26Dbs0iF6p3... On Wed, Jun 2, 2010 at 4:16 AM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Russ Johnson, 01.06.2010 19:34:
I'm attempting to built lxml 2.2.6 with MinGW for Python 2.7b2 on
Windows XP Pro SP 3 using static linking, but the build fails with the following error. Any suggestions?
C:\lxml-2.2.6>python setup.py install --static Building lxml version 2.2.6. NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' needs 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 **
It tells you that you need to have "xslt-config" in your PATH. It comes with libxslt. Not sure if this is required for the static build, though.
Using build configuration of libxslt
Building against libxml2/libxslt in one of the following directories: ..\iconv-1.9.2.win32\lib ..\libxml2-2.7.6.win32\lib ..\libxslt-1.1.26.win32\lib ..\zlib-1.2.3.win32\lib
This looks ok.
running install
install_dir C:\Python27\Lib\site-packages\ running bdist_egg running egg_info writing src\lxml.egg-info\PKG-INFO writing top-level names to src\lxml.egg-info\top_level.txt writing dependency_links to src\lxml.egg-info\dependency_links.txt reading manifest file 'src\lxml.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'lxml.etree.c' under directory 'src\lxml' warning: no files found matching 'lxml.objectify.c' under directory 'src\lxml' warning: no files found matching 'lxml.etree.h' under directory 'src\lxml' warning: no files found matching 'lxml.etree_api.h' under directory 'src\lxml' warning: no files found matching 'etree_defs.h' under directory 'src\lxml'
This looks weird. They seem to exist below ...
writing manifest file 'src\lxml.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg running install_lib running build_py running build_ext building 'lxml.etree' extension C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -I..\iconv-1.9.2.win32\include - I..\libxml2-2.7.6.win32\include -I..\libxslt-1.1.26.win32\include -I..\zlib-1.2. 3.win32\include -IC:\Python27\include -IC:\Python27\PC -c src/lxml/lxml.etree.c -o build\temp.win32-2.7\Release\src\lxml\lxml.etree.o -w writing build\temp.win32-2.7\Release\src\lxml\etree.def C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.7\Release\src\lxm l\lxml.etree.o build\temp.win32-2.7\Release\src\lxml\etree.def -L..\iconv-1.9.2. win32\lib -L..\libxml2-2.7.6.win32\lib -L..\libxslt-1.1.26.win32\lib -L..\zlib-1 .2.3.win32\lib -LC:\Python27\libs -LC:\Python27\PCbuild -llibxslt_a -llibexslt_a -llibxml2_a -liconv_a -lzlib -lWS2_32 -lpython27 -lmsvcr90 -o build\lib.win32-2 .7\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
-- snip --
collect2: ld returned 1 exit status error: command 'gcc' failed with exit status 1
The "snip" hides the interesting part.
Stefan

On Wed, Jun 2, 2010 at 5:16 AM, Stefan Behnel <stefan_ml@behnel.de> wrote:
It tells you that you need to have "xslt-config" in your PATH. It comes with libxslt. Not sure if this is required for the static build, though.
It's not. At least I have ignored it forever and haven't had an issue. -- Sidnei
participants (3)
-
Russ Johnson
-
Sidnei da Silva
-
Stefan Behnel