View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0001130 | CMake | public | 2004-09-02 16:11 | 2006-10-04 15:14 | |||||
Reporter | Thomas Treadway | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0001130: Bad Makefile link command when building VTK | ||||||||
Description | When building VTK (10/28/2003 CVS used by VisIt) I got: $ ../cmake-2.0.3/bin/cmake . -- Check for working C compiler: gcc -- works -- Check for working CXX compiler: c++ -- works -- Compiling VTK CMake commands -- Compiling VTK CMake commands - done -- Loading VTK CMake commands -- Loading VTK CMake commands - done -- Configuring done -- Generating done -- Build files have been written to: /Users/treadway/src/VTK $ make make cmake.depends Building dependencies. cmake.depends... /Users/treadway/src/cmake-2.0.3/bin/cmake -S/Users/treadway/src/VTK -O/Users/treadway/src/VTK -H/Users/treadway/src/VTK -B/Users/treadway/src/VTK -- Compiling VTK CMake commands -- Compiling VTK CMake commands - done -- Loading VTK CMake commands -- Loading VTK CMake commands - done make cmake.check_depends . . . Building object file DICOMAppHelper.o... c++ -o DICOMAppHelper.o -DvtkDICOMParser_EXPORTS -Wno-deprecated -no-cpp-precomp -fpascal-strings -O2 -fPIC -I/Users/treadway/src/VTK/Utilities/DICOMParser -I/Users/treadway/src/VTK -I/Users/treadway/src/VTK/Hybrid -I/Users/treadway/src/VTK/Rendering -I/Users/treadway/src/VTK/IO -I/Users/treadway/src/VTK/Imaging -I/Users/treadway/src/VTK/Graphics -I/Users/treadway/src/VTK/Filtering -I/Users/treadway/src/VTK/Common -I/Users/treadway/src/VTK/Common/Testing/Cxx -I/Users/treadway/src/VTK/Utilities/zlib -I/Users/treadway/src/VTK/Utilities/jpeg -I/Users/treadway/src/VTK/Utilities/png -I/Users/treadway/src/VTK/Utilities/tiff -I/Users/treadway/src/VTK/Utilities/expat -I/Users/treadway/src/VTK/Utilities/DICOMParser -I/Users/treadway/src/VTK/Utilities/freetype/include -I/Users/treadway/src/VTK/Utilities/freetype -I/Users/treadway/src/VTK/Utilities/ftgl/src -I/Users/treadway/src/VTK/Utilities/ftgl -c /Users/treadway/src/VTK/Utilities/DICOMParser/DICOMAppHelper.cxx Building shared library /Users/treadway/src/VTK/bin/libvtkDICOMParser.dylib... /Users/treadway/src/cmake-2.0.3/bin/cmake -E remove -f /Users/treadway/src/VTK/bin/libvtkDICOMParser.dylib c++ -dynamiclib -Wl,-twolevel_namespace -prebind -o /Users/treadway/src/VTK/bin/libvtkDICOMParser.dylib DICOMFile.o DICOMParser.o DICOMAppHelper.o -L. -lgcc /usr/bin/libtool: can't locate file for: -lgcc /usr/bin/libtool: file: -lgcc is not an object file (not allowed in a library) make[5]: *** [/Users/treadway/src/VTK/bin/libvtkDICOMParser.dylib] Error 1 make[4]: *** [default_target] Error 2 make[3]: *** [default_target_DICOMParser] Error 2 make[2]: *** [default_target] Error 2 make[1]: *** [default_target_Utilities] Error 2 make: *** [default_target] Error 2 | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0001447) Bill Hoffman (manager) 2004-09-16 17:14 |
The problem is in CMakeDefaultMakeRuleVariables.cmake: IF(CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY} -lgcc") ENDIF(CMAKE_COMPILER_IS_GNUCXX) The commit log for the change looks like this: revision 1.10 date: 2004-01-21 23:39:54 +0000; author: andy; state: Exp; lines: +4 -0 ENH: This will probably break some obscure version of gcc, but until then, everybody doing profiling will be happy What version of gcc is this? Both the Darwin machines at Kitware are working fine with c++ -lgcc. I am a bit surprised that there is no -lgcc on this machine, I think it is pretty standard with the gnu compiler. |
(0001523) Bill Hoffman (manager) 2004-09-29 15:23 |
There should be a try compile for this. |
(0002603) Chris Scharver (reporter) 2005-07-07 13:51 |
I'm seeing similar problems compiling the latest VTK from cvs on Mac OS X 10.4 with XCode 2.1. I get the ___divdi3 error mentioned at http://public.kitware.com/pipermail/vtkusers/2005-May/079721.html [^] , although the solution there involved modifying the stated CMake module. Does this solution need to go into place for use with gcc 4? It seems that -lgcc should not be explicitly added to the link line, and that's what is causing problems. Building shared library /Volumes/homepb/Users/Shared/code/vtk-build/bin/libvtkImaging.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 ld: multiple definitions of symbol ___udivdi3 /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc.a(_udivdi3.o) private external definition of ___udivdi3 in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/libgcc_s.dylib(_udivdi3.o) definition of ___udivdi3 /usr/bin/libtool: internal link edit command failed make[1]: *** [/Volumes/homepb/Users/Shared/code/vtk-build/bin/libvtkImaging.dylib] Error 1 make: *** [default_target] Error 2 If I manually edit the Makefile to remove the -lgcc, then this particular link occurs without any trouble. $ gcc -v Using built-in specs. Target: powerpc-apple-darwin8 Configured with: /private/var/tmp/gcc/gcc-5026.obj~19/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8 Thread model: posix gcc version 4.0.0 (Apple Computer, Inc. build 5026) |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |