[FFmpeg-devel] [PATCH] Fix compilation of static libraries with pthreads in MingW32
Horacio Sanson
hsanson
Mon Oct 5 12:27:47 CEST 2009
On Sun, Sep 6, 2009 at 8:47 AM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
> On Mon, Aug 31, 2009 at 7:32 AM, Horacio Sanson<hsanson at gmail.com> wrote:
>> FFMpeg static libraries fail to compile with the --enable-pthreads
>> switch in a MingW32 environment. Before
>> I used this patch
>> "http://ffmpeg.arrozcru.org/wiki/images/d/dd/Ffmpeg_r15966_static_pthreads.diff"
>> but it no
>> longer applies to the latest SVN.
>>
>> I am no expert making make files and need some help to improve this line:
>>
>> -enabled libx264 ? ?&& require ?libx264 x264.h x264_encoder_open -lx264 -lm &&
>> +enabled libx264 ? ?&& require2 libx264 "stdint.h x264.h"
>> x264_encoder_open -lx264 -lpthreadGC2 -lws2_32 -lm &&
>>
>> I am pretty sure adding "-lpthreadGC2 -lws2_32" is not correct as
>> pthreads depends on the configure flags but I do not
>> know how the correct way to do this. Without these flags added after
>> -lx264 I get unresolved symbol errors.
>
> This has already been discussed in
> http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/67185
>
> I now patch pthreads-win32 to automatically initialize itself. More
> information here:
> http://ffmpeg.arrozcru.org/autobuilds/blog/2009/07/17/pthreads-win32-updated-important/
>
> It still requires a (simpler) patch for FFmpeg that can be found here:
> http://ffmpeg.arrozcru.org/autobuilds/howto/static/
>
> inside the latest packages under patches/ffmpeg-mingw32.diff
>
Thanks, I tried these patches (pthread and ffmpeg) and I was able to
compile ffmpeg (r20167) statically with pthread support. Unfortunately
ffmpeg crashed on all my tests encoding with x264. I also recompiled
x264 to use your pthreads library with your patch applied.
Note: I run Windows Vista Ultimate.
regards
Horacio
>> Also I ran the regression tests and "asf" failed (see output below)
>> but I think this has nothing to do with this changes.
>
> I think you didn't understand how the regression tests work. The last line says:
>
> [...]
>> seek regression test: success
>
> Ramiro Polla
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list