<div>The patch recommended in the prior email is now in the MacPorts svn as revision 2.  When the MacPorts servers are up again, you might find that an indicator for an upgrade to InsightToolkit.  So, if you run an upgrade over the weekend, it should be successful (fingers crossed).  If you hacked the Portfile as suggested previously, you might want to do a full uninstall and clean before running a new install (all of that is only to tidy up things on the macports side, the actual ITK install should not change at all).</div>
<div><br></div><div>Anyhow, if you continue on with the hacked version for the install, try to keep the command the same as the destroot phase during the install, e.g.,</div><div><br></div><div>$ sudo port install -f -k -o InsightToolkit -py25 +examples</div>
<div><br></div><div>The install should also run the activate.  If not, then try</div><div><br></div><div><div>$ sudo port activate -f -k -o InsightToolkit -py25 +examples</div><div><br></div></div><div>BTW, if you just want to see what you have installed for a port, use the port name, e.g.:</div>
<div><br></div><div>$ port installed InsightToolkit</div><div><br></div><div>This will tell you how many versions or variants of the port are installed.  The installation is &#39;staged&#39; into a software repository within the path at /opt/local/var/macports/software/.  So an installation is not &#39;activated&#39; until it is linked (hard linked) into the main prefix path (/opt/local/....).  When a port is &#39;deactivated&#39; the hard links are removed, but the files remain in the software repository (they can be &#39;activated&#39; again).  When doing an &#39;uninstall&#39;, the files are both unlinked (deactivated) and removed from the software repository.</div>
<div><br></div><div>I hope this helps,</div><div>Darren</div><div><br></div><div><br></div><div>(I have the same MacPorts server issue today - must be a problem at their end.)</div><div><br></div><div><br></div><br><div class="gmail_quote">
On Tue, Feb 16, 2010 at 9:45 AM, McCaughey, Michael J <span dir="ltr">&lt;<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thank you this is helpful.<br>
<br>
Keeping the current build and running up to destroot (sudo port -d destroot -f -k -o -py25 +examples) gives:<br>
{DEBUG dependancy output deleted}<br>
DEBUG: Found Dependency: receipt exists for gawk<br>
DEBUG: Searching for dependency: bison<br>
DEBUG: Found Dependency: receipt exists for bison<br>
DEBUG: Executing org.macports.main (InsightToolkit)<br>
DEBUG: Skipping completed org.macports.fetch (InsightToolkit)<br>
DEBUG: Skipping completed org.macports.checksum (InsightToolkit)<br>
DEBUG: Skipping completed org.macports.extract (InsightToolkit)<br>
DEBUG: Skipping completed org.macports.patch (InsightToolkit)<br>
DEBUG: Skipping completed org.macports.configure (InsightToolkit)<br>
DEBUG: Skipping completed org.macports.build (InsightToolkit)<br>
DEBUG: Skipping completed org.macports.destroot (InsightToolkit)<br>
<br>
$ sudo port installed  gives:<br>
{snip}<br>
  groff @1.20.1_1 (active)<br>
  guile @1.8.7_0 (active)<br>
  help2man @1.37.1_1 (active)<br>
  InsightToolkit @3.16.0_1+doc+examples<br>
  libiconv @1.13.1_0 (active)<br>
 {snip}<br>
<br>
So it&#39;s installed but not active.  Activating fails:<br>
sudo port activate InsightToolkit @3.16.0_1+doc+examples---&gt;  Activating InsightToolkit @3.16.0_1+doc+examples<br>
Error: port activate failed: Image error: Source file /opt/local/var/macports/software/InsightToolkit/3.16.0_1+doc+examples does not appear to exist (cannot lstat it).  Unable to activate port InsightToolkit.<br>
<br>
The macports trac server keeps timing out for me, so I can&#39;t see similar errors there.  Suggestions appreciated!<br>
<br>
Mike<br>
________________________________________<br>
From: Darren Weber [<a href="mailto:darren.weber.lists@gmail.com">darren.weber.lists@gmail.com</a>]<br>
Sent: Monday, February 15, 2010 4:49 PM<br>
To: McCaughey, Michael J<br>
Cc: Bill Lorensen; Insight-Users<br>
<div class="im">Subject: Re: [Insight-users] Build problem on Mac OS 10.6?<br>
<br>
</div><div class="im">There may be a fix for this MacPorts error.  It works for me on one system that has this problem.<br>
<br>
The debug and fix process was a cyclical command sequence like this:<br>
<br>
# Edit the Portfile<br>
$ sudo vim `port file InsightToolkit`<br>
<br>
# Remove the current destroot (if it exists)<br>
$ sudo rm -rf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_InsightToolkit/work/destroot<br>
<br>
# Run the installation up to the destroot phase (keeping the current build)<br>
$ sudo port -d destroot -f -k -o InsightToolkit -doc -py25<br>
<br>
(On the test system, the -doc -py25 variants are used to build and install only the cxx code base.  All the other options are described in `man port`; the -d is verbose info, the -f is to force it, the -k and -o are to keep the build even after changing the Portfile.)<br>

