Building VTK on Mac OS X without using framework

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Building VTK on Mac OS X without using framework

Theodore Sternberg
I'd like to build VTK without using superuser privileges.  That is, I'd
like to build VTK against Tcl, Tk and Python that I've built and installed
as an ordinary user -- no "configure -framework" and "make
frameworkinstall".

Has anyone ever done such an installation, successfully?  I'm having a lot
of trouble.  For starters, ccmake generates a CMakeCache.txt that has some
of the Tcl-related paths going to the Tcl I've built and others going to
the system's Tcl down in /usr.  Ditto for Python.

Compilation proceeds normally in the various VTK directories (Common,
Graphics, Rendering...) but then fails at the link stage, unless I
manually put "-ltcl -ltk -lX11" on the link line.

The showstopper comes a while later, when building the vtkTkRenderWidget,
with a conflict between how X.h and Quickdraw.h define "Cursor".

I've built VTK before, and successfully, against Tcl, Tk and Python
installed under "framework".  The goal now is to build VTK without
recourse to superuser privileges.

Ted Sternberg
Lawrence Berkeley Lab


_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Building VTK on Mac OS X without using framework

Brad King
Theodore Sternberg wrote:
> I'd like to build VTK without using superuser privileges.  That is, I'd
> like to build VTK against Tcl, Tk and Python that I've built and installed
> as an ordinary user -- no "configure -framework" and "make
> frameworkinstall".
>
> Has anyone ever done such an installation, successfully?  I'm having a lot
> of trouble.  For starters, ccmake generates a CMakeCache.txt that has some
> of the Tcl-related paths going to the Tcl I've built and others going to
> the system's Tcl down in /usr.  Ditto for Python.

You can use the ccmake dialog to edit these paths and correct them.  One
of the things on our todo list for CMake is to improve the find support
for Tcl and Python to help avoid finding pieces from different
installations.

> Compilation proceeds normally in the various VTK directories (Common,
> Graphics, Rendering...) but then fails at the link stage, unless I
> manually put "-ltcl -ltk -lX11" on the link line.

Make sure TCL_LIBRARY and the like are set to your libraries and not the
frameworks.

> The showstopper comes a while later, when building the vtkTkRenderWidget,
> with a conflict between how X.h and Quickdraw.h define "Cursor".

I think your Tk installation must be installed in some special way to
support X-windows on the Mac.  I'm not sure what this means, though.
Hopefully someone else can answer this.

-Brad

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Building VTK on Mac OS X without using framework

Theodore Sternberg
> > The showstopper comes a while later, when building the vtkTkRenderWidget,
> > with a conflict between how X.h and Quickdraw.h define "Cursor".

> I think your Tk installation must be installed in some special way to
> support X-windows on the Mac.  I'm not sure what this means, though.
> Hopefully someone else can answer this.

That may well be.  It's worth noting, however, that on top of this
possibly misconfigured Tk I'm able to build Python with Tkinter and they
work fine.  I don't see why VTK needs to be pickier than Python, about my
Tk.
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Building VTK on Mac OS X without using framework

Brad King
Theodore Sternberg wrote:

>>>The showstopper comes a while later, when building the vtkTkRenderWidget,
>>>with a conflict between how X.h and Quickdraw.h define "Cursor".
>
>>I think your Tk installation must be installed in some special way to
>>support X-windows on the Mac.  I'm not sure what this means, though.
>>Hopefully someone else can answer this.
>
> That may well be.  It's worth noting, however, that on top of this
> possibly misconfigured Tk I'm able to build Python with Tkinter and they
> work fine.  I don't see why VTK needs to be pickier than Python, about my
> Tk.

In that case please submit a bug report here:

http://www.vtk.org/Bug

and include a more detailed log of the error message you receive.  Also
please include details on how you built Tcl/Tk.

Thanks,
-Brad
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Building VTK on Mac OS X without using framework

Martin Costabel
In reply to this post by Theodore Sternberg
Theodore Sternberg wrote:
> I'd like to build VTK without using superuser privileges.  That is, I'd
> like to build VTK against Tcl, Tk and Python that I've built and installed
> as an ordinary user -- no "configure -framework" and "make
> frameworkinstall".
>
> Has anyone ever done such an installation, successfully?  I'm having a lot
> of trouble.  For starters, ccmake generates a CMakeCache.txt that has some
> of the Tcl-related paths going to the Tcl I've built and others going to
> the system's Tcl down in /usr.  Ditto for Python.

The Fink package for vtk uses Fink's own tcltk and python packages, so
this can be done. This uses cmake-2.0.5, however. With more recent
versions of cmake I have had problems, too, because it knows too much
about Mac OSX for its own good. I was not immediately able to tame it to
my liking, so I stayed with the older version.

The tcltk related parts of the cmake command line in the Fink package are

   -DCMAKE_X_LIBS:STRING="-lSM;-lICE;-lX11;-lXext" \
   -DVTK_WRAP_TCL:BOOL=ON \
   -DTCL_INCLUDE_PATH:PATH=%p/include \
   -DTCL_LIBRARY:FILEPATH=%p/lib/libtcl.dylib \
   -DTK_INCLUDE_PATH:PATH=%p/include \
   -DTK_INTERNAL_PATH:PATH=%p/include/vtk/tkInternals/tk84OSX \

Here "%p" is the base directory of the Fink installation.

--
Martin

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Building VTK on Mac OS X without using framework

Theodore Sternberg
I just checked Fink and I see that it will install vtk5.0.  Is there a
vtk4.4 there somewhere?  That's the API I've written my application code
to.

On Thu, 2 Feb 2006, Martin Costabel wrote:
> The Fink package for vtk uses Fink's own tcltk and python packages, so this
> can be done. This uses cmake-2.0.5, however. With more recent versions of
> cmake I have had problems, too, because it knows too much about Mac OSX for
> its own good. I was not immediately able to tame it to my liking, so I stayed
> with the older version.
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Building VTK on Mac OS X without using framework

Martin Costabel
Theodore Sternberg wrote:
> I just checked Fink and I see that it will install vtk5.0.  Is there a
> vtk4.4 there somewhere?  That's the API I've written my application code
> to.

Vtk-4.4 is still around, if perhaps somewhat hidden, because fink always
installs the highest avilable version-revision by default if the package
name is the same. Also the package database will only show the highest
available version. In the stable trees, vtk-py23 is still at version
4.4., in the unstable trees, vtk-4.4 is there, but masked by vtk-5.0.

The package description is in a file named vtk-py23.info (as opposed to
vtk-py.info for the newer version, which translates into vtk-py23 and
vtk-py24 variants). If you want to build it, you have to specify its
version:

   fink install vtk-py23-4.4.0-6

for example. Or use the stable tree or the binary distribution. They are
still at 4.4.

OTOH, there are quite a few things that don't work correctly with 4.4
and have been fixed in 5.0.

--
Martin


_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers