[vtkusers] connecting vtk and itk on os x
Glen Lehmann
glehmann at imaging.robarts.ca
Tue Jul 19 09:48:18 EDT 2005
Hi Will,
I guess you did a 'make install' on vtk, right?
If so, here's the problem; vtk's .dylibs (and .sos) are built with
absolute paths. Try this:
>> otool -L /usr/local/lib/vtk/libvtkCommon.dylib
and you'll see it points back to it's original build location. My
guess is that you've moved/remove the original build location of your
vtk because normally, gcc would just link against the original libs.
Option 1 - harder
To change these paths, it's possible to hack together a csh script
based on install_name_tool (see the docs for details) or, if you are
more familiar with py2app than myself, there's probably a way to do
this using py2app's macholib.
Option 2 - easier
Alternatively, if you still have your original vtk build, you can just
point InsightApplications back to it.
HTH,
Glen
On Jul 19, 2005, at 5:14 AM, Will Woods wrote:
>
> Hi,
>
> Not sure if this is an itk or vtk issue, but I am having problems
> compiling the cvs version of InsightApplications on OS X (10.3),
> specifically the libvtkVTKITKCommonPython.dylib library. Below is the
> point at which it crashes, complaining that it 'can't locate file for:
> -lvtkFilteringPython' which I don't understand because the file
> appears to exist:
>
> /usr/local/lib/vtk/libvtkFilteringPython.so
> /usr/local/lib/vtk/libvtkFilteringPythonD.dylib
>
>
> and it is looking in the right place. Any suggestions? I'm using the
> cvs version of vtk and itk, which both compile fine.
>
> Thanks,
>
> Will
>
>
>
> /usr/bin/g++ -dynamiclib -o libvtkVTKITKCommonPython.dylib
> vtkITKAntiAliasBinaryImageFilterPython.o
> vtkITKBilateralImageFilterPython.o
> vtkITKConfidenceConnectedImageFilterPython.o
> vtkITKConnectedThresholdImageFilterPython.o
> vtkITKCurvatureAnisotropicDiffusionImageFilterPython.o
> vtkITKCurvatureAnisotropicDiffusionImageFilterSSPython.o
> vtkITKDanielssonDistanceMapImageFilterPython.o
> vtkITKDiscreteGaussianImageFilterPython.o
> vtkITKGradientAnisotropicDiffusionImageFilterPython.o
> vtkITKGradientMagnitudeImageFilterPython.o
> vtkITKGrayscaleFillholeImageFilterPython.o
> vtkITKImageToImageFilterPython.o vtkITKImageToImageFilter2DFFPython.o
> vtkITKImageToImageFilterFFPython.o vtkITKImageToImageFilterFULPython.o
> vtkITKImageToImageFilterULULPython.o
> vtkITKImageToImageFilterSFPython.o vtkITKImageToImageFilterSULPython.o
> vtkITKImageToImageFilterUSULPython.o
> vtkITKImageToImageFilterUSUSPython.o
> vtkITKImageToImageFilterSSPython.o
> vtkITKIsolatedConnectedImageFilterPython.o
> vtkITKLaplacianSegmentationLevelSetImageFilterPython.o
> vtkITKMutualInformationTransformPython.o
> vtkITKNeighborhoodConnectedImageFilterPython.o
> vtkITKNormalizeImageFilterSFPython.o
> vtkITKNormalizeImageFilterPython.o
> vtkITKOtsuThresholdImageFilterPython.o
> vtkITKPDEDeformableRegistrationFilterPython.o
> vtkITKStatisticsImageFilterULULPython.o
> vtkITKSmoothingRecursiveGaussianImageFilterSSPython.o
> vtkITKGradientMagnitudeRecursiveGaussianImageFilterSSPython.o
> vtkITKGradientMagnitudeRecursiveGaussianImageFilterFFPython.o
> vtkITKThresholdSegmentationLevelSetImageFilterPython.o
> vtkITKTobogganImageFilterPython.o vtkITKWatershedImageFilterPython.o
> vtkITKWatershedImageFilterSULPython.o
> vtkITKRelabelComponentImageFilterPython.o
> vtkITKArchetypeImageSeriesReaderPython.o
> -L/usr/local/lib/InsightToolkit -L/usr/local/lib/vtk
> -L/home/willwoods/ITK2/itk-apps/vtkITK/Common -lITKAlgorithms
> -lITKCommon -lITKBasicFilters -lvtkVTKITKCommon -lvtkFilteringPython
> -lvtkCommonPython -lITKAlgorithms -lITKBasicFilters -lvtkImaging
> -lITKIO -lITKNrrdIO -litkgdcm -litkjpeg12 -litkjpeg16 -litkpng
> -litktiff -litkjpeg8 -lITKMetaIO -litkzlib -lITKDICOMParser -lITKEXPAT
> -lITKBasicFilters -lITKAlgorithms -lITKNumerics -lITKCommon
> -litkvnl_inst -litkvnl_algo -litkvnl -litkvcl -litknetlib -lm -litksys
> -lvtkFilteringPythonD -lvtkFiltering -lvtkCommonPythonD -lvtkCommon
> -framework AppKit -lpthread -lm -framework Python -lgcc
> /usr/bin/libtool: can't locate file for: -lvtkFilteringPython
> /usr/bin/libtool: file: -lvtkFilteringPython is not an object file
> (not allowed in a library)
> /usr/bin/libtool: can't locate file for: -lvtkCommonPython
> /usr/bin/libtool: file: -lvtkCommonPython is not an object file (not
> allowed in a library)
> make[5]: *** [libvtkVTKITKCommonPython.dylib] Error 1
> make[4]: *** [default_target] Error 2
> make[3]: *** [default_target_Common] Error 2
> make[2]: *** [default_target] Error 2
> make[1]: *** [default_target_vtkITK] Error 2
> make: *** [default_target] Error 2
>
>
>
> _______________________________________________
> 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