<br>
<br>
OK, so the fix that works for me is to change a few things starting at line 131.<br>
<br>
    # copy FindITK.cmake to a version specific file, which might persist even<br>
    # when cmake is updated, deactivated, etc.<br>
    set cmakePath [lrange [lsort [glob ${prefix}/share/cmake-*]] end end]<br>
    set findITK [glob ${cmakePath}/Modules/FindITK.cmake]<br>
    set findITKbranch [strsed ${findITK} #FindITK#FindITK-${branch}#]<br>
    xinstall -d -m 0755 ${destroot}${cmakePath}/Modules<br>
    copy ${findITK} ${destroot}${findITKbranch}<br>
<br>
The changes are to (a) get the latest cmake path, (b) use that path to glob for the FindITK.cmake file, and (c) explicitly create the destroot path for cmake Modules.<br>
<br>
I hope this helps.<br>
<br>
Best,<br>
Darren<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div><div class="im">On Mon, Feb 15, 2010 at 10:49 AM, McCaughey, Michael J &lt;<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>&lt;mailto:<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>&gt;&gt; wrote:<br>

No, the darwinports 3.16 error is this:<br>
<br>
Error: Target org.macports.destroot returned: error copying &quot;/opt/local/share/cmake-2.8/Modules/FindITK.cmake&quot; to &quot;/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_InsightToolkit/work/destroot/opt/local/share/cmake-2.8/Modules/FindITK-3.16.cmake&quot;: no such file or directory<br>

<br>
There&#39;s no cmake-2.8 directory under /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_InsightToolkit/work/destroot/opt/local/share.<br>
This has apparently been seen before (<a href="http://www.mail-archive.com/macports-users@lists.macosforge.org/msg18052.html" target="_blank">http://www.mail-archive.com/macports-users@lists.macosforge.org/msg18052.html</a>) but I haven&#39;t found a resolution.  It&#39;s no doubt a macports issue, not a problem with ITK.<br>

<br>
Mike<br>
________________________________________<br>
</div>From: Bill Lorensen [<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&lt;mailto:<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;]<br>
<div class="im">Sent: Monday, February 15, 2010 12:37 PM<br>
To: McCaughey, Michael J<br>
Cc: Insight-Users<br>
Subject: Re: [Insight-users] Build problem on Mac OS 10.6?<br>
<br>
You say you see the same error from 3.16?<br>
<br>
On Mon, Feb 15, 2010 at 12:25 PM, McCaughey, Michael J<br>
</div><div class="im">&lt;<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>&lt;mailto:<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>&gt;&gt; wrote:<br>

&gt; No, no attachment to 2.0, it&#39;s just what was in fink.  I tried it when I had trouble with a 3.16 build (the darwinports 3.16 build has an error too).<br>
&gt; I&#39;ll have to try this from source.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Mike<br>
&gt; ________________________________________<br>
</div>&gt; From: Bill Lorensen [<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&lt;mailto:<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;]<br>
<div class="im">&gt; Sent: Monday, February 15, 2010 10:32 AM<br>
&gt; To: McCaughey, Michael J<br>
</div>&gt; Cc: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a>&lt;mailto:<a href="mailto:insight-users@itk.org">insight-users@itk.org</a>&gt;<br>
<div class="im">&gt; Subject: Re: [Insight-users] Build problem on Mac OS 10.6?<br>
&gt;<br>
&gt; Michael,<br>
&gt;<br>
&gt; itk 2.0 is a few years old. I suspect that we were not supporting gcc<br>
&gt; 4.2 that long ago. Or maybe our Mac support was not that great back<br>
&gt; then.<br>
&gt;<br>
&gt; Do you have to use itk2.0?<br>
&gt;<br>
&gt; Bill<br>
&gt;<br>
&gt; On Mon, Feb 15, 2010 at 10:49 AM, McCaughey, Michael J<br>
</div><div class="im">&gt; &lt;<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>&lt;mailto:<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>&gt;&gt; wrote:<br>

&gt;&gt; Hi!<br>
&gt;&gt; I&#39;m trying to build version 2.0.1 on a Mac (OS/X 10.6.2/dual Quad-Core Xeon/16GB/gcc 4.2.1/cmake 2.6-2) and I&#39;m getting the following error compiling Directory.cxx:<br>
&gt;&gt;<br>
&gt;&gt; [  5%] Building C object Utilities/kwsys/CMakeFiles/itksys.dir/Base64.o<br>
&gt;&gt; [  5%] Building CXX object Utilities/kwsys/CMakeFiles/itksys.dir/Directory.o<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:30: error: ISO C++ forbids declaration of ‘vector’ with no type<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:30: error: invalid use of ‘::’<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:30: error: expected ‘;’ before ‘&lt;’ token<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:33: error: ‘string’ in namespace ‘::’ does not name a type<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx: In member function ‘long unsigned int itksys::Directory::GetNumberOfFiles()’:<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:51: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’<br>
&gt;&gt; Installs/InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx: In member function ‘const char* itksys::Directory::GetFile(long unsigned int)’:<br>
&gt;&gt; Installs/InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:57: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:61: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx: In member function ‘bool itksys::Directory::Load(const char*)’:<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:145: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’<br>
&gt;&gt; InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:147: error: ‘class itksys::DirectoryInternals’ has no member named ‘Path’<br>
&gt;&gt; make[2]: *** [Utilities/kwsys/CMakeFiles/itksys.dir/Directory.o] Error 1<br>
&gt;&gt; make[1]: *** [Utilities/kwsys/CMakeFiles/itksys.dir/all] Error 2<br>
&gt;&gt; make: *** [all] Error 2<br>
&gt;&gt;<br>
&gt;&gt; Google has not been my friend so far, has anyone seen this error?  Is it gcc&#39;s problem?<br>
&gt;&gt;<br>
&gt;&gt; Thanks for suggestions.<br>
&gt;&gt;<br>
&gt;&gt; Mike<br>
&gt;&gt; _____________________________________<br>
</div>&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>&lt;<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>&gt;<br>
<div class="im">&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt;&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;&gt;<br>
&gt;<br>
_____________________________________<br>
</div>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a>&lt;<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>&gt;<br>
<div><div></div><div class="h5"><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.html" target="_blank">http://www.kitware.com/products/protraining.html</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>
<br>
</div></div></blockquote></div><br>