[Insight-users] ITK and python
Olivier Tournaire
olitour at gmail.com
Tue Nov 4 14:15:00 EST 2008
Gaëtan,
I tried with cable swig and itk from the cvs repositories. CableSwig
compiles and installs fine. However, when I try to build ITK, with
ITK_CSWIG_PYTHON ON, and I get the following error :
[ 15%] Generating Python/itk_compile_complete
Listing
/home/olivier/work/dev/lib/itk_for_python/Insight/Wrapping/CSwig/Python ...
Listing
/home/olivier/work/dev/lib/itk_for_python/Insight/Wrapping/CSwig/Python/CVS
...
Listing
/home/olivier/work/dev/lib/itk_for_python/Insight/Wrapping/CSwig/Python/InstallOnly
...
...
[ 15%] Built target itkpython_pyc
[ 15%] Built target install_wrapitk_compatibility
make[2]: *** Pas de règle pour fabriquer la cible « /usr/local/bin/cswig »,
nécessaire pour « Wrapping/CSwig/SwigRuntime/swigrunPython.cxx ». Arrêt.
make[1]: ***
[Wrapping/CSwig/SwigRuntime/CMakeFiles/SwigRuntimePython.dir/all] Erreur 2
make: *** [all] Erreur 2
Let me translate with my bad english ;-)
make[2]: *** No rule to build target « /usr/local/bin/cswig », needed for «
Wrapping/CSwig/SwigRuntime/swigrunPython.cxx ». Stop.
CableSwig_DIR is set to /usr/local/lib/CableSwig.
In /usr/local/lib/CableSwig/bin/, cableidx, cswig, gccxml and gccxml_cc1plus
are present.
In /usr/local/lib/CableSwig/, CableSwigConfig.cmake is present :
SET(CableSwig_VERSION_MAJOR "0")
SET(CableSwig_VERSION_MINOR "1")
SET(CableSwig_VERSION_PATCH "0")
SET(CableSwig_cableidx_EXE "/usr/local/bin/cableidx")
SET(CableSwig_cswig_EXE "/usr/local/bin/cswig")
SET(CableSwig_gccxml_EXE "/usr/local/lib/CableSwig/bin/gccxml")
SET(CableSwig_DEFAULT_LIB "/usr/local/lib/CableSwig/SWIGLib")
No idea ... Could you please help me ?
Best regards,
Olivier
2008/11/4 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>
>
> Can you try with cable swig cvs and itk cvs?
> We are close to a release, so there are in good shape :-)
>
> Thanks,
>
> Gaëtan
>
>
> Le 3 nov. 08 à 10:26, Olivier Tournaire a écrit :
>
>
> Thank you Gaëtan for you reply.
>>
>> I tried this morning to build python wrapping for itk, but still without
>> success. Here are the steps I performed :
>>
>> 1) mkdir build_with_python && cd build_with_python
>> 2) ccmake ..
>> 3) Turn USE_WRAP_ITK ON
>> 4) Turn ITK_USE_REVIEW ON
>> 5) make -j3
>>
>> The build stops at 43%, "Generating wrap_vcl_complex.xml"
>> He are are the errors :
>>
>> In file included from /usr/include/wchar.h:831,
>> from /usr/include/c++/4.3/cwchar:52,
>> from /usr/include/c++/4.3/bits/postypes.h:47,
>> from /usr/include/c++/4.3/iosfwd:47,
>> from /usr/include/c++/4.3/ios:44,
>> from /usr/include/c++/4.3/istream:45,
>> from /usr/include/c++/4.3/sstream:44,
>> from /usr/include/c++/4.3/complex:52,
>> from
>> /home/olivier/work/dev/lib/InsightToolkit-3.8.0/Utilities/vxl/vcl/iso/vcl_complex.h:6,
>> from
>> /home/olivier/work/dev/lib/InsightToolkit-3.8.0/Utilities/vxl/vcl/vcl_complex.h:62,
>> from
>> /home/olivier/work/dev/lib/InsightToolkit-3.8.0/build_with_python/Wrapping/WrapITK/Modules/VXLNumerics/wrap_vcl_complex.cxx:1:
>> /usr/include/bits/wchar2.h: In function 'int swprintf(wchar_t*, size_t,
>> const wchar_t*, ...)':
>> /usr/include/bits/wchar2.h:290: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/wchar2.h:291: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/wchar2.h: In function 'int wprintf(const wchar_t*,
>> ...)':
>> /usr/include/bits/wchar2.h:340: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/wchar2.h: In function 'int fwprintf(__FILE*, const
>> wchar_t*, ...)':
>> /usr/include/bits/wchar2.h:347: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> In file included from /usr/include/stdio.h:906,
>> from /usr/include/c++/4.3/cstdio:50,
>> from /usr/include/c++/4.3/bits/char_traits.h:48,
>> from /usr/include/c++/4.3/ios:46,
>> from /usr/include/c++/4.3/istream:45,
>> from /usr/include/c++/4.3/sstream:44,
>> from /usr/include/c++/4.3/complex:52,
>> from
>> /home/olivier/work/dev/lib/InsightToolkit-3.8.0/Utilities/vxl/vcl/iso/vcl_complex.h:6,
>> from
>> /home/olivier/work/dev/lib/InsightToolkit-3.8.0/Utilities/vxl/vcl/vcl_complex.h:62,
>> from
>> /home/olivier/work/dev/lib/InsightToolkit-3.8.0/build_with_python/Wrapping/WrapITK/Modules/VXLNumerics/wrap_vcl_complex.cxx:1:
>> /usr/include/bits/stdio2.h: In function 'int sprintf(char*, const char*,
>> ...)':
>> /usr/include/bits/stdio2.h:35: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/stdio2.h: In function 'int snprintf(char*, size_t, const
>> char*, ...)':
>> /usr/include/bits/stdio2.h:66: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/stdio2.h: In function 'int fprintf(FILE*, const char*,
>> ...)':
>> /usr/include/bits/stdio2.h:99: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/stdio2.h: In function 'int printf(const char*, ...)':
>> /usr/include/bits/stdio2.h:105: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/stdio2.h: In function 'int asprintf(char**, const char*,
>> ...)':
>> /usr/include/bits/stdio2.h:159: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/stdio2.h: In function 'int __asprintf(char**, const
>> char*, ...)':
>> /usr/include/bits/stdio2.h:167: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/stdio2.h: In function 'int dprintf(int, const char*,
>> ...)':
>> /usr/include/bits/stdio2.h:174: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> /usr/include/bits/stdio2.h: In function 'int obstack_printf(obstack*,
>> const char*, ...)':
>> /usr/include/bits/stdio2.h:182: error: '__builtin_va_arg_pack' was not
>> declared in this scope
>> make[2]: *** [Wrapping/WrapITK/Modules/VXLNumerics/wrap_vcl_complex.xml]
>> Erreur 1
>> make[1]: ***
>> [Wrapping/WrapITK/Modules/VXLNumerics/CMakeFiles/_VXLNumericsPython.dir/all]
>> Erreur 2
>> make: *** [all] Erreur 2
>>
>>
>> I am running an ubuntu-8.10 with g++ 4.3.2, gccxml 0.9.0, python 2.5 and
>> cswig 1.3.35. Do you have any idea of the problem ?
>>
>> Best regards,
>>
>> Olivier
>>
>> 2008/11/3 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>
>>
>> Le 2 nov. 08 à 19:41, Olivier Tournaire a écrit :
>>
>>
>> Hi all,
>>
>> Can someone tells me what is the status of ITK python wrapping ?
>> Which compiler(s) and versio(s) of python are supported and so on ...
>>
>>
>> Hi Olivier,
>>
>> You can use ITK from python in 3 ways at this time:
>> * CSwig: that's the one you see directly in ITK options as ;
>> * WrapITK stable: it is included in ITK, and is enabled with the
>> USE_WRAPITK_OPTION ;
>> * WrapITK unstable: the development version of wrapitk, available in a
>> separate repository.
>> I would recommend to use WrapITK stable, as it is way more complete than
>> CSwig, and much tested than WrapITK unstable.
>>
>> All those version should work with python 2.4 and 2.5, and gcc 4.x and
>> msvc 7.1, on linux, Mac OS X and solaris.
>> I'm using gcc 4.3 at this time.
>>
>> I've been quite busy in the last week, and I didn't had enough time to
>> carefully read the mailing list, so when you have a question on python
>> wrapping, please put my address in the recipients (and keep also itk users
>> ML, for the record). That way I shouldn't miss it.
>>
>> Regards,
>>
>> Gaëtan
>>
>> --
>> Gaëtan Lehmann
>> Biologie du Développement et de la Reproduction
>> INRA de Jouy-en-Josas (France)
>> tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
>> http://voxel.jouy.inra.fr http://www.mandriva.org
>> http://www.itk.org http://www.clavier-dvorak.org
>>
>>
>>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr http://www.mandriva.org
> http://www.itk.org http://www.clavier-dvorak.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081104/1b9f11cb/attachment-0001.htm>
More information about the Insight-users
mailing list