Help with issues on trying to compile ffmpeg with pthreads support

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

Help with issues on trying to compile ffmpeg with pthreads support

Pardeep Puar
Here is the configure command I am using:
./configure --prefix=/c/dev/ffmpeg-build-shared --enable-memalign-hack
--enable-pthreads --disable-network --enable-shared --disable-static
Here is the error message I am getting:
In file included from
c:\msys\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/pthr
ead.h:288,
                 from libavcodec/pthread.c:24:
c:\msys\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/sche
d.h:152: error: expected ')' before 'pid'
c:\msys\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/sche
d.h:154: error: expected ')' before 'pid'
make: *** [libavcodec/pthread.o] Error 1
 
Is there a problem with using pthreads with ffmpeg?
Thanks
Pardeep
Reply | Threaded
Open this post in threaded view
|

Re: Help with issues on trying to compile ffmpeg with pthreads support

Ross Johnson-2
I would guess that pid_t isn't defined.

In sched.h line 116 you'll find:-

#if defined(__MINGW32__) || defined(_UWIN)
#if PTW32_LEVEL >= PTW32_LEVEL_MAX
/* For pid_t */
#  include <sys/types.h>
/* Required by Unix 98 */
#  include <time.h>
#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
#else
typedef int pid_t;
#endif

PTW32_LEVEL is defined in pthread.h and is generally equal to
PTW32_LEVEL_MAX (also defined in pthread.h), otherwise pid_t will not be
defined, which is a bug. Could you try changing this to:

#if defined(__MINGW32__) || defined(_UWIN)
#if PTW32_LEVEL >= PTW32_LEVEL_MAX
/* For pid_t */
#  include <sys/types.h>
/* Required by Unix 98 */
#  include <time.h>
#else
typedef int pid_t;
#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */
#else
typedef int pid_t;
#endif

Check also that pid_t is defined in sys/types.h.

Ross

Pardeep Puar wrote:

> Here is the configure command I am using:
> ./configure --prefix=/c/dev/ffmpeg-build-shared --enable-memalign-hack
> --enable-pthreads --disable-network --enable-shared --disable-static
> Here is the error message I am getting:
> In file included from
> c:\msys\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/pthr
> ead.h:288,
>                  from libavcodec/pthread.c:24:
> c:\msys\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/sche
> d.h:152: error: expected ')' before 'pid'
> c:\msys\mingw\bin\../lib/gcc/mingw32/4.2.1-sjlj/../../../../include/sche
> d.h:154: error: expected ')' before 'pid'
> make: *** [libavcodec/pthread.o] Error 1
>  
> Is there a problem with using pthreads with ffmpeg?
> Thanks
> Pardeep
>