[vtkusers] Collaboration on macport for VTK 5.2.0

Darren Weber darren.weber.lists at gmail.com
Sat Sep 20 11:55:14 EDT 2008


Hey Mike!  Nice idea, throw it over and I'll take a look.

I think CMake and the build process gets the adapted installation path
from macports during the make install phase when macports adds the
DESTDIR setting.  There are options in macports to fiddle with a lot
of variables during the staging and installation process, so that may
be another avenue to explore. (I'm not up to speed on that yet and I
hesitate to hack that stuff without knowing a lot more details of the
macport management system.  It may be possible to fix the RPATH issue
by altering some settings, but also break the macport management
process.  I'll seek advice from macport gurus.)

Best, Darren

On Sat, Sep 20, 2008 at 5:03 AM, Mike Jackson
<mike.jackson at bluequartz.net> wrote:
> Darren,
>   At this point since macports stages the built binaries in a nested
> location that is NOT indicative of its install_name_location I would suggest
> the following:
>
>  If you can run a shell script post build then create a shell script ( I
> have a starting base) that basically corrects all the install_name entries
> on all the libraries to set the install_name to /opt/local/lib or whatever
> you really want then to be.
>
> I have done this for several other projects and there is starting to be some
> support in CMake for doing this with app bundles but rolling your own might
> be easier. I have a script that was used to do this exact same thing for
> ParaView at one point and should be easily adaptable to just find all the
> .dylibs in the build directory and set their install_name entries.
>
> Let me know.
>
> ---
> Mike Jackson - Principal Software Engineer
> www.bluequartz.net
>
>
> On Sep 19, 2008, at 9:05 PM, Darren Weber wrote:
>
>> On Fri, Sep 19, 2008 at 4:45 PM, Simon Wilson <lists at xeosdd.net> wrote:
>>>
>>> On 19/09/08 11:38 AM, "Darren Weber" <darren.weber.lists at gmail.com>
>>> wrote:
>>>
>>>> I'm working on adapting a macport called vtk5 to work with VTK 5.2.0
>>>> (see current version attached - a work in progress).  If anyone else
>>>> is using macports or building VTK for OSX (10.5 or otherwise), please
>>>> get in contact so we can develop a nice macport for the 5.2.0 release.
>>>> I could use a lot of help to code and test different variants of the
>>>> build configuration in the Portfile.  I've already contacted previous
>>>> maintainers of the vtk macport and they are not available to continue
>>>> the work.
>>>>
>>>> Thanks, Darren
>>>>
>>>> PS, I put the file attached into ~/ports/graphics/vtk5 and run
>>>> portindex from ~/ports/ to make this port available for testing on my
>>>> local system.  It is not ready for integration into macports, without
>>>> further testing.
>>>
>>> Hi Darren,
>>>
>>> I've only just switched to MacPorts from several years of using Fink.
>>> This
>>> is on a MBP with 10.5.5, recently formatted and with few applications
>>> installed.
>>>
>>> -------------
>>> sim at carboxyl ~ $ sudo port
>>> MacPorts 1.600
>>> Entering interactive mode... ("help" for help, "quit" to quit)
>>> [Users/sim] > search vtk
>>> VTK                  graphics/vtk   4.2.6        3D visualization toolkit
>>> vtk5                 graphics/vtk5  5.0.3        3D visualization toolkit
>>> vtk_5.2.0            graphics/vtk5  5.2.0        3D visualization toolkit
>>> (www.vtk.org)
>>> [Users/sim] > install vtk_5.2.0
>>> --->  Fetching vtk_5.2.0
>>> --->  Attempting to fetch vtk-5.2.0.tar.gz from
>>> http://www.vtk.org/files/release/5.2/
>>> --->  Attempting to fetch vtkdata-5.2.0.tar.gz from
>>> http://www.vtk.org/files/release/5.2/
>>> --->  Verifying checksum(s) for vtk_5.2.0
>>> --->  Extracting vtk_5.2.0
>>> --->  Configuring vtk_5.2.0
>>> --->  Building vtk_5.2.0 with target all
>>> --->  Staging vtk_5.2.0 into destroot
>>> Error: Target org.macports.destroot returned: error copying
>>>
>>> "/opt/local/var/macports/build/_Users_sim_Library_ports_graphics_vtk5/work/V
>>> TK/bin/CommonCxxTests": no such file or directory
>>> Error: Status 1 encountered during processing.
>>> [Users/sim] >
>>> -------------
>>>
>>> Looks like you either want to enable BUILD_EXAMPLES (or BUILD_TESTING?),
>>> or
>>> disable the "Provide some examples" section in post-destroot. I removed
>>> the
>>> copy steps, and everything seems to build and install ok, as far as port
>>> is
>>> concerned.
>>>
>>> But then when it comes to running the "vtk" command, for example, I get
>>> the
>>> following:
>>>
>>> -------------
>>> sim at carboxyl /opt/local/lib/vtk-5.2 $ vtk
>>> dyld: Library not loaded:
>>>
>>> /opt/local/var/macports/build/_Users_sim_Library_ports_graphics_vtk5/work/VT
>>> K/bin/libvtkVolumeRenderingTCL.5.2.dylib
>>> Referenced from: /opt/local/bin/vtk
>>> Reason: image not found
>>> Trace/BPT trap
>>> -------------
>>>
>>> I'm not especially experienced with either cmake or macports, but it
>>> seems
>>> to me that you probably need to specify the RPATH stuff somewhere inside
>>> the
>>> Portfile. Since port calls "make install" into the temporary build
>>> directory, executables expect to find the libraries there instead of the
>>> final /opt/local tree.
>>>
>>> I'm happy to test future versions for you.
>>>
>>> Simon Wilson
>>>
>>>
>>>
>>
>> Hi Simon,
>>
>> Thanks a lot for testing this Portfile.  In a CMake thread, I was
>> commenting on problems with the RPATH settings for the macports build.
>> As you point out, macports stages the installation, by using a
>> DESTDIR setting to the make install command.  It was only after I RTFM
>> some more that I realized my RPATH plans were up the creek without a
>> paddle!  Outside of macports, my build settings for RPATH work like a
>> charm.  I've spent most of the day trying to fix this (with some help
>> from the fink package maintainer).  It takes so long to build that my
>> progress is very slow, not to mention that I am using something of a
>> trial-n-error approach to this problem :-(  So, I've got a way to go
>> before I get the shared libraries to work with RPATH in the macport
>> build/install system.
>>
>> Anyhow, I have attached a "snapshot" of my current Portfile, which has
>> some alterations to the default variants.  I tested the default
>> install today and it seemed to work for a static build, with examples,
>> with testing, with tcl wrapping (using a system tcl installation).
>> The static build avoids all the RPATH issues (I hope).  So, at least
>> this is something that can work.  It's a long way from an ideal port
>> with all the variants working properly, but it's something.
>>
>> I can't stress enough that this Portfile is a work in progress, barely
>> at the alpha stage.  I really appreciate some help with testing it ;-)
>>
>> Best, Darren
>> <Portfile>_______________________________________________
>> 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
>
> _______________________________________________
> 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
>



More information about the vtkusers mailing list