#278 compile error with mingw32 and --disable-thread-support

open
nobody
None
5
2012-05-16
2012-05-16
cjd
No

tested with 2.0.16, 2.0.19 and 2.1 alpha

wget https://github.com/downloads/libevent/libevent/libevent-2.1-alpha.tar.gz
tar -xf ./libevent-2.1.1-alpha.tar.gz
cd libevent-2.1.1-alpha/
./configure --prefix=/usr/i686-w64-mingw32 --host=i586-mingw32msvc --disable-thread-support
make

.....
evthread_win32.c:299:1: warning: no previous prototype for 'evthread_use_windows_threads' [-Wmissing-prototypes]
evthread_win32.c: In function 'evthread_use_windows_threads':
evthread_win32.c:301:9: error: variable 'cbs' has initializer but incomplete type
evthread_win32.c:302:3: error: 'EVTHREAD_LOCK_API_VERSION' undeclared (first use in this function)
evthread_win32.c:302:3: note: each undeclared identifier is reported only once for each function it appears in
evthread_win32.c:302:3: warning: excess elements in struct initializer [enabled by default]
evthread_win32.c:302:3: warning: (near initialization for 'cbs') [enabled by default]
evthread_win32.c:303:3: error: 'EVTHREAD_LOCKTYPE_RECURSIVE' undeclared (first use in this function)
evthread_win32.c:303:3: warning: excess elements in struct initializer [enabled by default]

.....

Discussion

  • Nick Mathewson

    Nick Mathewson - 2012-05-16

    Hm. I'm not sure whether the best solution is to make this work, or to disallow using --disable-thread-support with Windows. The reason it might be best to require threads with windows is that IOCP simply requires it.

     
  • Nick Mathewson

    Nick Mathewson - 2012-05-16

    If we _do_ decide this is supported, there's a patch in branch "20_win_nothreads" in my github repository that should make this work. ( https://github.com/nmathewson/libevent )

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks