[vtk-developers] Unable to build Python Interpreter in debug mode TBB and VS2013.

Andrew Maclean andrew.amaclean at gmail.com
Mon Mar 7 05:16:58 EST 2016


Ok, thanks to David's comment.

Here is a fix ready for review:
https://gitlab.kitware.com/vtk/vtk/merge_requests/1306

This seems to be caused by the line:
# define _DEBUG
 in
Utilities/Python/vtkPython.h
line 90.

_DEBUG was undefined on line 52 and then redefined on line 90.
Changing line 90 to:
# define _DEBUG 1
 seems to fix this.

Regards
    Andrew


On Mon, Mar 7, 2016 at 8:39 AM, Andrew Maclean <andrew.amaclean at gmail.com>
wrote:

> Thankyou for this David. I couldn't remember how to do this!
>
> Regards
>    Andrew
>
>
> On Mon, Mar 7, 2016 at 1:18 AM, David Gobbi <david.gobbi at gmail.com> wrote:
>
>> Hi Andrew,
>>
>> Probably the best way to approach this is to find out what preprocessor
>> symbol is causing the problem, tbb_config.h line 545 is as follows:
>>
>> #if __GLIBC__==2 && __GLIBC_MINOR__==3 ||  (__APPLE__ && (
>> __INTEL_COMPILER==1200 && !TBB_USE_DEBUG))
>>
>> You can print the values of these symbols (to find out which one is
>> defined as something other than a number) with the same technique used for
>> the __LINE__ example on the following MSDN web page:
>>
>> https://msdn.microsoft.com/en-us/library/x7dkzch2.aspx
>>
>>  - David
>>
>>
>> On Sat, Mar 5, 2016 at 11:25 PM, Andrew Maclean <
>> andrew.amaclean at gmail.com> wrote:
>>
>>> Hi All
>>>
>>> Build:
>>>    Windows 10, compiler VS_12 (2013), 64-bit, Anaconda Python 2.7.
>>>    TBB is found and the paths are correct.
>>>
>>> The release version builds without errors.
>>>
>>> If I build the Debug version with Python wrapping set to "ON" I get the
>>> error:
>>>    "c:\intel\tbb\tbb44_20160128oss\include\tbb\tbb_config.h(545) : fatal
>>> error C1017: invalid integer constant expression", this particular error
>>> normally relates to an expression in an #if directive that either did not
>>> exist or did not evaluate to a constant.
>>>
>>> This occurs when the following are being built:
>>>    "Utilities\PythonInterpreter\vtkPythonInterpreter"
>>>    "Utilities\PythonInterpreter\vtkPythonInteractiveInterpreter"
>>>    "Parallel\MPI4Py\vtkMPI4PyCommunicator"
>>>    "Wrapping\PythonCore\PyVTKObject"
>>>    "Wrapping\PythonCore\vtkPythonCommand"
>>>    "Wrapping\PythonCore\vtkPythonUtil"
>>>
>>> I built one of the TBB examples using the FindTBB.cmake in VTK for both
>>> vs_12 (2013) and vs_14 (2015) with no errors or warnings. So
>>> tbb/tbb_config.h does not seem to be causing the problem. Lines 290-296 set
>>> TBB_USE_DEBUG appropriately in tbb/tbb_config.h depending upon whether it
>>> is a Debug or Release build.
>>> So I think the problem relates to something in VTK.
>>>
>>> Coming back to VTK, I looked through the CMakeLists.txt files and
>>> couldn't see any definitions that could be causing this error for the
>>> python wrapping.
>>>
>>> Any ideas?
>>>
>>> Regards
>>>
>>> Andrew
>>>
>>>
>>> --
>>> ___________________________________________
>>> Andrew J. P. Maclean
>>>
>>>
>>
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
>
> ___________________________________________
>



-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160307/004995f7/attachment.html>


More information about the vtk-developers mailing list