[Insight-users] itk python wrapping failing on Win

Prevrhal, Sven Sven.Prevrhal at philips.com
Tue Jun 5 07:22:16 EDT 2012


Thanks Alex,
I checked for whether ITK_EXPORT is defined in itkProcessObject and similar files. The mouse-over didn't work (stayed empty, even after IntelliSense completed) but typing ITK_EXP and Alt-right-arrow word-complete worked and showed the macro in itkMacro.h where I also found the code. So there is some evidence the macro is defined and the errors I see are related to something other than ITK_EXPORT. 

Re unchecking ITK_WRAP_EXPLICIT, I tried that and get new errors, they are all like this one:

Generating itkScalarImageToTextureFeaturesFilter.xml
Compiler "cl" is not supported by GCC_XML because none of 
the Vc6, Vc7, Vc71, Vc8, Vc8ex, Vc9, Vc9ex or Vc10 support directories exists.
Could not determine GCCXML_FLAGS setting.
Project : error PRJ0019: A tool returned an error code from "Generating itkScalarImageToTextureFeaturesFilter.xml"

Is there a guide on the ITK_WRAP Cmake macros - ITK_WRAPPING, ITK_WRAP_EXPLICIT, ITK_WRAP_GCCXML - what thety are and in what combination they can/should be used?

If I find a way to successfully compile, I will gladly contribute!

-- Sven 

-----Original Message-----
From: Alexandre GOUAILLARD [mailto:agouaillard at gmail.com] 
Sent: Sonntag, 27. Mai 2012 12:41
To: Prevrhal, Sven
Cc: insight-users at itk.org
Subject: Re: [Insight-users] itk python wrapping failing on Win

dear sven,

you re getting different errors messages, that s progress :-)

On Sun, May 27, 2012 at 4:26 AM, Prevrhal, Sven <Sven.Prevrhal at philips.com> wrote:
> Thanks -
> I tried D:/ for itk build, same error. Then I followed your advice and tried installing gccxml and ITK_USE_SYSTEM_GCCXML.
>
> Now I get errors like
>
> 867>D:\packages\src\ITK-nightly\Modules\Filtering\ImageIntensity\inclu
> 867>de\itkConstrainedValueDifferenceImageFilter.h(97) : error C2487: 
> 867>'itk::ProcessObject::MakeOutput' : member of dll interface class 
> 867>may not be declared with dll interface
>
> And literally 100s of 1000s of lines like

I never met that specific error before but, it's likely to be related to the window specific all import/export feature. If this is the case, this is supposed to be made transparent through the definition of ITK_EXPORT at configuration time. each itk class declaration should use it ( class ITK_EXPORT itkMyClassName ...). Can you check if in the declaration of itkProcessObject the keyword is there and as the right value (in MSVC you can move your mouse over the symbol to see it's definition, if it s empty, you have a problem).

this is a windows issues and, from what I see, not necessarily related to wrapping.

>
> 867>D:\packages\builds\itk-nightly-x86\Wrapping\Typedefs\ITKImageInten
> 867>sityExplicit.h(628) : warning C4231: nonstandard extension used : 
> 867>'extern' before template explicit instantiation

I wouldn't use EXPLICIT. Just use normal wrapping (there is an extra advanced flag for EXPLICIT instanciation, that is supposed to fasten the compilation of the wrapping if you use several language by first explicitly instantiating some of the template, and then wrapping those, switch it off).

>
> I am sure I missing something obvious - there must be more folks out there wanting to compile itk with python wrapping on a windows box.

I guess it works for them :-)

More seriously, I just checked the dashboard sand indeed, there is not a lot of windows machine (ihpc @ NLM, redwall @ kitware, factory @ kitware which has a different purpose, ...). Maybe it s time to call for contribution. I will see if I can resurrect one of the machine that gaetan was using for the wrapping.

Maybe you would also like to contribute, even only on-time experimental build so we can see more in details your errors? within MSVC just build the Experimental project (which is skipped by default when you BUILD_ALL), from the command line you can run:
ctest -D Experimental.

regards,

alex.
>
> sven
>
> -----Original Message-----
> From: Alexandre GOUAILLARD [mailto:agouaillard at gmail.com]
> Sent: Samstag, 26. Mai 2012 10:22
> To: Prevrhal, Sven
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] itk python wrapping failing on Win
>
> hi,
>
> my guts feeling is that the path to the executable is too long.
> try to either relocate ITK closer to the D:/ root, or to install gccXML first, and use the installed version within ITK.
>
> regards,
>
> alex.
>
>
> On Sat, May 26, 2012 at 6:13 AM, Prevrhal, Sven <Sven.Prevrhal at philips.com> wrote:
>> Gccxml is making trouble. Non-wrapping projects all compile just 
>> fine, using
>> VS2008 32-bit debug. Python wrappers don't compile at all. Here is a 
>> snippet of the build log - any ideas? I did set GCCXML_COMPILER to
>> msvc9 but it apparently got ignored, and probably wouldn't solve the problem anyway.
>>
>>
>>
>> 290>Generating itkAntiAliasBinaryImageFilter.xml
>>
>> 289>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
>> 289>15.00.21022.08
>> for 80x86
>>
>> 289>Copyright (C) Microsoft Corporation.  All rights reserved.
>>
>> 289>usage: cl [ option... ] filename... [ /link linkoption... ]
>>
>> 289>Warning:
>>
>> 289>Compiler "cl" specified, but more than one of MSVC 6, 7, 7.1, 8, 
>> 289>9, and
>> 10 are installed.
>>
>> 289>Please specify "msvc6", "msvc7", "msvc71", "msvc8", "msvc8ex", 
>> 289>"msvc9",
>> or "msvc10" for the GCCXML_COMPILER setting.
>>
>> 289>Using MSVC 9 because it was used to build GCC-XML.
>>
>> 289>Error: Could not run
>> D:/packages/builds/itk-nightly-x86/Wrapping/Generators/GccXML/gccxml/bin/gccxml_cc1plus.exe:
>>
>> 289>The filename or extension is too long
>>
>> 289>Project : error PRJ0019: A tool returned an error code from 
>> 289>"Generating
>> itkErodeObjectMorphologyImageFilter.xml"
>>
>>
>>
>>
>>
>>
>> ________________________________
>> The information contained in this message may be confidential and 
>> legally protected under applicable law. The message is intended 
>> solely for the addressee(s). If you are not the intended recipient, 
>> you are hereby notified that any use, forwarding, dissemination, or 
>> reproduction of this message is strictly prohibited and may be 
>> unlawful. If you are not the intended recipient, please contact the 
>> sender by return e-mail and destroy all copies of the original message.
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at 
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
> ________________________________
> The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
>



More information about the Insight-users mailing list