[vtkusers] mac os x ld: multiple definitions of symbol ___divdi3

David C. Thompson dcthomp at sandia.gov
Mon May 9 20:20:36 EDT 2005


> I am attempting to compile VTK-4.2.6 on mac os x 10.4 using gcc 4.0.   
> Compiliation
> quits with the following error:
> 
> ld: multiple definitions of symbol ___divdi3
> /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc.a(_divdi3.o) private  
I had this problem as well over the weekend and got past it by changing
the lines in
/usr/local/share/CMake/Modules/CMakeDefaultMakeRuleVariables.cmake (or
wherever it is installed) from

IF(CMAKE_COMPILER_IS_GNUCXX)
  SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} -lgcc")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

to

IF(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
  SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} -lgcc")
ENDIF(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)

but this is clearly not a permanent fix since it worked before under
MacOS 10.3.

	David




More information about the vtkusers mailing list