<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Normally if you are building with latest git master, you should not be able to build with SWIG 2.0.11</div><div>There is a check which asks for 3.0.0. That's why we ship our own swig built as an external project.</div><div><br></div><div>I recommend you set ITK_USE_SYSTEM_SWIG=OFF.</div><div>Maybe try working from a clean new build directory.</div><div><br></div><div>I will see if I can test this soon on Fedora 20 but I bet this is not OS related.</div><div><br></div><div>Michka</div><br><div><div>Le 5 juin 2014 à 14:34, Rashad M a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi again,<div><br></div><div>I succeeded in building python bindings. First i disabled internal swig ITK_USE_SYSTEM_SWIG=ON</div><div><br></div><div>cd Wrapping/Generators</div><div>make clean</div><div>make</div>
<div><div>Copying itk.py to build dir.</div><div>Copying itkBase.py to build dir.</div><div>Copying itkTemplate.py to build dir.</div><div>Copying itkTypes.py to build dir.</div><div>Copying itkExtras.py to build dir.</div>
<div>Copying itkLazy.py to build dir.</div><div>Built target copy_python_files</div></div><div><br></div><div>if i do make install from Wrapping/Generators, I got:</div><div><br></div><div><div>-- Install configuration: "Release"</div>
<div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/CMakeLists.txt</div><div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/itk.i</div><div>-- Installing: /home/rashad/local/lib/ITK-4.6/Python/itkConfig.py</div>
<div>-- Installing: /home/rashad/local/lib/ITK-4.6/Python/WrapITKBuildOptionsPython.py</div><div>-- Installing: /home/rashad/local/lib/ITK-4.6/Python/Configuration/WrapITKBuildOptionsConfig.py</div><div>-- Installing: /home/rashad/local/lib/ITK-4.6/Python/itk.py</div>
<div>-- Installing: /home/rashad/local/lib/ITK-4.6/Python/itkBase.py</div><div>-- Installing: /home/rashad/local/lib/ITK-4.6/Python/itkTemplate.py</div><div>-- Installing: /home/rashad/local/lib/ITK-4.6/Python/itkTypes.py</div>
<div>-- Installing: /home/rashad/local/lib/ITK-4.6/Python/itkExtras.py</div><div>-- Installing: /home/rashad/local/lib/ITK-4.6/Python/itkLazy.py</div><div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/Python/CMakeLists.txt</div>
<div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/Python/<a href="http://ExternalProjectConfig.pth.in/">ExternalProjectConfig.pth.in</a></div><div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/Python/<a href="http://ExternalProjectConfig.py.in/">ExternalProjectConfig.py.in</a></div>
<div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/Python/<a href="http://ModuleConfig.py.in/">ModuleConfig.py.in</a></div><div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/Python/<a href="http://ModuleLoader.py.in/">ModuleLoader.py.in</a></div>
<div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/Python/<a href="http://WrapITK.pth.in/">WrapITK.pth.in</a></div><div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/Python/<a href="http://itkConfig.py.in/">itkConfig.py.in</a></div>
<div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/Python/<a href="http://main_module_ext.i.in/">main_module_ext.i.in</a></div><div>-- Installing: /home/rashad/local/lib/cmake/ITK-4.6/WrapITK/Configuration/Generators/Python/<a href="http://module_ext.i.in/">module_ext.i.in</a></div>
</div><div><br></div><div><br></div><div>But if i go to top level directory</div><div>cd ~/build/trunk-itk</div><div><br></div><div>make</div><div><br></div><div>I am getting the error in last message:</div><div><br></div>
<div><div>[ 45%] Built target copy_python_files</div><div>[ 45%] Generating pyBasePython.cpp, ../../../../lib/pyBasePython.py</div><div>/bin/sh: /home/rashad/build/trunk-itk/Wrapping/Generators/SwigInterface/swig/bin/swig: No such file or directory</div>
<div>make[2]: *** [Wrapping/Generators/Python/PyBase/pyBasePython.cpp] Error 127</div><div>make[1]: *** [Wrapping/Generators/Python/PyBase/CMakeFiles/ITKPyBasePython.dir/all] Error 2</div></div><div><br></div><div>I think this is trying to use internal swig even if ITK_USE_SYSTEM_SWIG=OFF</div>
<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 5, 2014 at 12:09 PM, Rashad M <span dir="ltr"><<a href="mailto:mohammedrashadkm@gmail.com" target="_blank">mohammedrashadkm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">ITK version from git master<div><div><br></div><div>git pull gives: Already up-to-date.</div></div><div>
<br></div><div>Platform: Linux Fedora 20 x86_64</div><div>Python: Python 2.7.5 (default, Feb 19 2014, 13:47:28) </div>
<div>[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2</div><div><br></div><div>System SWIG: </div><div><div>SWIG Version 2.0.11</div><div><br></div><div>Compiled with g++ [x86_64-redhat-linux-gnu]</div><div><br></div><div>
Configured options: +pcre</div></div><div><br></div><div>I followed your suggestion and enabled only ITK_WRAP_PYTHON=ON and I am getting the below error during make</div><div><br></div><div><div>make[2]: *** No rule to make target `/home/rashad/code/itk/ITK/Wrapping/Generators/Python/PyBase/swig', needed by `Wrapping/Generators/Python/PyBase/pyBasePython.cpp'. Stop.</div>
<div>make[1]: *** [Wrapping/Generators/Python/PyBase/CMakeFiles/ITKPyBasePython.dir/all] Error 2</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">
On Thu, Jun 5, 2014 at 11:40 AM, Michka Popoff <span dir="ltr"><<a href="mailto:michkapopoff@gmail.com" target="_blank">michkapopoff@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi<div><br></div><div>I changed to the community mailing list to answer your question, so everybody sees it.<div>
<br><div><div><br></div><div>To build the python wrappings, you juste need the DITK_WRAP_PYTHON=ON option.</div><div>Note: Java, Ruby and TCL can stay OFF, those are not supported for the moment (even if the options are present in cmake).</div>
<div>I would need more details to be able to help you:</div><div><br></div><div>- Which version of ITK are you trying to build</div><div>- What version of python</div><div>- On what platform (linux, mac, win ?) are you trying this.</div>
<div><br></div><div>Michka</div></div></div><div><br><div><div><div>Le 5 juin 2014 à 11:01, Rashad M a écrit :</div><br></div><blockquote type="cite"><div><div><div dir="ltr">Hi,<div><br></div><div>I tried to build python bindings for ITK and build failed with below output:</div>
<div><br></div><div><div>canning dependencies of target ITKPyBasePython</div><div>[ 23%] Building CXX object Wrapping/Generators/Python/PyBase/CMakeFiles/ITKPyBasePython.dir/ITKPyBasePython.cpp.o</div>
<div>[ 23%] Building CXX object Wrapping/Generators/Python/PyBase/CMakeFiles/ITKPyBasePython.dir/pyBasePython.cpp.o</div><div>Linking CXX shared module ../../../../lib/_ITKPyBasePython.so</div><div>[ 23%] Built target ITKPyBasePython</div>
<div>Scanning dependencies of target ITKCommonIdx</div><div>[ 23%] Generating ../../Typedefs/vcl_complex.idx</div><div>Traceback (most recent call last):</div><div> File "/home/rashad/code/itk/ITK/Wrapping/Generators/SwigInterface/idx.py", line 28, in <module></div>
<div> res = pygccxml_reader.read_xml_file(sys.argv[1])</div><div> File "/home/rashad/code/itk/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/source_reader.py", line 240, in read_xml_file</div>
<div> ffname = self.__file_full_name(gccxml_created_file)</div><div> File "/home/rashad/code/itk/ITK/Wrapping/Generators/SwigInterface/pygccxml-1.0.0/pygccxml/parser/source_reader.py", line 277, in __file_full_name</div>
<div> raise RuntimeError( "pygccxml error: file '%s' does not exist" % file )</div><div>RuntimeError: pygccxml error: file '/home/rashad/build/itk/ITK_/Wrapping/Typedefs/vcl_complex.idx' does not exist</div>
<div>make[2]: *** [Wrapping/Typedefs/vcl_complex.idx] Error 1</div><div>make[1]: *** [Wrapping/Modules/ITKCommon/CMakeFiles/ITKCommonIdx.dir/all] Error 2</div><div>make: *** [all] Error 2</div><div><br></div><div><br></div>
<div>For cmake I had given</div><div>cmake -DITK_WRAPING=ON -DITK_WRAP_PYTHON=ON -DITK_USE_SYSTEM_SWIG=OFF -DITK_WRAP_SWIGINTERFACE=ON<br></div><div><br></div><div>but ITK_WRAP_ ( GCCXML JAVA, RUBY, TCL ) are also OFF.</div>
<div><br></div><div><br></div><div>I dont need gccxml and it is off in my cmake configuration but I am getting pygccxml error</div><div><br></div><div>Any ideas?</div><div><br></div>-- <br><div><font face="arial, helvetica, sans-serif">Regards,<br>
Rashad</font></div>
</div></div></div></div><div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
_______________________________________________<br>Community mailing list<br><a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br><a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
</div></blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div><font face="arial, helvetica, sans-serif">Regards,<br>
Rashad</font></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font face="arial, helvetica, sans-serif">Regards,<br> Rashad</font></div>
</div>
</blockquote></div><br></body></html>