Re: [Valgrind4win-developers] Compile errors Valgrind for windows
Status: Pre-Alpha
Brought to you by:
cschwarz1
From: Jiří H. <ji...@fu...> - 2013-02-08 01:07:35
|
Hi Ramesh, sorry for the late reply. > I am trying to compile valgrind on windows 7 64 bit professional edition. I > get a compile error while compiling valgrind-listener.c. The exact error is > as follows. > valgrind-listener.c:120:13: error: conflicting types for 'nanosleep' > pthread_time.h:84:28: note: previous declaration of 'nanosleep' was here The nanosleep() at valgrind-listener.c:120 is just a poor emulation used under Windows, because this function is not available in MinGW by default. For example, my pthread_time.h contains just this: /* Dummy header, which gets overriden, if winpthread library gets installed. */ So that's why it have been working for people so far. You (or something on your behalf) have apparently installed the winpthread package and it contains something more, including a prototype for a proper nanosleep(), provided by the library. That's the conflict. This probably needs some proper handling in the configure script and an #ifdef. In the meantime, you can e.g. just delete the nanosleep() emulation from valgrind-listener.c, it will use the system one. (Though you might need to add -lpthread to valgrind_listener_LDADD in auxprogs/Makefile.am to satisfy the new dependency then.) Kind regards, Jiri |