[MacPorts] #20002: bugs in vtk-devel Portfile on Tiger
MacPorts
noreply at macports.org
Wed Jul 1 11:16:26 PDT 2009
#20002: bugs in vtk-devel Portfile on Tiger
-------------------------------+--------------------------------------------
Reporter: jjstickel@… | Owner: dweber@…
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 1.7.1
Keywords: Tiger darwin_8 | Port: vtk-devel
-------------------------------+--------------------------------------------
Comment(by dweber@…):
Replying to [comment:10 jjstickel@…]:
> I'm sorry, but I can't do any more testing right now. I have no reason
to use vtk-devel (vtk-5.4) over vtk5 (vtk-5.2).
>
OK, thanks for the feedback so far. It has taken me many days to develop
vtk-devel, too many days to learn both MacPorts, cmake, and vtk quirks,
but there it is. In case you find a minute to run it overnight on Tiger,
just run the `port destroot vtk-devel` so it will not try to install. It
would be great if there were no conflicts in the installation between vtk5
and vtk-devel, but there might be some binaries or symlinks that conflict.
> To be honest, I don't understand why so much complexity is needed in the
vtk-devel Portfile. The vtk-devel Portfile is 27 kb whereas the vtk5
Portfile is only 6 kb. Another thing I just noticed is that the installed
libraries with vtk-devel are an order of magnitude larger in size compared
to vtk5. For example, libvtkCommon.5.4.dylib is 27.1 MB compared to just
3.8 MB for libvtkCommon.5.2.1.dylib. Must be related to the compile
options. Are debug symbols being included? Is this intentional?
a) There are more comments in vtk-devel (to explain my understanding of
how things work; it's not gospel, so my understanding may change and hence
vtk-devel may change, but it's in there for any 'openmaintainer' to read
in my absence).
b) There are more variants in vtk-devel (wrappers, database, mpi, boost).
c) vtk5 handles the RPATH settings differently to vtk-devel. The vtk5
port uses `-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON` and it has to set
`build.env-append DYLD_LIBRARY_PATH=${worksrcpath}/bin`. I've seen a post
from the fink package maintainer that he does likewise. Perhaps that is
the way to go, but after careful study of cmake settings and how they
should work, I opted not to use any DYLD_LIBRARY_PATH or similar settings
in vtk-devel. The point is that cmake is supposed to reset all the rpath
strings during the installation (destroot), which it does for the majority
of the build, but it fails to do so for the examples, testing, and
wrapping. This is a bug that should be fixed up-stream in cmake or vtk.
So, for now, there are a lot of extra bits in vtk-devel to call
`install_name_tool` to change the rpath settings on various things
(especially the examples and testing variants). I was able to abstract
and consolidate a lot of that work for the InsightToolkit port into a tcl
proc. Perhaps vtk5 handles this in a more elegant way in the post-
configure phase of the port (I should look into how that works).
d) vtk-devel has an explicit cmake build type setting, RelWithDebInfo, so
I hope there are debug symbols in there. I've adopted the general GNU
convention for releases that contain debug symbols for libraries (gcc/g++
options -g and -O2 are provided by cmake RelWithDebInfo). Is that is a
problem for a system with limited disk space, the Portfile setting to
change is `-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo` to
`-DCMAKE_BUILD_TYPE:STRING=Release`. I'm adding to vtk-devel a couple of
variants for the build type, so it's easy to select a pure 'release' or
'debug' build. See the update for revision 4 in my user svn:
http://trac.macports.org/browser/users/dweber/graphics/vtk-devel/Portfile
Anyhow, sounds like your on the way with vtk5. BTW, you might like to
look into whether vtk5 can be configured for mpi (perhaps borrow the vtk-
devel variant and see if it works in vtk5). If you need cocoa, vtk-devel
adds the compiler setting for garbage collection on 10.5+.
Good luck!
Darren
--
Ticket URL: <http://trac.macports.org/ticket/20002#comment:11>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list