[vtkusers] vtk & MacOSX/Darwin: ld problem
Chris Scharver
scharver at evl.uic.edu
Fri May 16 09:44:00 EDT 2003
At 11:57 AM +0200 05/16/2003, Marc Dellinger wrote:
>is it possible that your binaries are still looking for things in /Users/adrian/VTK-Dev/VTKBuild-4.2.1/ ?
I believe that I ran into a similar problem a while ago. VTK was working after I installed only due to the fact that my build directory was still kept around. Once I removed my build directory I ran into similar problems. When VTK builds, it seems to install the build path into the library rather than the install path. To check, use "otool -L" with the particular library. If there are references to paths outside /usr/local, then that is where the problem is. Here's an old message on the topic:
--begin forwarded text--
Delivered-To: vtkusers at public.kitware.com
To: Drew McCormack <cormack at chem.vu.nl>
From: Chris Scharver <scharver at evl.uic.edu>
Subject: Re: [vtkusers] Installed dylibs on OS X
Cc: vtkusers at public.kitware.com
Sender: vtkusers-admin at public.kitware.com
Date: Thu, 20 Mar 2003 10:35:56 -0600
At 8:37 AM +0100 03/20/2003, Drew McCormack wrote:
>Does the "-install_name" option get used in the VTK linking? Maybe
>that is the problem.
>You may be able to fix the libraries without recompiling by using
>the command "install_name_tool". "man install_name_tool" will tell
>you more.
Thanks for the tip, Drew! I was able to fix the problem by setting a new id:
$ otool -L /usr/local/lib/vtk/libvtkCommon.dylib
libvtkCommon.dylib:
/tmp/vtk-build/bin/libvtkCommon.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 663.6.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 63.0.0)
$ sudo install_name_tool -id /usr/local/lib/vtk/libvtkCommon.dylib /usr/local/lib/vtk/libvtkCommon.dylib
$ otool -L /usr/local/lib/vtk/libvtkCommon.dylib
libvtkCommon.dylib:
/usr/local/lib/vtk/libvtkCommon.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 663.6.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 63.0.0)
This seems like a specific Mach-O thing. Shuffling libraries around seems like a very unsafe thing to do without this extra step. Maybe the install should automatically call the command above when performing the installation?
Chris
--end forwarded text--
--
Chris Scharver
Electronic Visualization Laboratory
The University of Illinois at Chicago
Ph: 312-996-3002 FAX: 312-413-7585
<http://www.evl.uic.edu/scharver/>
More information about the vtkusers
mailing list