lxml 3.3.0 cannot be built on Windows with Visual Studio 2008

Bug #1274413 reported by Marius Gedminas
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxml
Fix Released
Medium
scoder

Bug Description

The official python.org build of Python 2.7 is compiled with Microsoft Visual Studio 2008. Therefore it would seem that for best compatibility all C extension modules should be compiled with the same Visual Studio version.

Unfortunately lxml 3.3.0 uses <stdint.h>, which is part of the C99 standard and not supported by VS 2008.

This breaks automated winbot.zope.org builds, which would otherwise build Windows installers and eggs and upload them to PyPI for the convenience of all Windows lxml users :(

Here's the build log:
http://winbot.zope.org/builders/wineggbuilder/builds/48053/steps/release%20eggs/logs/stdio

The relevant bit is:
c:\temp\lxmlbuild\lxml\src\lxml\lxml_endian.h(2) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

Revision history for this message
Marius Gedminas (mgedmin) wrote :

http://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio has some possible workarounds, e.g.

    #ifdef _MSC_VER

    typedef __int32 int32_t;
    typedef unsigned __int32 uint32_t;
    typedef __int64 int64_t;
    typedef unsigned __int64 uint64_t;

    #else
    #include <stdint.h>
    #endif

Revision history for this message
scoder (scoder) wrote :
Changed in lxml:
assignee: nobody → scoder (scoder)
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Marius Gedminas (mgedmin) wrote :

Thank you.

I'll try and see if I can do a test build on Windows. If it works, a 3.3.1 release would be very welcome.

(The zope.wineggbuilder lxml build script wants to download an lxml source tarball from pypi, given a version number on the command line. A 3.3.1beta1 release on PyPI would make this easier, but I can probably manage.)

Revision history for this message
Marius Gedminas (mgedmin) wrote :

I don't have a recent-enough version of Cython, so I cannot build an sdist. The version I've got (0.19 from Ubuntu 13.10) lacks support for @cython.no_gc_clear.

Revision history for this message
Guy Rozendorn (guy-rozendorn) wrote :
Revision history for this message
scoder (scoder) wrote :

Fix will be released in 3.3.1.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

For the record, Stefan Behnel sent me a 3.3.1pre tarball with pre-processed Cython files, and I successfully built it on winbot.zope.org.

Revision history for this message
scoder (scoder) wrote :

Fixed in lxml 3.3.1.

Changed in lxml:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.