MantisBT - VTK
View Issue Details
0011632VTK(No Category)public2010-12-19 16:182013-04-05 20:12
Vince Magnotta 
David Partyka 
normalmajoralways
closedfixed 
MINGWWindows7
 
 
0011632: git version of VTK fails to build using MINGW Makefiles
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c: In fun
ction `vtk_libxml2_xmlRMutexUnlock':
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c:399: er
ror: incompatible types in assignment
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c: In fun
ction `vtk_libxml2_xmlGetThreadId':
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c:624: er
ror: aggregate value used where an integer was expected
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c: In fun
ction `vtk_libxml2_xmlIsMainThread':
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c:660: er
ror: invalid operands to binary ==
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c: In fun
ction `xmlOnceInit':
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c:790: er
ror: `run_once' undeclared (first use in this function)
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c:790: er
ror: (Each undeclared identifier is reported only once
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c:790: er
ror: for each function it appears in.)
C:\cygwin\home\vince\development\TEST\VTK\Utilities\vtklibxml2\threads.c:796: er
ror: incompatible types in assignment
mingw32-make[2]: *** [Utilities/vtklibxml2/CMakeFiles/vtklibxml2.dir/threads.c.o
bj] Error 1
mingw32-make[1]: *** [Utilities/vtklibxml2/CMakeFiles/vtklibxml2.dir/all] Error
2
mingw32-make: *** [all] Error 2
Install latest version of MinGW on a windows machine.
Checkout git version of VTK
This problem appears both with the MinGW from the latest relase as well as the version that contains gcc 3.4.5
No tags attached.
Issue History
2010-12-19 16:18Vince MagnottaNew Issue
2010-12-19 16:31David PartykaAssigned To => David Partyka
2010-12-19 16:31David PartykaStatusbacklog => tabled
2010-12-23 09:21David PartykaNote Added: 0024324
2010-12-23 09:21David PartykaStatustabled => @80@
2010-12-23 09:21David PartykaResolutionopen => fixed
2013-04-05 20:12Berk GeveciStatuscustomer review => closed

Notes
(0024324)
David Partyka   
2010-12-23 09:21   
CMake (for some reason) enables both CMAKE_USE_PTHREADS and CMAKE_USE_WIN32_THREADS. This results in VTK trying to use both threading libraries and hence the compile error you listed. I have committed a fix to disable CMAKE_USE_PTHREADS if both of these are enabled in VTK.


commit 9783b782d4b20c8778d57bd3d397afd5844cf9dc
Merge: b1621da 185671e
Author: Dave Partyka <dave.partyka@kitware.com>
Date: Thu Dec 23 08:53:07 2010 -0500

    Merge topic 'mingw-pthreads'

    185671e MinGW: Default to using WIN32 threads.