libvpx compile error after "Amend and improve VP8 multithreading implementation" commit

191 views
Skip to first unread message

neok...@gmail.com

unread,
Jan 25, 2016, 2:13:25 PM1/25/16
to Codec Developers
Hi
recently libvpx have compile issue
please fix it.

Steps to reproduce the problem:

1. Download libvpx newest git from https://chromium.googlesource.com/webm/libvpx/
2. build libvpx


What went wrong?


Following error occured when cross-compile (build for windows x86, x64) on ubuntu(mingw-w64-build-3.6.7, gcc 5.2.0)

In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from ./vp8/encoder/onyx_int.h:25,
                 from vp8/vp8_cx_iface.c:21:
./vp8/common/threading.h:30:19: error: two or more data types in declaration specifiers
 #define pthread_t HANDLE
                   ^
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:585:33: error: expected identifier or '(' before ';' token
 typedef ptw32_handle_t pthread_t;
                                 ^
./vp8/common/threading.h:31:24: error: expected identifier or '(' before 'unsigned'
 #define pthread_attr_t DWORD
                        ^
In file included from ./vp8/encoder/onyx_int.h:25:0,
                 from vp8/vp8_cx_iface.c:21:
./vp8/common/threading.h:32:32: error: expected identifier or '(' before 'if'
 #define pthread_detach(thread) if(thread!=NULL)CloseHandle(thread)
                                ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from ./vp8/encoder/onyx_int.h:25,
                 from vp8/vp8_cx_iface.c:21:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:955:55: error: macro "pthread_self" passed 1 arguments, but takes just 0
 PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);
                                                       ^
In file included from ./vp8/encoder/onyx_int.h:25:0,
                 from vp8/vp8_cx_iface.c:21:
./vp8/common/threading.h:34:56: error: expected declaration specifiers or '...' before numeric constant
 #define pthread_cancel(thread) terminate_thread(thread,0)
                                                        ^
./vp8/common/threading.h:37:64: error: expected declaration specifiers or '...' before '(' token
 #define pthread_setspecific(ts_key, value) TlsSetValue(ts_key, (void *)value)
                                                                ^
./vp8/common/threading.h:36:37: error: conflicting types for 'TlsGetValue'
 #define pthread_getspecific(ts_key) TlsGetValue(ts_key)
                                     ^
In file included from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/winbase.h:29:0,
                 from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/windows.h:70,
                 from ./vpx_ports/vpx_once.h:41,
                 from vp8/vp8_cx_iface.c:20:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/processthreadsapi.h:168:28: note: previous declaration of 'TlsGetValue' was here
   WINBASEAPI LPVOID WINAPI TlsGetValue (DWORD dwTlsIndex);
                            ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/bitstream.c:13:
./vp8/common/threading.h:30:19: error: two or more data types in declaration specifiers
 #define pthread_t HANDLE
                   ^
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:585:33: error: expected identifier or '(' before ';' token
 typedef ptw32_handle_t pthread_t;
                                 ^
./vp8/common/threading.h:31:24: error: expected identifier or '(' before 'unsigned'
 #define pthread_attr_t DWORD
                        ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/bitstream.c:13:
./vp8/common/threading.h:32:32: error: expected identifier or '(' before 'if'
 #define pthread_detach(thread) if(thread!=NULL)CloseHandle(thread)
                                ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/bitstream.c:13:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:955:55: error: macro "pthread_self" passed 1 arguments, but takes just 0
 PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);
                                                       ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/bitstream.c:13:
./vp8/common/threading.h:34:56: error: expected declaration specifiers or '...' before numeric constant
 #define pthread_cancel(thread) terminate_thread(thread,0)
                                                        ^
./vp8/common/threading.h:37:64: error: expected declaration specifiers or '...' before '(' token
 #define pthread_setspecific(ts_key, value) TlsSetValue(ts_key, (void *)value)
                                                                ^
./vp8/common/threading.h:36:37: error: conflicting types for 'TlsGetValue'
 #define pthread_getspecific(ts_key) TlsGetValue(ts_key)
                                     ^
