[Insight-users] Build problem on Mac OS 10.6?

McCaughey, Michael J michael.j.mccaughey at Vanderbilt.Edu
Tue Feb 16 15:57:22 EST 2010


For the hacked version, I tried activate with the failure indicated in my previous email.  I did have matching variants, and I only have (currently) one variant installed (-py25 +examples).
I've uninstalled and cleaned and started over on the build. Thank you for updating the patch.  I look forward trying it out now that MacPorts is up again.

Mike

________________________________________
From: Darren Weber [darren.weber.lists at gmail.com]
Sent: Tuesday, February 16, 2010 2:29 PM
To: McCaughey, Michael J
Cc: Insight-Users
Subject: Re: [Insight-users] Build problem on Mac OS 10.6?

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).

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.,

$ sudo port install -f -k -o InsightToolkit -py25 +examples

The install should also run the activate.  If not, then try

$ sudo port activate -f -k -o InsightToolkit -py25 +examples

BTW, if you just want to see what you have installed for a port, use the port name, e.g.:

$ port installed InsightToolkit

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.

I hope this helps,
Darren


(I have the same MacPorts server issue today - must be a problem at their end.)



On Tue, Feb 16, 2010 at 9:45 AM, McCaughey, Michael J <michael.j.mccaughey at vanderbilt.edu<mailto:michael.j.mccaughey at vanderbilt.edu>> wrote:
Thank you this is helpful.

Keeping the current build and running up to destroot (sudo port -d destroot -f -k -o -py25 +examples) gives:
{DEBUG dependancy output deleted}
DEBUG: Found Dependency: receipt exists for gawk
DEBUG: Searching for dependency: bison
DEBUG: Found Dependency: receipt exists for bison
DEBUG: Executing org.macports.main (InsightToolkit)
DEBUG: Skipping completed org.macports.fetch (InsightToolkit)
DEBUG: Skipping completed org.macports.checksum (InsightToolkit)
DEBUG: Skipping completed org.macports.extract (InsightToolkit)
DEBUG: Skipping completed org.macports.patch (InsightToolkit)
DEBUG: Skipping completed org.macports.configure (InsightToolkit)
DEBUG: Skipping completed org.macports.build (InsightToolkit)
DEBUG: Skipping completed org.macports.destroot (InsightToolkit)

$ sudo port installed  gives:
{snip}
 groff @1.20.1_1 (active)
 guile @1.8.7_0 (active)
 help2man @1.37.1_1 (active)
 InsightToolkit @3.16.0_1+doc+examples
 libiconv @1.13.1_0 (active)
 {snip}

So it's installed but not active.  Activating fails:
sudo port activate InsightToolkit @3.16.0_1+doc+examples--->  Activating InsightToolkit @3.16.0_1+doc+examples
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.

The macports trac server keeps timing out for me, so I can't see similar errors there.  Suggestions appreciated!

Mike
________________________________________
From: Darren Weber [darren.weber.lists at gmail.com<mailto:darren.weber.lists at gmail.com>]
Sent: Monday, February 15, 2010 4:49 PM
To: McCaughey, Michael J
Cc: Bill Lorensen; Insight-Users
Subject: Re: [Insight-users] Build problem on Mac OS 10.6?

There may be a fix for this MacPorts error.  It works for me on one system that has this problem.

The debug and fix process was a cyclical command sequence like this:

# Edit the Portfile
$ sudo vim `port file InsightToolkit`

# Remove the current destroot (if it exists)
$ sudo rm -rf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_InsightToolkit/work/destroot

# Run the installation up to the destroot phase (keeping the current build)
$ sudo port -d destroot -f -k -o InsightToolkit -doc -py25

(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.)


