<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 'staged' into a software repository within the path at /opt/local/var/macports/software/. So an installation is not 'activated' until it is linked (hard linked) into the main prefix path (/opt/local/....). When a port is 'deactivated' the hard links are removed, but the files remain in the software repository (they can be 'activated' again). When doing an 'uninstall', 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"><<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>></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's installed but not active. Activating fails:<br>
sudo port activate InsightToolkit @3.16.0_1+doc+examples---> 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'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 <<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a><mailto:<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>>> wrote:<br>
No, the darwinports 3.16 error is this:<br>
<br>
Error: Target org.macports.destroot returned: error copying "/opt/local/share/cmake-2.8/Modules/FindITK.cmake" to "/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": no such file or directory<br>
<br>
There'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't found a resolution. It'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><mailto:<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>>]<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"><<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a><mailto:<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>>> wrote:<br>
> No, no attachment to 2.0, it'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>
> I'll have to try this from source.<br>
><br>
> Thanks,<br>
> Mike<br>
> ________________________________________<br>
</div>> From: Bill Lorensen [<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a><mailto:<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>>]<br>
<div class="im">> Sent: Monday, February 15, 2010 10:32 AM<br>
> To: McCaughey, Michael J<br>
</div>> Cc: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><mailto:<a href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br>
<div class="im">> Subject: Re: [Insight-users] Build problem on Mac OS 10.6?<br>
><br>
> Michael,<br>
><br>
> itk 2.0 is a few years old. I suspect that we were not supporting gcc<br>
> 4.2 that long ago. Or maybe our Mac support was not that great back<br>
> then.<br>
><br>
> Do you have to use itk2.0?<br>
><br>
> Bill<br>
><br>
> On Mon, Feb 15, 2010 at 10:49 AM, McCaughey, Michael J<br>
</div><div class="im">> <<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a><mailto:<a href="mailto:michael.j.mccaughey@vanderbilt.edu">michael.j.mccaughey@vanderbilt.edu</a>>> wrote:<br>
>> Hi!<br>
>> I'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'm getting the following error compiling Directory.cxx:<br>
>><br>
>> [ 5%] Building C object Utilities/kwsys/CMakeFiles/itksys.dir/Base64.o<br>
>> [ 5%] Building CXX object Utilities/kwsys/CMakeFiles/itksys.dir/Directory.o<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:30: error: ISO C++ forbids declaration of ‘vector’ with no type<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:30: error: invalid use of ‘::’<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:30: error: expected ‘;’ before ‘<’ token<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:33: error: ‘string’ in namespace ‘::’ does not name a type<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx: In member function ‘long unsigned int itksys::Directory::GetNumberOfFiles()’:<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:51: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’<br>
>> Installs/InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx: In member function ‘const char* itksys::Directory::GetFile(long unsigned int)’:<br>
>> Installs/InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:57: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:61: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx: In member function ‘bool itksys::Directory::Load(const char*)’:<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:145: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’<br>
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:147: error: ‘class itksys::DirectoryInternals’ has no member named ‘Path’<br>
>> make[2]: *** [Utilities/kwsys/CMakeFiles/itksys.dir/Directory.o] Error 1<br>
>> make[1]: *** [Utilities/kwsys/CMakeFiles/itksys.dir/all] Error 2<br>
>> make: *** [all] Error 2<br>
>><br>
>> Google has not been my friend so far, has anyone seen this error? Is it gcc's problem?<br>
>><br>
>> Thanks for suggestions.<br>
>><br>
>> Mike<br>
>> _____________________________________<br>
</div>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><br>
<div class="im">>><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>
><br>
_____________________________________<br>
</div>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><<a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a>><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>