Compile errors in threads.c

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Compile errors in threads.c

Gib Bogle
Hi, I'm trying to build VTK 5.6 using MinGW 4.4.  There are several  
errors when compiling threads.c:

C:\VTK-src\Utilities\vtklibxml2\threads.c: In function  
'vtk_libxml2_xmlRMutexUnl
ock':
C:\VTK-src\Utilities\vtklibxml2\threads.c:399: error: incompatible  
types when as
signing to type 'pthread_t' from type 'int'
C:\VTK-src\Utilities\vtklibxml2\threads.c: In function  
'vtk_libxml2_xmlGetThread
Id':
C:\VTK-src\Utilities\vtklibxml2\threads.c:624: error: aggregate value  
used where
  an integer was expected
C:\VTK-src\Utilities\vtklibxml2\threads.c: In function  
'vtk_libxml2_xmlIsMainThr
ead':
C:\VTK-src\Utilities\vtklibxml2\threads.c:660: error: invalid operands  
to binary
  == (have 'pthread_t' and 'pthread_t')
C:\VTK-src\Utilities\vtklibxml2\threads.c: In function 'xmlOnceInit':
C:\VTK-src\Utilities\vtklibxml2\threads.c:790: error: 'run_once'  
undeclared (fir
st use in this function)
C:\VTK-src\Utilities\vtklibxml2\threads.c:790: error: (Each undeclared  
identifie
r is reported only once
C:\VTK-src\Utilities\vtklibxml2\threads.c:790: error: for each  
function it appea
rs in.)
C:\VTK-src\Utilities\vtklibxml2\threads.c:796: error: incompatible  
types when as
signing to type 'pthread_t' from type 'DWORD'
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

Is there a way around this problem?

Thanks
Gib

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Compile errors in threads.c

Sascha Zelzer
Hi,

you should disable either CMAKE_USE_PTHREADS or CMAKE_USE_WIN32THREADS.
By default, they are both enabled which leads to a conflict.

Best,
Sascha

On 08/28/2010 12:06 PM, Gib Bogle wrote:

> Hi, I'm trying to build VTK 5.6 using MinGW 4.4.  There are several
> errors when compiling threads.c:
>
> C:\VTK-src\Utilities\vtklibxml2\threads.c: In function
> 'vtk_libxml2_xmlRMutexUnl
> ock':
> C:\VTK-src\Utilities\vtklibxml2\threads.c:399: error: incompatible
> types when as
> signing to type 'pthread_t' from type 'int'
> C:\VTK-src\Utilities\vtklibxml2\threads.c: In function
> 'vtk_libxml2_xmlGetThread
> Id':
> C:\VTK-src\Utilities\vtklibxml2\threads.c:624: error: aggregate value
> used where
>    an integer was expected
> C:\VTK-src\Utilities\vtklibxml2\threads.c: In function
> 'vtk_libxml2_xmlIsMainThr
> ead':
> C:\VTK-src\Utilities\vtklibxml2\threads.c:660: error: invalid operands
> to binary
>    == (have 'pthread_t' and 'pthread_t')
> C:\VTK-src\Utilities\vtklibxml2\threads.c: In function 'xmlOnceInit':
> C:\VTK-src\Utilities\vtklibxml2\threads.c:790: error: 'run_once'
> undeclared (fir
> st use in this function)
> C:\VTK-src\Utilities\vtklibxml2\threads.c:790: error: (Each undeclared
> identifie
> r is reported only once
> C:\VTK-src\Utilities\vtklibxml2\threads.c:790: error: for each
> function it appea
> rs in.)
> C:\VTK-src\Utilities\vtklibxml2\threads.c:796: error: incompatible
> types when as
> signing to type 'pthread_t' from type 'DWORD'
> 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
>
> Is there a way around this problem?
>
> Thanks
> Gib
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>    

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers