ffmpeg-git in MinGW -- My Summary...

Issues that occur when trying to compile FFmpeg.

ffmpeg-git in MinGW -- My Summary...

Postby jiapei100 » Mon Aug 13, 2012 10:22 am

Hi, all:

With all my built 3rd party libraries with the environment Windows 7 + MinGW, I can successfully configure ffmpeg-git with the following command:

Code: Select all
$ ./configure --enable-gpl --enable-nonfree --enable-version3 --enable-shared  --enable-memalign-hack  --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs=-lnut --enable-bzlib --enable-zlib --enable-libass --enable-libfaac --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-openssl


However, there are still 4 errors I can't remove:
1) --enable-libopenjpeg
gcc -L/usr/local/lib -Wl,--as-needed -o /tmp/ffconf.rClgeqzg.exe /tmp/ffconf.fgDeWVFz.o -lopenjpeg -lopencore-amrwb -lopencore-amrnb -lnut -lmp3lame -lgsm -LC:/MinGW/msys/1.0/local/lib -lfreetype -lfaac -LC:/MinGW/msys/1.0/local/lib -lass -lm -lbz2 -lz -lpsapi -lshell32 -lnut
C:/Users/pei/AppData/Local/Temp/ffconf.fgDeWVFz.o:ffconf.iLLVNMsK.c:(.text+0xc): undefined reference to `opj_version'
collect2: ld returned 1 exit status
ERROR: libopenjpeg not found

Question: How to define `opj_version'? Should `opj_version' be defined during the process of building libopenjpeg?

2) --enable-libschroedinger
gcc -L/usr/local/lib -Wl,--as-needed -IC:/MinGW/msys/1.0/local/include -LC:/MinGW/msys/1.0/local/lib -o /tmp/ffconf.pyclDYWp.exe /tmp/ffconf.CBDPEayb.o -lrtmp -lz -lssl -lcrypto -lopencore-amrwb -lopencore-amrnb -lnut -lmp3lame -lgsm -LC:/MinGW/msys/1.0/local/lib -lfreetype -lfaac -LC:/MinGW/msys/1.0/local/lib -lass -lm -lbz2 -lz -lpsapi -lshell32 -lnut
check_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
ERROR: schroedinger-1.0 not found

Question: Apparently, when building schroedinger-1.0.11, there is an error
wavelet_max_gain.o: In function 'orc_interleave2_s16':
...\schroedinger-1.0.11\testsuite/../schroedinger/schroorc.h:1274: undefined reference to '_orc_code_orc_interleave2_s16'
collect2: ld returned 1 exit status
make[3]: *** [wavelet_max_gain.exe] Error 1
make[3]: Leaving directory '.../schroedinger-1.0.11/testsuite'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '.../schroedinger-1.0.11/testsuite'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '.../schroedinger-1.0.11'
make: *** [all] Error 2

However, after all,
libschroedinger-1.0.a
libschroedinger-1.0.dll.a
libschroedinger-1.0.la
libschroedinger-1.0-0.dll

have been produced.

