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

Darren Weber darren.weber.lists at gmail.com
Mon Feb 15 17:04:45 EST 2010


Yes, this is a MacPorts problem that I'm aware of, just haven't had time to
fix it yet.  Also, if it gets fixed in a revision of the Port, then all the
ports currently installed will get an option to upgrade.  It's not really an
upgrade, just a minor bug fix and it only seems to apply to some systems,
most systems (10.5, 10.6) will build/destroot/install OK.

For more about the MacPorts port for ITK, see
http://www.cmake.org/Wiki/ITK_MacPorts_Package_Maintainers

When the current MacPort file was developed, it was based on cmake-2.6.
 Although an effort was made to create the port in a way that is a little
independent of the cmake version, it seems to be failing on some systems.
 There is an assumption that cmake has been installed using MacPorts.

As a quick fix, try to first locate the Portfile, using

$ port file InsightToolkit

Then edit that file (may need sudo access)

$ sudo vim `port file InsightToolkit`

At line 135 we have:
copy ${findITK} ${destroot}${findITKbranch}

I believe this is a piece of tcl code to do a file copy.  The destroot phase
may be crashing because the command is not creating a new file
in ${destroot}${findITKbranch}.  It may be possible to force this with a -f
option to the copy, like:

copy -force ${findITK} ${destroot}${findITKbranch}

See this tcl help page for details:
http://www.tcl.tk/man/tcl8.0/TclCmd/file.htm

If that doesn't solve the destroot problem, we can also try to first create
the directory using xinstall (lines 176-177 have examples of this).
 However, this first requires a bit of code to extract the right cmake
directory path.

When testing changes to the Portfile, it is VERY USEFUL to use port options
that will not discard the previous build state, like -k and -o (the latter
is most important).

I hope this helps, a little.

Take care,
Darren















On Mon, Feb 15, 2010 at 10:49 AM, McCaughey, Michael J <
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]
> 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> 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]
> > Sent: Monday, February 15, 2010 10:32 AM
> > To: McCaughey, Michael J
> > Cc: 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> 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
> >>
> >> 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
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100215/23d1abae/attachment-0001.htm>


More information about the Insight-users mailing list