[vtk-developers] Python-related dashboard build errors with new clang

David Gobbi david.gobbi at gmail.com
Thu Nov 12 11:50:25 EST 2015


Hi Sean,

I haven't seen it (still using Xcode 6.1), but I can guess at a fix.

The VTK classes never include Python.h directly, they always
include "vtkPython.h" which already has a bunch of fixes for
issues like this one.

To fix in vtkPython.h, an "#undef toupper" will have to be added
after "#include <Python.h>" (with checks for the clang version).

 - David



On Thu, Nov 12, 2015 at 9:16 AM, Sean McBride <sean at rogue-research.com>
wrote:

> Hi all,
>
> A few days ago I updated clang on some of my buildbots and now get this:
>
> <https://open.cdash.org/viewBuildError.php?buildid=4098065>
>
> This seems to be because a Python header is doing an evil redefinition:
>
> /usr/include/python2.7/pyport.h:731:9: note: macro 'toupper' defined here
> #define toupper(c) towupper(btowc(c))
>         ^
>
> My guess is toupper was a #define with older clang, and is now a function
> with newer clang.
>
> Googling finds this has been discussed years ago:
> <http://bugs.python.org/issue10910>
>
> I'm hoping one of you have seen this before or have some idea of how to
> fix it...
>
> Cheers,
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20151112/ce33d9ce/attachment.html>


More information about the vtk-developers mailing list