3) --enable-libx264
gcc -L/usr/local/lib -Wl,--as-needed -o /tmp/ffconf.kbdsYlEE.exe /tmp/ffconf.DqJImaAw.o -lx264 -lvpx -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lspeex -LC:/MinGW/msys/1.0/local/lib -lrtmp -lz -lssl -lcrypto -lopencore-amrwb -lopencore-amrnb -lnut -lmp3lame -lgsm -LC:/MinGW/msys/1.0/local/lib -lfreetype -lfaac -LC:/MinGW/msys/1.0/local/lib -lass -lm -lbz2 -lz -lpsapi -lshell32 -lnut
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0x2c52): undefined reference to `_imp__pthread_self'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0x2c7b): undefined reference to `_imp__pthread_getschedparam'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0x2c99): undefined reference to `_imp__pthread_setschedparam'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0x8952): undefined reference to `_imp__pthread_mutex_init'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0x8972): undefined reference to `_imp__pthread_cond_init'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0xb47c): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0xb497): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0xb4a9): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0xde8a): undefined reference to `_imp__pthread_mutex_destroy'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0xdf87): undefined reference to `_imp__pthread_cond_destroy'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0xe6a6): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(encoder.o):encoder.c:(.text+0xe6e7): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(cpu.o):cpu.c:(.text+0x601): undefined reference to `_imp__pthread_num_processors_np'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x5c8): undefined reference to `_imp__pthread_mutex_destroy'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x5d7): undefined reference to `_imp__pthread_cond_destroy'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2aa2): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2ab7): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2abc): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2afa): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2b08): undefined reference to `_imp__pthread_cond_wait'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2b30): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2b62): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2b7b): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2b80): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2bba): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2bc8): undefined reference to `_imp__pthread_cond_wait'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x2bf0): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x36e7): undefined reference to `_imp__pthread_mutex_init'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3706): undefined reference to `_imp__pthread_cond_init'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3c43): undefined reference to `_imp__pthread_mutex_init'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3c50): undefined reference to `_imp__pthread_cond_init'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3ca1): undefined reference to `_imp__pthread_mutex_destroy'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3ca7): undefined reference to `_imp__pthread_cond_destroy'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3d1b): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3d29): undefined reference to `_imp__pthread_cond_wait'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3d58): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3d5d): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3d83): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3d90): undefined reference to `_imp__pthread_cond_wait'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3dc2): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(frame.o):frame.c:(.text+0x3dcb): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x28): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x3e): undefined reference to `_imp__pthread_cond_wait'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x66): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x8e): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x1fb): undefined reference to `_imp__pthread_create'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x2cb): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x30b): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x34c): undefined reference to `_imp__pthread_cond_wait'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x373): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x385): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x38e): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(threadpool.o):threadpool.c:(.text+0x39b): undefined reference to `_imp__pthread_join'
C:/MinGW/msys/1.0/local/lib/libx264.a(analyse.o):analyse.c:(.text+0x29694): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(analyse.o):analyse.c:(.text+0x29707): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x6c): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x101): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x124): undefined reference to `_imp__pthread_cond_wait'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x175): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x1e9): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x1f3): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x204): undefined reference to `_imp__pthread_cond_wait'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x345): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x4fb): undefined reference to `_imp__pthread_create'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x5ce): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x5e9): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x5fb): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x61c): undefined reference to `_imp__pthread_join'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x6c1): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x702): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x76e): undefined reference to `_imp__pthread_mutex_lock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x78b): undefined reference to `_imp__pthread_cond_wait'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x800): undefined reference to `_imp__pthread_cond_broadcast'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x812): undefined reference to `_imp__pthread_mutex_unlock'
C:/MinGW/msys/1.0/local/lib/libx264.a(lookahead.o):lookahead.c:(.text+0x91f): undefined reference to `_imp__pthread_cond_broadcast'
collect2: ld returned 1 exit status
ERROR: libx264 not found

Question: Clearly, MinGW comes with pthread. It's not under
C:\MinGW\msys\1.0\lib
C:\MinGW\msys\1.0\local\lib

but under
C:\MinGW\lib


4) --enable-libxvid
gcc -L/usr/local/lib -Wl,--as-needed -o /tmp/ffconf.jOMPEgHE.exe /tmp/ffconf.bYOJRCnI.o -lxvidcore -lvpx -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lspeex -LC:/MinGW/msys/1.0/local/lib -lrtmp -lz -lssl -lcrypto -lopencore-amrwb -lopencore-amrnb -lnut -lmp3lame -lgsm -LC:/MinGW/msys/1.0/local/lib -lfreetype -lfaac -LC:/MinGW/msys/1.0/local/lib -lass -lm -lbz2 -lz -lpsapi -lshell32 -lnut
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot find -lxvidcore
collect2: ld returned 1 exit status
ERROR: libxvid not found

Question: It seems when building xvidcore, the produced library is named as xvidcore.a, instead of libxvidcore.a ...


Anyway, please do help....


Cheers
Pei
jiapei100
 
Posts: 26
Joined: Sun Mar 25, 2012 7:46 pm
Location: Surrey, BC, Canada

Re: ffmpeg-git in MinGW -- My Summary...

Postby rogerdpack » Tue Aug 14, 2012 7:31 pm

again I'd go with my script:
https://github.com/rdp/ffmpeg-windows-build-helpers
the pthread errors come from not having a working pthread emulation library installed (or, in the script's case, it just configure libx264 with --enable-w32threads or something, so it doesn't rely on pthreads at all).

with libxvid you have to do some renaming, see the script.
-roger-
rogerdpack
 
Posts: 1454
Joined: Fri Aug 05, 2011 9:56 pm


Return to Compiling Issues

Who is online

Users browsing this forum: No registered users and 4 guests