[vtkusers] Compile Errors on Mac OS 10.4 Tiger

Doug McCorkle mccdo at iastate.edu
Fri Aug 19 21:05:06 EDT 2005


Now I get this error which doesn't appear to be vtk related:

Building object file vtkDICOMImageReader.o...
Building object file vtkIOInstantiator.o...
Building shared library
/private/var/automount/mnt/rigby/home11/users/mccdo/VTK/VTK-4.4.2/buld-powermac/bin/libvtkIO.dylib...
ld: multiple definitions of symbol ___divdi3
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc.a(_divdi3.o) private
external definition of ___divdi3 in section (__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc_s.dylib(_divdi3.o)
definition of ___divdi3
/usr/bin/libtool: internal link edit command failed
make[3]: ***
[/private/var/automount/mnt/rigby/home11/users/mccdo/VTK/VTK-4.4.2/buld-powermac/bin/libvtkIO.dylib]
Error 1
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_IO] Error 2
make: *** [default_target] Error 2


> OK, it has to be removed from the cmakelist files:
>
> $ grep init */*.txt
> Common/CMakeLists.txt:  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES
> LINK_FLAGS "-
> init _oft_init${KIT}")
> Filtering/CMakeLists.txt:  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES
> LINK_FLAGS
>  "-init _oft_init${KIT}")
> Graphics/CMakeLists.txt:  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES
> LINK_FLAGS
> "-init _oft_init${KIT}")
> Hybrid/CMakeLists.txt:  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES
> LINK_FLAGS "-
> init _oft_init${KIT}")
> IO/CMakeLists.txt:  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES LINK_FLAGS
> "-init
>  _oft_init${KIT}")
> Imaging/CMakeLists.txt:  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES
> LINK_FLAGS "
> -init _oft_init${KIT}")
> Parallel/CMakeLists.txt:  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES
> LINK_FLAGS
> "-init _oft_init${KIT}")
> Patented/CMakeLists.txt:  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES
> LINK_FLAGS
> "-init _oft_init${KIT}")
> Rendering/CMakeLists.txt:vtkFiniteDifferenceGradientEstimator.cxx
> Rendering/CMakeLists.txt:  SET_TARGET_PROPERTIES(vtk${KIT} PROPERTIES
> LINK_FLAGS
>  "-init _oft_init${KIT}")
> Rendering/CMakeLists.txt:      SET_TARGET_PROPERTIES(vtk${KIT}TCL
> PROPERTIES LIN
> K_FLAGS "-init _oft_initRenOSXInit")
>
> The init function tells a shared library to call that function on start
> up.
>
> -Bill
>
>
> At 05:37 PM 8/19/2005, Doug McCorkle wrote:
>>> I did not have the problem, try and find out where oft_initCommon is
>>> being
>>> referenced.
>>> nm Common/*.o | grep oft_initCommon.  Sounds like something did not
>>> rebuild.
>>>
>>If I remove the -init flag from the compile line all is well. I suppose
>>that will cause problems later on but am not sure what. I was unable to
>>track down what the -init flag acutally does.
>>
>>
>>> -Bill
>>>
>>>
>>> At 04:52 PM 8/19/2005, Doug McCorkle wrote:
>>>>I now get this one:
>>>>
>>>>Building object file vtkXMLFileOutputWindow.o...
>>>>Building object file vtkCommonInstantiator.o...
>>>>Building shared library
>>>>/private/var/automount/mnt/rigby/home11/users/mccdo/VTK/VTK-4.4.2/buld-powermac/bin/libvtkCommon.dylib...
>>>>ld: initialization routine symbol name: _oft_initCommon not defined
>>>>/usr/bin/libtool: internal link edit command failed
>>>>make[3]: ***
>>>>[/private/var/automount/mnt/rigby/home11/users/mccdo/VTK/VTK-4.4.2/buld-powermac/bin/libvtkCommon.dylib]
>>>>Error 1
>>>>make[2]: *** [default_target] Error 2
>>>>make[1]: *** [default_target_Common] Error 2
>>>>make: *** [default_target] Error 2
>>>>
>>>>
>>>>> This is a bug in vtk44 with newer Mac OS builds.
>>>>> Basically, you have to do a grep ios_base4Init */*.cxx
>>>>> in VTK, then remove all of this stuff:
>>>>>
>>>>> //-----  This hack needed to compile using gcc3 on OSX until new
>>>>> stdc++.dylib
>>>>> #ifdef __APPLE_CC__
>>>>> extern "C"
>>>>> {void oft_initCommon()
>>>>>  {
>>>>>    extern void _ZNSt8ios_base4InitC4Ev();
>>>>>    _ZNSt8ios_base4InitC4Ev();
>>>>>  }
>>>>> }
>>>>> #endif
>>>>>
>>>>>
>>>>> Here are the files that need fixing:
>>>>>
>>>>> Common/vtkAbstractMapper.cxx:   extern void
>>>>> _ZNSt8ios_base4InitC4Ev();
>>>>> Common/vtkAbstractMapper.cxx:   _ZNSt8ios_base4InitC4Ev();
>>>>> Filtering/vtkCardinalSpline.cxx:  extern void
>>>>> _ZNSt8ios_base4InitC4Ev();
>>>>> Filtering/vtkCardinalSpline.cxx:  _ZNSt8ios_base4InitC4Ev();
>>>>> Graphics/vtkAppendFilter.cxx:  extern void _ZNSt8ios_base4InitC4Ev();
>>>>> Graphics/vtkAppendFilter.cxx:  _ZNSt8ios_base4InitC4Ev();
>>>>> Hybrid/vtk3DSImporter.cxx:  extern void _ZNSt8ios_base4InitC4Ev();
>>>>> Hybrid/vtk3DSImporter.cxx:  _ZNSt8ios_base4InitC4Ev();
>>>>> IO/vtkBMPReader.cxx:  extern void _ZNSt8ios_base4InitC4Ev();
>>>>> IO/vtkBMPReader.cxx:  _ZNSt8ios_base4InitC4Ev();
>>>>> Imaging/vtkBooleanTexture.cxx:  extern void
>>>>> _ZNSt8ios_base4InitC4Ev();
>>>>> Imaging/vtkBooleanTexture.cxx:  _ZNSt8ios_base4InitC4Ev();
>>>>> Parallel/vtkBranchExtentTranslator.cxx:  extern void
>>>>> _ZNSt8ios_base4InitC4Ev();
>>>>> Parallel/vtkBranchExtentTranslator.cxx:  _ZNSt8ios_base4InitC4Ev();
>>>>> Patented/vtkDecimate.cxx:  extern void _ZNSt8ios_base4InitC4Ev();
>>>>> Patented/vtkDecimate.cxx:  _ZNSt8ios_base4InitC4Ev();
>>>>> Rendering/vtkAbstractMapper3D.cxx:  extern void
>>>>> _ZNSt8ios_base4InitC4Ev();
>>>>> Rendering/vtkAbstractMapper3D.cxx:  _ZNSt8ios_base4InitC4Ev();
>>>>> Rendering/vtkTkWidgetsInit.cxx:    extern void
>>>>> _ZNSt8ios_base4InitC4Ev();
>>>>> Rendering/vtkTkWidgetsInit.cxx:    _ZNSt8ios_base4InitC4Ev();
>>>>>
>>>>>
>>>>>
>>>>> At 03:13 PM 8/19/2005, Doug McCorkle wrote:
>>>>>>Hello,
>>>>>>     When trying to compile vtk 4.4 on Mac OS 10.4 I get the
>>>>>> following
>>>>>>compile errors:
>>>>>>
>>>>>>Building object file vtkXMLFileOutputWindow.o...
>>>>>>Building object file vtkCommonInstantiator.o...
>>>>>>Building shared library
>>>>>>/private/var/automount/mnt/rigby/home11/users/mccdo/VTK/VTK-4.4.2/buld-powermac/bin/libvtkCommon.dylib...
>>>>>>ld: Undefined symbols:
>>>>>>__ZNSt8ios_base4InitC4Ev
>>>>>>/usr/bin/libtool: internal link edit command failed
>>>>>>make[3]: ***
>>>>>>[/private/var/automount/mnt/rigby/home11/users/mccdo/VTK/VTK-4.4.2/buld-powermac/bin/libvtkCommon.dylib]
>>>>>>Error 1
>>>>>>make[2]: *** [default_target] Error 2
>>>>>>make[1]: *** [default_target_Common] Error 2
>>>>>>make: *** [default_target] Error 2
>>>>>>
>>>>>>I am not sure how to resolve this so any info would be appreciated.
>>>>>> Thanks
>>>>>>in advance.
>>>>>>
>>>>>>Doug
>>>>>>_______________________________________________
>>>>>>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
>>>>>
>>>>
>>>>_______________________________________________
>>>>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