OK, so the fix that works for me is to change a few things starting at line 131.

   # copy FindITK.cmake to a version specific file, which might persist even
   # when cmake is updated, deactivated, etc.
   set cmakePath [lrange [lsort [glob ${prefix}/share/cmake-*]] end end]
   set findITK [glob ${cmakePath}/Modules/FindITK.cmake]
   set findITKbranch [strsed ${findITK} #FindITK#FindITK-${branch}#]
   xinstall -d -m 0755 ${destroot}${cmakePath}/Modules
   copy ${findITK} ${destroot}${findITKbranch}

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.

I hope this helps.

Best,
Darren















On Mon, Feb 15, 2010 at 10:49 AM, McCaughey, Michael J <michael.j.mccaughey at vanderbilt.edu<mailto:michael.j.mccaughey at vanderbilt.edu><mailto:michael.j.mccaughey at vanderbilt.edu<mailto:michael.j.mccaughey at vanderbilt.edu>>> wrote:
No, the darwinports 3.16 error is this:

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

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.
This has apparently been seen before (http://www.mail-archive.com/macports-users@lists.macosforge.org/msg18052.html) but I haven't found a resolution.  It's no doubt a macports issue, not a problem with ITK.

Mike
________________________________________
From: Bill Lorensen [bill.lorensen at gmail.com<mailto:bill.lorensen at gmail.com><mailto:bill.lorensen at gmail.com<mailto:bill.lorensen at gmail.com>>]
Sent: Monday, February 15, 2010 12:37 PM
To: McCaughey, Michael J
Cc: Insight-Users
Subject: Re: [Insight-users] Build problem on Mac OS 10.6?

You say you see the same error from 3.16?

On Mon, Feb 15, 2010 at 12:25 PM, McCaughey, Michael J
<michael.j.mccaughey at vanderbilt.edu<mailto:michael.j.mccaughey at vanderbilt.edu><mailto:michael.j.mccaughey at vanderbilt.edu<mailto:michael.j.mccaughey at vanderbilt.edu>>> wrote:
> 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).
> I'll have to try this from source.
>
> Thanks,
> Mike
> ________________________________________
> From: Bill Lorensen [bill.lorensen at gmail.com<mailto:bill.lorensen at gmail.com><mailto:bill.lorensen at gmail.com<mailto:bill.lorensen at gmail.com>>]
> Sent: Monday, February 15, 2010 10:32 AM
> To: McCaughey, Michael J
> Cc: insight-users at itk.org<mailto:insight-users at itk.org><mailto:insight-users at itk.org<mailto:insight-users at itk.org>>
> Subject: Re: [Insight-users] Build problem on Mac OS 10.6?
>
> Michael,
>
> itk 2.0 is a few years old. I suspect that we were not supporting gcc
> 4.2 that long ago. Or maybe our Mac support was not that great back
> then.
>
> Do you have to use itk2.0?
>
> Bill
>
> On Mon, Feb 15, 2010 at 10:49 AM, McCaughey, Michael J
> <michael.j.mccaughey at vanderbilt.edu<mailto:michael.j.mccaughey at vanderbilt.edu><mailto:michael.j.mccaughey at vanderbilt.edu<mailto:michael.j.mccaughey at vanderbilt.edu>>> wrote:
>> Hi!
>> 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:
>>
>> [  5%] Building C object Utilities/kwsys/CMakeFiles/itksys.dir/Base64.o
>> [  5%] Building CXX object Utilities/kwsys/CMakeFiles/itksys.dir/Directory.o
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:30: error: ISO C++ forbids declaration of ‘vector’ with no type
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:30: error: invalid use of ‘::’
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:30: error: expected ‘;’ before ‘<’ token
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:33: error: ‘string’ in namespace ‘::’ does not name a type
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx: In member function ‘long unsigned int itksys::Directory::GetNumberOfFiles()’:
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:51: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’
>> Installs/InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx: In member function ‘const char* itksys::Directory::GetFile(long unsigned int)’:
>> Installs/InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:57: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:61: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx: In member function ‘bool itksys::Directory::Load(const char*)’:
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:145: error: ‘class itksys::DirectoryInternals’ has no member named ‘Files’
>> InsightToolkit-2.0.1/Utilities/kwsys/Directory.cxx:147: error: ‘class itksys::DirectoryInternals’ has no member named ‘Path’
>> make[2]: *** [Utilities/kwsys/CMakeFiles/itksys.dir/Directory.o] Error 1
>> make[1]: *** [Utilities/kwsys/CMakeFiles/itksys.dir/all] Error 2
>> make: *** [all] Error 2
>>
>> Google has not been my friend so far, has anyone seen this error?  Is it gcc's problem?
>>
>> Thanks for suggestions.
>>
>> Mike
>> _____________________________________
>> Powered by www.kitware.com<http://www.kitware.com><http://www.kitware.com>
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
_____________________________________
Powered by www.kitware.com<http://www.kitware.com><http://www.kitware.com>

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list