In file included from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/winbase.h:29:0,
                 from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/windows.h:70,
                 from ./vp8/common/threading.h:26,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/bitstream.c:13:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/processthreadsapi.h:168:28: note: previous declaration of 'TlsGetValue' was here
   WINBASEAPI LPVOID WINAPI TlsGetValue (DWORD dwTlsIndex);
                            ^
make[1]: *** [vp8/vp8_cx_iface.c.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [vp8/encoder/bitstream.c.o] Error 1
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeframe.c:15:
./vp8/common/threading.h:30:19: error: two or more data types in declaration specifiers
 #define pthread_t HANDLE
                   ^
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:585:33: error: expected identifier or '(' before ';' token
 typedef ptw32_handle_t pthread_t;
                                 ^
./vp8/common/threading.h:31:24: error: expected identifier or '(' before 'unsigned'
 #define pthread_attr_t DWORD
                        ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeframe.c:15:
./vp8/common/threading.h:32:32: error: expected identifier or '(' before 'if'
 #define pthread_detach(thread) if(thread!=NULL)CloseHandle(thread)
                                ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeframe.c:15:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:955:55: error: macro "pthread_self" passed 1 arguments, but takes just 0
 PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);
                                                       ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeframe.c:15:
./vp8/common/threading.h:34:56: error: expected declaration specifiers or '...' before numeric constant
 #define pthread_cancel(thread) terminate_thread(thread,0)
                                                        ^
./vp8/common/threading.h:37:64: error: expected declaration specifiers or '...' before '(' token
 #define pthread_setspecific(ts_key, value) TlsSetValue(ts_key, (void *)value)
                                                                ^
./vp8/common/threading.h:36:37: error: conflicting types for 'TlsGetValue'
 #define pthread_getspecific(ts_key) TlsGetValue(ts_key)
                                     ^
In file included from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/winbase.h:29:0,
                 from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/windows.h:70,
                 from ./vp8/common/threading.h:26,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeframe.c:15:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/processthreadsapi.h:168:28: note: previous declaration of 'TlsGetValue' was here
   WINBASEAPI LPVOID WINAPI TlsGetValue (DWORD dwTlsIndex);
                            ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeframe.c:15:
vp8/encoder/encodeframe.c: In function 'vp8_encode_frame':
./vp8/common/threading.h:85:23: warning: value computed is not used [-Wunused-value]
 #define sem_wait(sem) (int)(WAIT_OBJECT_0 != WaitForSingleObject(*sem,INFINITE))
                       ^
vp8/encoder/encodeframe.c:866:13: note: in expansion of macro 'sem_wait'
             sem_wait(&cpi->h_event_end_encoding); /* wait for other threads to finish */
             ^
make[1]: *** [vp8/encoder/encodeframe.c.o] Error 1
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeintra.c:18:
./vp8/common/threading.h:30:19: error: two or more data types in declaration specifiers
 #define pthread_t HANDLE
                   ^
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:585:33: error: expected identifier or '(' before ';' token
 typedef ptw32_handle_t pthread_t;
                                 ^
./vp8/common/threading.h:31:24: error: expected identifier or '(' before 'unsigned'
 #define pthread_attr_t DWORD
                        ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeintra.c:18:
./vp8/common/threading.h:32:32: error: expected identifier or '(' before 'if'
 #define pthread_detach(thread) if(thread!=NULL)CloseHandle(thread)
                                ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeintra.c:18:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:955:55: error: macro "pthread_self" passed 1 arguments, but takes just 0
 PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);
                                                       ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeintra.c:18:
./vp8/common/threading.h:34:56: error: expected declaration specifiers or '...' before numeric constant
 #define pthread_cancel(thread) terminate_thread(thread,0)
                                                        ^
./vp8/common/threading.h:37:64: error: expected declaration specifiers or '...' before '(' token
 #define pthread_setspecific(ts_key, value) TlsSetValue(ts_key, (void *)value)
                                                                ^
./vp8/common/threading.h:36:37: error: conflicting types for 'TlsGetValue'
 #define pthread_getspecific(ts_key) TlsGetValue(ts_key)
                                     ^
In file included from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/winbase.h:29:0,
                 from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/windows.h:70,
                 from ./vp8/common/threading.h:26,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodeintra.c:18:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/processthreadsapi.h:168:28: note: previous declaration of 'TlsGetValue' was here
   WINBASEAPI LPVOID WINAPI TlsGetValue (DWORD dwTlsIndex);
                            ^
