<div>On Mon, Nov 12, 2012 at 7:53 PM, Ahmed Halaweish, Ph.D.<br>&lt;<a href="mailto:ahmed.halaweish@duke.edu">ahmed.halaweish@duke.edu</a>&gt; wrote:<br>&gt;    I&#39;m trying to get ITK 4.1 and ITK 4.2 + Python wrapping to work on my<br>
&gt; macbook and mac pro desktop (both running 10.7) without any luck.<br><br>On Fri, Nov 16, 2012 at 9:42 AM, Ahmed Halaweish, Ph.D. &lt;<a href="mailto:ahmed.halaweish@duke.edu">ahmed.halaweish@duke.edu</a>&gt; wrote:<br>
&gt;<br>&gt; Here are the errors I have been getting ...<br>&gt;<br>&gt; /bin/sh: /Users/Documents/DIAL-Code/gccxml-BUILD: is a directory<br>&gt;<br>&gt; make[2]: *** [Wrapping/Modules/ITKCommon/vcl_complex.xml] Error 126<br>
&gt;<br>&gt; make[1]: *** [Wrapping/Modules/ITKCommon/CMakeFiles/ITKCommonGccXML.dir/all] Error 2<br><br><br>You might try running</div><div><br></div><div>make VERBOSE=1</div><div><br></div><div>(preferably without any -j flag) to see what command is failing.</div>
<div><br></div><div>Mark</div><div><br><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 16, 2012 at 9:42 AM, Ahmed Halaweish, Ph.D. <span dir="ltr">&lt;<a href="mailto:ahmed.halaweish@duke.edu" target="_blank">ahmed.halaweish@duke.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Here are the errors I have been getting ...
<div><br>
</div>
<div>
<p>/bin/sh: /Users/Documents/DIAL-Code/gccxml-BUILD: is a directory</p>
<p>make[2]: *** [Wrapping/Modules/ITKCommon/vcl_complex.xml] Error 126</p>
<p>make[1]: *** [Wrapping/Modules/ITKCommon/CMakeFiles/ITKCommonGccXML.dir/all] Error 2</p>
<p><br>
</p>
<p>I have implemented the comments from Mark into the build/compile process and still get the same results.</p>
<p><br>
</p>
<p>Thanks in advance for any tips and suggestions ... Cheers.</p>
<div>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-size:13px">
<div style="font-size:13px">
<div><font face="Arial"><br>
</font></div>
<div><font color="#000080" face="Arial"><a href="mailto:ahmed.halaweish@duke.edu" target="_blank">ahmed.halaweish@duke.edu</a></font></div>
<div><font face="Arial">telephone:       <a href="tel:919-684-7927" value="+19196847927" target="_blank">919-684-7927</a></font></div>
</div>
</div>
</div>
</div>
<div style="font-size:16px;font-family:&#39;Times New Roman&#39;">
<hr>
<div style="direction:ltr"><font face="Tahoma" color="#000000"><b>From:</b> Mark Tsuchida [<a href="mailto:marktsuchida@gmail.com" target="_blank">marktsuchida@gmail.com</a>]<br>
<b>Sent:</b> Monday, November 12, 2012 8:28 PM<br>
<b>To:</b> Matt McCormick<br>
<b>Cc:</b> Ahmed Halaweish, Ph.D.; <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
<b>Subject:</b> Re: [Insight-users] How to get ITK4+ and Python wrapping to work on Mac OSX (10.7)?<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div>
<div><span style="color:rgb(80,0,80)">On Mon, Nov 12, 2012 at 7:53 PM, Ahmed Halaweish, Ph.D.</span><br style="color:rgb(80,0,80)">
<span style="color:rgb(80,0,80)">&lt;</span><a href="mailto:ahmed.halaweish@duke.edu" target="_blank">ahmed.halaweish@duke.edu</a><span style="color:rgb(80,0,80)">&gt; wrote:</span><br style="color:rgb(80,0,80)">
<span style="color:rgb(80,0,80)">&gt;    I&#39;m trying to get ITK 4.1 and ITK 4.2 + Python wrapping to work on my</span><br style="color:rgb(80,0,80)">
<span style="color:rgb(80,0,80)">&gt; macbook and mac pro desktop (both running 10.7) without any luck. I always</span><br style="color:rgb(80,0,80)">
<span style="color:rgb(80,0,80)">&gt; seem to get a make: error 2 in the Wrapping/Modules section of the</span><br style="color:rgb(80,0,80)">
<span style="color:rgb(80,0,80)">&gt; compilation process.</span><br style="color:rgb(80,0,80)">
</div>
<div><span style="color:rgb(80,0,80)"><br>
</span></div>
<div>I don&#39;t know if the following applies to your case (would need to see the error messages you got), but here is what I have found necessary trying to compile WrapITK for Python on Lion.</div>
<div><br>
</div>
<div>Xcode comes with two sets of compilers (clan/clang++ and llvm-gcc/llvm-g++).</div>
<div>While either appears to work for compiling ITK itself, I have only been able to get llvm-gcc to work for WrapITK.</div>
<div><br>
</div>
<div>By default, cmake chooses /usr/bin/gcc (a symlink to llvm-gcc) and /usr/bin/c++ (a symlink to clang++), which is not just inconsistent but causes some weird problems with GCC_XML, a program required for generating the wrappers.</div>

