Re: Windows XP compilation using cygwin
> i'm trying to compile iperf-2.0.2 from source on a Windows XP machine.
>
> I get the following error:
> $ make
> make all-recursive
> make[1]: Entering directory `/tmp/iperf-2.0.2'
> Making all in compat
> make[2]: Entering directory `/tmp/iperf-2.0.2/compat'
> if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -O2 -MT Thread.o -MD -MP -MF ".deps/Thread.Tpo" -c -o Thread.o Thread.c; \
> then mv -f ".deps/Thread.Tpo" ".deps/Thread.Po"; else rm -f ".deps/ Thread.Tpo"; exit 1; fi
> Thread.c: In function `thread_stop':
> Thread.c:205: error: `oldTID' undeclared (first use in this function)
> Thread.c:205: error: (Each undeclared identifier is reported only once
> Thread.c:205: error: for each function it appears in.)
> make[2]: *** [Thread.o] Error 1
> make[2]: Leaving directory `/tmp/iperf-2.0.2/compat'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/tmp/iperf-2.0.2'
> make: *** [all] Error 2
>
I got the same error compiling on Solaris. The fix for that works for Windows also.
Edit compat/Thread.c and change line 205 from:
pthread_cancel( oldTID );
to:
pthread_cancel( thread->mTID );
iperf 2.0.2 then compiled without a problem on cygwin/WinXP. I did not write the above change. I found it by Googling for "iperf oldTID" when trying to get iperf to compile under Solaris.
HTH,
Ted