make[1]: *** [vp8/encoder/encodeintra.c.o] Error 1
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/encodemv.c:13:
./vp8/common/threading.h:30:19: error: two or more data types in declaration specifiers
 #define pthread_t HANDLE
                   ^
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:585:33: error: expected identifier or '(' before ';' token
 typedef ptw32_handle_t pthread_t;
                                 ^
./vp8/common/threading.h:31:24: error: expected identifier or '(' before 'unsigned'
 #define pthread_attr_t DWORD
                        ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/encodemv.c:13:
./vp8/common/threading.h:32:32: error: expected identifier or '(' before 'if'
 #define pthread_detach(thread) if(thread!=NULL)CloseHandle(thread)
                                ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/encodemv.c:13:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:955:55: error: macro "pthread_self" passed 1 arguments, but takes just 0
 PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);
                                                       ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/encodemv.c:13:
./vp8/common/threading.h:34:56: error: expected declaration specifiers or '...' before numeric constant
 #define pthread_cancel(thread) terminate_thread(thread,0)
                                                        ^
./vp8/common/threading.h:37:64: error: expected declaration specifiers or '...' before '(' token
 #define pthread_setspecific(ts_key, value) TlsSetValue(ts_key, (void *)value)
                                                                ^
./vp8/common/threading.h:36:37: error: conflicting types for 'TlsGetValue'
 #define pthread_getspecific(ts_key) TlsGetValue(ts_key)
                                     ^
In file included from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/winbase.h:29:0,
                 from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/windows.h:70,
                 from ./vp8/common/threading.h:26,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/encodemv.c:13:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/processthreadsapi.h:168:28: note: previous declaration of 'TlsGetValue' was here
   WINBASEAPI LPVOID WINAPI TlsGetValue (DWORD dwTlsIndex);
                            ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodemb.c:15:
./vp8/common/threading.h:30:19: error: two or more data types in declaration specifiers
 #define pthread_t HANDLE
                   ^
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:585:33: error: expected identifier or '(' before ';' token
 typedef ptw32_handle_t pthread_t;
                                 ^
./vp8/common/threading.h:31:24: error: expected identifier or '(' before 'unsigned'
 #define pthread_attr_t DWORD
                        ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodemb.c:15:
./vp8/common/threading.h:32:32: error: expected identifier or '(' before 'if'
 #define pthread_detach(thread) if(thread!=NULL)CloseHandle(thread)
                                ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodemb.c:15:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:955:55: error: macro "pthread_self" passed 1 arguments, but takes just 0
 PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);
                                                       ^
make[1]: *** [vp8/encoder/encodemv.c.o] Error 1
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodemb.c:15:
./vp8/common/threading.h:34:56: error: expected declaration specifiers or '...' before numeric constant
 #define pthread_cancel(thread) terminate_thread(thread,0)
                                                        ^
./vp8/common/threading.h:37:64: error: expected declaration specifiers or '...' before '(' token
 #define pthread_setspecific(ts_key, value) TlsSetValue(ts_key, (void *)value)
                                                                ^
./vp8/common/threading.h:36:37: error: conflicting types for 'TlsGetValue'
 #define pthread_getspecific(ts_key) TlsGetValue(ts_key)
                                     ^
In file included from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/winbase.h:29:0,
                 from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/windows.h:70,
                 from ./vp8/common/threading.h:26,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemb.h:15,
                 from vp8/encoder/encodemb.c:15:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/processthreadsapi.h:168:28: note: previous declaration of 'TlsGetValue' was here
   WINBASEAPI LPVOID WINAPI TlsGetValue (DWORD dwTlsIndex);
                            ^
make[1]: *** [vp8/encoder/encodemb.c.o] Error 1
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/ethreading.c:11:
./vp8/common/threading.h:30:19: error: two or more data types in declaration specifiers
 #define pthread_t HANDLE
                   ^
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:585:33: error: expected identifier or '(' before ';' token
 typedef ptw32_handle_t pthread_t;
                                 ^
./vp8/common/threading.h:31:24: error: expected identifier or '(' before 'unsigned'
 #define pthread_attr_t DWORD
                        ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/ethreading.c:11:
