[Insight-users] problem to wrap Itk with python
Luis Ibanez
luis.ibanez@kitware.com
Sat May 15 04:47:12 EDT 2004
Hi Nick
Thanks for trying this out and sending your error messages.
It seems that the problem is due to the length of the path
where you are building ITK. If you look at the lines that
are being created in the project file, the command line arguments
for "gccxml.exe" are quite long. Some of them get to the 1800
characters.
The easy way to reduce the length of the total line is by
building ITK in a directory that has a shorter path. Note that
actually both the source and binary directories contribute to
the lenght of the command line arguments passed to gccxml.
You may have to shrink both paths.
Right now you are using
Binary C:/Project/itk/Insight_bin/
Source C:/Project/itk/Insight
Please use something shorter, like for example:
Binary C:/Project/itkbin
Source C:/Project/Insight
Regards,
Luis
---------------
Nick Hu wrote:
> Hi Luis,
>
> Unfortunately, I still got some errors when I built itk with python
> wrapping.
> I indicate when the errors came up-- please move down further: I described
> the errors between two rows of star sign.
>
> the good thing is the error occurs very close to the end :)
>
> Thanks,
>
> nick
> ----- Original Message -----
> From: "Luis Ibanez" <luis.ibanez@kitware.com>
> To: "Nick Hu" <nhu@sten.sunnybrook.utoronto.ca>
> Cc: <Insight-users@itk.org>
> Sent: Thursday, May 13, 2004 4:54 PM
> Subject: Re: [Insight-users] problem to wrap Itk with python
>
>
>
>>
>>Hi Nick,
>>
>>
>>Your ITK build is certainly a mess :-)
>>
>>
>>Please follow the "Perestroika" procedure:
>>
>>
>>A) Delete the entire binary directory
>> where you were attempting to build ITK
>>
>>B) Delete the entire binary directory
>> where you built CableSwig.
>>
>>C) Delete the directory where you have
>> CableSwig sources.
>>
>>D) Delete the directory where you have
>> ITK sources.
>>
>>
>>
>>Take deep breath.
>>
>>It's time for renovation...
>>
>>
>>E) Download ITK sources through CVS
>> The wrapping builds are green today
>> in the Dashboard.
>>
>>F) Go to the Utilities directory and
>> download the CVS version of CableSwig
>> in that directory.
>>
>> You should end up with something like
>>
>> Insight/Utilities/CableSwig
>>
>>
>>G) Make sure that you are using CMake 1.8.3
>>
>>
>>H) Configure ITK using CMake.
>>
>> *DO NOT* build in-source. (it seems that
>> you were doing that in you current built).
>>
>> Select a binary directory different from
>> the source directory.
>>
>> Make sure that you select the correct
>> version of the compiler. This is done in
>> the upper right menu of the CMake GUI.
>>
>> Then
>>
>> - Disable EXAMPLES
>> - Disable TESTING
>> - Enable SHARED_LIBRARIES
>>
>> click Configure, and then click OK
>>
>>
>>I) Load the .sln project into VisualStudio.
>> *VERY IMPORTANT*: verify that your visual
>> studio do not think that the .txx files
>> should be compiled !!. Some users have
>> manually set that option in order to
>> see the source files in their project,
>> and cause havoc at compilation time.
>>
>>
>>
>>J) Build this project. It should take about
>> 15 minutes.
>>
>>
>>
>>If the build fails, please send us any
>>error messages that you get.
>>
>>
>>
>>
>>
>>K) If the build goes ok, then Quit VisualStudio
>> (close the project) and rerun CMake.
>>
>> Enable Python wrapping.
>>
>> Make sure that you select a consistent
>> set of Python interpreter and libraries.
>> E.g. you don't want to use the python
>> libraries of windows, with the python
>> interpreter of Cygwin.
>>
>>
>>L) Reload the project in VisualStudio
>>
>>
>>M) Build.
>>
>>
>>IF you get any build errors, please post them
>>to the list.
>
>
>
>
> ******************************************************
> I got errors here. The error message is a little long so I copy it to a text
> file(error.txt). I also attach a "BuildLog" file from one the directories
> with error returns.
>
> ******************************************************
>
>
>
>>N) Set the PYTHONPATH variable according
>> to the instruction in the README file
>>
>> Insight/Wrapping/CSwig/README
>>
>>
>>O) Try running any of the Python examples in
>>
>>
>>
>> Insight/Examples
>>
>>
>>
>>
>>----
>>
>>
>>If you get in trouble in any of those steps
>>please let us know up to what step you were
>>doing OK.
>>
>>
>>
>> Thanks
>>
>>
>>
>> Luis
>>
>>
>>
>>
>>
>>
More information about the Insight-users
mailing list