Opened 14 years ago

Closed 14 years ago

#26554 closed defect (fixed)

vtk5: add cmake, tcl and tk dependencies

Reported by: tonchev1@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: cssdev, dweber@…, raphael-st (Raphael Straub)
Port: vtk5

Description (last modified by ryandesign (Ryan Carsten Schmidt))

vtk5 recipe doesn't build if cmake is not installed. Further, when building the default variant (which has +tcltk), build fails if tcl and tk are not installed.

I guess they should be added to the Portfile depends_build or depends_lib. The following patch fixed the build for me (I'm a MacPorts newbie and I'm not sure it's 100% correct though).

Attachments (1)

vtk5-cmake-tcltk.diff (681 bytes) - added by tonchev1@… 14 years ago.
add missing dependencies (cmake, tcl, tk)

Download all attachments as: .zip

Change History (9)

Changed 14 years ago by tonchev1@…

Attachment: vtk5-cmake-tcltk.diff added

add missing dependencies (cmake, tcl, tk)

comment:1 Changed 14 years ago by tonchev1@…

Added patch as attachment. Apply with:

cd `port dir vtk5`
patch -p2 < vtk5-cmake-tcltk.diff

comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: css@… dweber@… added
Description: modified (diff)
Keywords: vtk vtk5 cmake tcl tk removed
Port: vtk5 added

"port:cmake" would be more appropriate than "bin:cmake:cmake".

Is only vtk5 affected, or are VTK, vtk-devel and vtk44 also affected?

comment:3 Changed 14 years ago by tonchev1@…

I just checked:

  1. vtk-devel looks OK (has port:cmake and port:tcl, port:tk dependencies)
  2. vtk44 has a bin:cmake:cmake dependency (which I copied); doesn't have tcl/tk dependencies, not sure whether it needs them
  3. vtk is like vtk44

Unfortunately I cannot test vtk and vtk44 right now, because I need to get a working py26-mayavi first :)

comment:4 Changed 14 years ago by tonchev1@…

OK, I got py26-mayavi up and running.

I tried building vtk and vtk44.

  1. vtk build fails to build for i386 arch on Mac OS X 10.6 Snow Leopard
  1. vtk44 recipe is incorrect and cannot even fetch the sources: distname, distfiles, checksums mention vtk as lowercase, while it should be uppercase VTK (the tarballs on download sites have uppercase VTK). Probably it is OK to remove this recipe since it provides exactly the same version as the "vtk" one.

I will test vtk building for arch x86_64

comment:5 Changed 14 years ago by tonchev1@…

vtk is also unbuildable on arch x86_64. Build error is not related to tcl/tk, but rather to the freetype library:

:info:build /Users/tonchev1/macports/var/macports/build/_Users_tonchev1_macports_var_macports_sources_svn.macports.org_trunk_dports_dports_graphics_vtk/work/VTK/Utilities/freetype/src/base/ftmac.c: In function 'is_dfont':
:info:build /Users/tonchev1/macports/var/macports/build/_Users_tonchev1_macports_var_macports_sources_svn.macports.org_trunk_dports_dports_graphics_vtk/work/VTK/Utilities/freetype/src/base/ftmac.c:138: error: 'FSSpec' has no member named 'name'
...

It is interesting to note, that on arch i386, vtk build failed because of completely different error (at configure step):

:info:configure CMake Error at CMake/vtkLoadCMakeExtensions.cmake:7 (LOAD_COMMAND):
:info:configure   load_command Attempt to load the library
:info:configure   /Users/tonchev1/macports-32bit/var/macports/build/_Users_tonchev1_macports-32bit_var_macports_sources_svn.macports.org_trunk_dports_graphics_vtk/work/VTK/CMake/libcmVTK_WRAP_TCL2.so
:info:configure   failed.  Additional error info is: 
:info:configure 
:info:configure   
:info:configure   dlopen(/Users/tonchev1/macports-32bit/var/macports/build/_Users_tonchev1_macports-32bit_var_macports_sources_svn.macports.org_trunk_dports_graphics_vtk/work/VTK/CMake/libcmVTK_WRAP_TCL2.so,
:info:configure   1): no suitable image found.  Did find:
:info:configure 
:info:configure   
:info:configure     /Users/tonchev1/macports-32bit/var/macports/build/_Users_tonchev1_macports-32bit_var_macports_sources_svn.macports.org_trunk_dports_graphics_vtk/work/VTK/CMake/libcmVTK_WRAP_TCL2.so:
:info:configure   mach-o, but wrong architecture
...

And indeed, when looking at the referenced library it does have only x86_64 code in it.

Unfortunately, I cannot spend more time debugging/investigating this. (Sorry!)

comment:6 Changed 14 years ago by raphael-st (Raphael Straub)

vtk5 uses the cmake portgroup since r71338. An explicit build dependency on cmake is unnecessary. Did you use the latest portfile?

comment:7 Changed 14 years ago by raphael-st (Raphael Straub)

Cc: raphael@… added

Cc Me!

comment:8 Changed 14 years ago by raphael-st (Raphael Straub)

Resolution: fixed
Status: newclosed

The problem was that it should be depends_build-append port:readline instead of depends_build port:readline. I fixed this and added the dependencies on tcl and tk in r71724.

I'll close this ticket because the original problem has been solved. Please open separate tickets if there are problems with other vtk ports.

Note: See TracTickets for help on using tickets.