./vp8/common/threading.h:32:32: error: expected identifier or '(' before 'if'
 #define pthread_detach(thread) if(thread!=NULL)CloseHandle(thread)
                                ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/ethreading.c:11:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:955:55: error: macro "pthread_self" passed 1 arguments, but takes just 0
 PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);
                                                       ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/ethreading.c:11:
./vp8/common/threading.h:34:56: error: expected declaration specifiers or '...' before numeric constant
 #define pthread_cancel(thread) terminate_thread(thread,0)
                                                        ^
./vp8/common/threading.h:37:64: error: expected declaration specifiers or '...' before '(' token
 #define pthread_setspecific(ts_key, value) TlsSetValue(ts_key, (void *)value)
                                                                ^
./vp8/common/threading.h:36:37: error: conflicting types for 'TlsGetValue'
 #define pthread_getspecific(ts_key) TlsGetValue(ts_key)
                                     ^
In file included from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/winbase.h:29:0,
                 from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/windows.h:70,
                 from ./vp8/common/threading.h:26,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/ethreading.c:11:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/processthreadsapi.h:168:28: note: previous declaration of 'TlsGetValue' was here
   WINBASEAPI LPVOID WINAPI TlsGetValue (DWORD dwTlsIndex);
                            ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/ethreading.c:11:
vp8/encoder/ethreading.c: In function 'vp8cx_create_encoder_threads':
./vp8/common/threading.h:84:50: warning: value computed is not used [-Wunused-value]
 #define sem_init(sem, sem_attr1, sem_init_value) (int)((*sem = CreateSemaphore(NULL,0,32768,NULL))==NULL)
                                                  ^
vp8/encoder/ethreading.c:555:9: note: in expansion of macro 'sem_init'
         sem_init(&cpi->h_event_end_encoding, 0, 0);
         ^
./vp8/common/threading.h:84:50: warning: value computed is not used [-Wunused-value]
 #define sem_init(sem, sem_attr1, sem_init_value) (int)((*sem = CreateSemaphore(NULL,0,32768,NULL))==NULL)
                                                  ^
vp8/encoder/ethreading.c:573:13: note: in expansion of macro 'sem_init'
             sem_init(&cpi->h_event_start_encoding[ithread], 0, 0);
             ^