<div><br>
</div>
<div><br>
</div>
<div>I have been able to get WrapITK to compile by following these steps (Lion, Xcode 4.5, cmake 2.8.8):</div>
<div><br>
</div>
<div>1. Download GCC_XML from <a href="http://itk.org/files/gccxml/gccxml-2012-08-08.tar.bz2" target="_blank">http://itk.org/files/gccxml/gccxml-2012-08-08.tar.bz2</a> (see the thread in this list today titled &quot;build fails to download gccxml (4.2.1)&quot;).</div>

<div><br>
</div>
<div>2. Configure GCC_XML with the following, build, and install (to /usr/local).</div>
<div><br>
</div>
<div>
<div>CMAKE_BUILD_TYPE=Release</div>
<div>CMAKE_C_COMPILER=/usr/bin/llvm-gcc</div>
<div>CMAKE_CXX_COMPILER=/usr/bin/llvm-g++</div>
</div>
<div><br>
</div>
<div>[If the compilers are not explicitly set here, building WrapITK will fail. If they are set to clang/clang++, configuration of GCC_XML will fail.]<br>
</div>
<div><br>
</div>
<div>3. Configure ITK 4.2.1. First set the compilers:</div>
<div><br>
</div>
<div>
<div>
<div>CMAKE_C_COMPILER=/usr/bin/llvm-gcc</div>
<div>CMAKE_CXX_COMPILER=/usr/bin/llvm-g++</div>
</div>
</div>
<div><br>
</div>
<div>[If you are using ccmake, all other settings will be reset after changing the compiler.]</div>
<div><br>
</div>
<div>Then,</div>
<div>
<div>BUILD_SHARED_LIBS=ON</div>
<div>BUILD_EXAMPLES=OFF   # Not the point here, but this is what I did</div>
<div>BUILD_TESTING=OFF    # Ditto.</div>
</div>
<div><br>
</div>
<div>Add</div>
<div>ITK_WRAP_PYTHON=ON<br>
</div>
<div><br>
</div>
<div>This (if using ccmake) will disclose additional options.</div>
<div>We need to set</div>
<div><br>
</div>
<div>ITK_USE_SYSTEM_GCCXML=ON<br>
</div>
<div><br>
</div>
<div>to use the GCC_XML installed above in 2.</div>
<div><br>
</div>
<div>Also, they Python paths are usually detected incorrectly (the paths may exist but may be wrong or belong to a different installation of Python). In my case, I am using Python 2.7 compiled from the source, which is installed under /Library (as is Python
 2.7 from the <a href="http://python.org" target="_blank">python.org</a> installer package). It is best to set all of the following explicitly, or at least check that they are correct:</div>
<div><br>
</div>
<div>
<div>PYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7</div>
<div>PYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib</div>
<div>PY_SITE_PACKAGES_PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages</div>
</div>
<div>
<div>PYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7</div>
</div>
<div><br>
</div>
<div>(end of steps)</div>
<div><br>
</div>
<div>I have not tried building ITK from the git head. It is probably sufficient to just set the compilers in ITK&#39;s config and let those propagate to GCC_XML&#39;s, rather than doing a separate build and installation of GCC_XML. At least, that used to work with
 ITK 4.2.1 before the GCC_XML repository got moved.</div>
<div><br>
</div>
<div>Hope this helps,</div>
<div><br>
</div>
<div>Mark</div>
<div><br>
</div>
<div><br>
</div>
<div><span style="color:rgb(80,0,80)"><br>
</span></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Nov 12, 2012 at 1:25 PM, Matt McCormick <span dir="ltr">
&lt;<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi AFH,<br>
<br>
Could you please reply with the error message that you get.<br>
<br>
Thanks,<br>
Matt<br>
<div>
<div><br>
On Mon, Nov 12, 2012 at 7:53 PM, Ahmed Halaweish, Ph.D.<br>
&lt;<a href="mailto:ahmed.halaweish@duke.edu" target="_blank">ahmed.halaweish@duke.edu</a>&gt; wrote:<br>
&gt; All,<br>
&gt;    I&#39;m trying to get ITK 4.1 and ITK 4.2 + Python wrapping to work on my<br>
&gt; macbook and mac pro desktop (both running 10.7) without any luck. I always<br>
&gt; seem to get a make: error 2 in the Wrapping/Modules section of the<br>
&gt; compilation process.<br>
&gt;<br>
&gt; Here are the variables I set in cmake:<br>
&gt; BUILD_SHARED_LIBS = ON<br>
&gt; CMAKE_BUILD_TYPE = Release<br>
&gt; ITK_USE_REVIEW = ON<br>
&gt; ITK_WRAPPING = ON<br>
&gt; ITK_WRAP_PYTHON = ON<br>
&gt;<br>
&gt; If anyone has had any luck with this, please do share any tips or pointers.<br>
&gt;<br>
&gt; Cheers<br>
&gt; AFH<br>
&gt;<br>
</div>
</div>
&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
_____________________________________<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://www.kitware.com/products/protraining.php" target="_blank">http://www.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-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div></div></div>
</div>
</div>
</div>

</blockquote></div><br></div></div>