vp8/encoder/ethreading.c:580:33: warning: passing argument 3 of 'pthread_create' from incompatible pointer type [-Wincompatible-pointer-types]
                                 thread_encoding_proc, ethd);
                                 ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/ethreading.c:11:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:940:31: note: expected 'void * (__attribute__((__cdecl__)) *)(void *) {aka void * (*)(void *)}' but argument is of type 'DWORD (__attribute__((__stdcall__)) *)(void *)'
 PTW32_DLLPORT int PTW32_CDECL pthread_create (pthread_t * tid,
                               ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/ethreading.c:11:
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:592:17: note: in expansion of macro 'sem_destroy'
                 sem_destroy(&cpi->h_event_start_encoding[ithread]);
                 ^
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:594:13: note: in expansion of macro 'sem_destroy'
             sem_destroy(&cpi->h_event_end_encoding);
             ^
./vp8/common/threading.h:84:50: warning: value computed is not used [-Wunused-value]
 #define sem_init(sem, sem_attr1, sem_init_value) (int)((*sem = CreateSemaphore(NULL,0,32768,NULL))==NULL)
                                                  ^
vp8/encoder/ethreading.c:611:13: note: in expansion of macro 'sem_init'
             sem_init(&cpi->h_event_start_lpf, 0, 0);
             ^
./vp8/common/threading.h:84:50: warning: value computed is not used [-Wunused-value]
 #define sem_init(sem, sem_attr1, sem_init_value) (int)((*sem = CreateSemaphore(NULL,0,32768,NULL))==NULL)
                                                  ^
vp8/encoder/ethreading.c:612:13: note: in expansion of macro 'sem_init'
             sem_init(&cpi->h_event_end_lpf, 0, 0);
             ^
vp8/encoder/ethreading.c:615:59: warning: passing argument 3 of 'pthread_create' from incompatible pointer type [-Wincompatible-pointer-types]
             rc = pthread_create(&cpi->h_filter_thread, 0, thread_loopfilter,
                                                           ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/ethreading.c:11:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:940:31: note: expected 'void * (__attribute__((__cdecl__)) *)(void *) {aka void * (*)(void *)}' but argument is of type 'DWORD (__attribute__((__stdcall__)) *)(void *)'
 PTW32_DLLPORT int PTW32_CDECL pthread_create (pthread_t * tid,
                               ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/ethreading.c:11:
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:626:21: note: in expansion of macro 'sem_destroy'
                     sem_destroy(&cpi->h_event_start_encoding[ithread]);
                     ^
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:628:17: note: in expansion of macro 'sem_destroy'
                 sem_destroy(&cpi->h_event_end_encoding);
                 ^
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:629:17: note: in expansion of macro 'sem_destroy'
                 sem_destroy(&cpi->h_event_end_lpf);
                 ^
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:630:17: note: in expansion of macro 'sem_destroy'
                 sem_destroy(&cpi->h_event_start_lpf);
                 ^
vp8/encoder/ethreading.c: In function 'vp8cx_remove_encoder_threads':
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:661:17: note: in expansion of macro 'sem_destroy'
                 sem_destroy(&cpi->h_event_start_encoding[i]);
                 ^
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:668:9: note: in expansion of macro 'sem_destroy'
         sem_destroy(&cpi->h_event_end_encoding);
         ^
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:669:9: note: in expansion of macro 'sem_destroy'
         sem_destroy(&cpi->h_event_end_lpf);
         ^
./vp8/common/threading.h:87:59: warning: value computed is not used [-Wunused-value]
 #define sem_destroy(sem) if(*sem)((int)(CloseHandle(*sem))==TRUE)
                                                           ^
vp8/encoder/ethreading.c:670:9: note: in expansion of macro 'sem_destroy'
         sem_destroy(&cpi->h_event_start_lpf);
         ^
make[1]: *** [vp8/encoder/ethreading.c.o] Error 1
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/firstpass.c:18:
./vp8/common/threading.h:30:19: error: two or more data types in declaration specifiers
 #define pthread_t HANDLE
                   ^
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:585:33: error: expected identifier or '(' before ';' token
 typedef ptw32_handle_t pthread_t;
                                 ^
./vp8/common/threading.h:31:24: error: expected identifier or '(' before 'unsigned'
 #define pthread_attr_t DWORD
                        ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/firstpass.c:18:
./vp8/common/threading.h:32:32: error: expected identifier or '(' before 'if'
 #define pthread_detach(thread) if(thread!=NULL)CloseHandle(thread)
                                ^
In file included from ./vpx_util/vpx_thread.h:151:0,
                 from ./vp8/common/threading.h:184,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/firstpass.c:18:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/pthread.h:955:55: error: macro "pthread_self" passed 1 arguments, but takes just 0
 PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);
                                                       ^
In file included from vp8/encoder/onyx_int.h:25:0,
                 from vp8/encoder/firstpass.c:18:
./vp8/common/threading.h:34:56: error: expected declaration specifiers or '...' before numeric constant
 #define pthread_cancel(thread) terminate_thread(thread,0)
                                                        ^
./vp8/common/threading.h:37:64: error: expected declaration specifiers or '...' before '(' token
 #define pthread_setspecific(ts_key, value) TlsSetValue(ts_key, (void *)value)
                                                                ^


./vp8/common/threading.h:36:37: error: conflicting types for 'TlsGetValue'
 #define pthread_getspecific(ts_key) TlsGetValue(ts_key)
                                     ^
In file included from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/winbase.h:29:0,
                 from /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/windows.h:70,
                 from ./vp8/common/threading.h:26,
                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/firstpass.c:18:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/processthreadsapi.h:168:28: note: previous declaration of 'TlsGetValue' was here
   WINBASEAPI LPVOID WINAPI TlsGetValue (DWORD dwTlsIndex);
                            ^
make[1]: *** [vp8/encoder/firstpass.c.o] Error 1
make: *** [.DEFAULT] Error 2


Yunqing Wang

unread,
Jan 25, 2016, 2:24:25 PM1/25/16
to codec...@webmproject.org
Hi,

A fix regarding this patch was checked in. Please check out the top-of-tree code and redo your test. Let us know if errors still occur.

Yunqing


--
You received this message because you are subscribed to the Google Groups "Codec Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codec-devel...@webmproject.org.
To post to this group, send email to codec...@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/codec-devel/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.

neok...@gmail.com

unread,
Feb 5, 2016, 11:47:48 PM2/5/16
to Codec Developers
Still get error.
I updated to newest commit today (https://chromium.googlesource.com/webm/libvpx/+/def519efb33827c0a0b400e24bad2b4e0f49f18d)

2016년 1월 26일 화요일 오전 4시 24분 25초 UTC+9, Yunqing Wang 님의 말:

James Zern

unread,
Feb 6, 2016, 12:09:37 AM2/6/16
to codec...@webmproject.org
On Fri, Feb 5, 2016 at 8:47 PM, <neok...@gmail.com> wrote:
> Still get error.
> I updated to newest commit today
> (https://chromium.googlesource.com/webm/libvpx/+/def519efb33827c0a0b400e24bad2b4e0f49f18d)
>

This should take care of the issue:
https://chromium-review.googlesource.com/#/c/326487/

neok...@gmail.com

unread,
Feb 7, 2016, 2:21:04 AM2/7/16
to Codec Developers
Thanks for support
error occured at build

In file included from ./vp8/common/threading.h:69:0,

                 from vp8/encoder/onyx_int.h:25,
                 from vp8/encoder/encodemv.h:15,
                 from vp8/encoder/bitstream.c:13:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/semaphore.h:152:8: error: unknown type name 'mode_t'
        mode_t mode,
        ^

make[1]: *** [vp8/encoder/bitstream.c.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ./vp8/common/threading.h:69:0,

                 from ./vp8/encoder/onyx_int.h:25,
                 from vp8/vp8_cx_iface.c:21:
/home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/semaphore.h:152:8: error: unknown type name 'mode_t'
        mode_t mode,

        ^
make[1]: *** [vp8/vp8_cx_iface.c.o] Error 1
make: *** [.DEFAULT] Error 2


2016년 2월 6일 토요일 오후 2시 9분 37초 UTC+9, James Zern 님의 말:

James Zern

unread,
Feb 9, 2016, 9:36:38 PM2/9/16
to codec...@webmproject.org
Hi,

On Sat, Feb 6, 2016 at 11:21 PM, <neok...@gmail.com> wrote:
> Thanks for support
> When I was applied your code (
> https://chromium-review.googlesource.com/#/c/326487/ )
> error occured at build
>
> In file included from ./vp8/common/threading.h:69:0,
> from vp8/encoder/onyx_int.h:25,
> from vp8/encoder/encodemv.h:15,
> from vp8/encoder/bitstream.c:13:
> /home/kgpbuild/ffmpegbuild5/sandbox/mingw-w64-i686/include/semaphore.h:152:8:
> error: unknown type name 'mode_t'
> mode_t mode,
> ^
>

This seems like a separate issue. Most mingw semaphore.h files I've
seen have a test for MODE_T/HAVE_MODE_T and apply a fallback typedef
if necessary. You can try including sys/types.h before semaphore.h to
see if it helps.

jo...@johnwarburton.net

unread,
Feb 16, 2016, 2:07:57 PM2/16/16
to Codec Developers
Cross-compiling from GNU/Linux with gcc-5.3.0 and mingw-w64-4.0.4 to x86_64-w64-mingw32, your fix works for me.

#include <sys/types.h>
...immediately before semaphore.h makes the compile-time error go away.
 

neok...@gmail.com

unread,
Feb 17, 2016, 9:15:30 PM2/17/16
to Codec Developers
Thanks :)
It's resolved by add #include <sys/types.h> on semaphore.h

2016년 2월 10일 수요일 오전 11시 36분 38초 UTC+9, James Zern 님의 말:

neok...@gmail.com

unread,
Feb 17, 2016, 9:15:45 PM2/17/16
to Codec Developers, jo...@johnwarburton.net
Thanks :)
It's resolved by add #include <sys/types.h> on semaphore.h

2016년 2월 17일 수요일 오전 4시 7분 57초 UTC+9, jo...@johnwarburton.net 님의 말:
Reply all
Reply to author
Forward
0 new messages