[FFmpeg-devel] [FFmpeg-cvslog] Merge commit '7cb1d9e2dbbe5bf4652be5d78cdd68e956fa3d63'

Reino Wijnsma rwijnsma at xs4all.nl
Sat Oct 14 00:30:45 EEST 2017


On 13-10-2017 18:48, James Almer <jamrial at gmail.com> wrote:
> Are "-lshlwapi -lpthread -lcrypt32"
> extralibs you added manually, or were they derived from dependencies
> like libmpg123, vorbis, etc by pkg-config?
My configure line up until now with the manually added extra-libs:

# ./configure --arch=x86 --target-os=mingw32
--cross-prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-
--pkg-config=pkg-config --pkg-config-flags=--static
--extra-version=Reino --enable-gray --enable-version3 --disable-debug
--disable-doc --disable-htmlpages --disable-manpages --disable-podpages
--disable-schannel --disable-txtpages --disable-w32threads
--enable-avisynth --enable-avresample --enable-fontconfig
--enable-frei0r --enable-filter=frei0r --enable-gmp --enable-gnutls
*--extra-libs=-lcrypt32* --enable-gpl --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --extra-cflags=-DCACA_STATIC
--enable-libfdk-aac --enable-libflite --enable-libfreetype
--enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc
*--extra-libs=-lpthread* --enable-libmp3lame --enable-libmysofa
--enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenh264 --enable-libopenmpt *--extra-libs=-lshlwapi*
--enable-libopus --enable-librubberband --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxavs --enable-libxml2 --enable-libxvid --enable-libzimg
--enable-libzvbi --extra-cflags='-march=pentium3' --extra-cflags=-O2
--extra-cflags='-mfpmath=sse' --extra-cflags=-msse --enable-static
--disable-shared
--prefix=/cygdrive/m/ffmpeg-windows-build-helpers-master/native_build/windows/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32

> See if adding -lstdc++ fixes it.
It does. And since we're in the process of fixing the external library
checks in 'configure', I've removed all --extra-libs and --extra-cflags
entries from the configure line and I've made some changes to
'configure' until no more errors showed up.

_Libcaca_

-enabled libcaca           && require_pkg_config libcaca caca caca.h
caca_create_canvas
+enabled libcaca           && require_pkg_config libcaca caca caca.h
caca_create_canvas -DCACA_STATIC && add_cppflags -DCACA_STATIC
(see
https://github.com/Reino17/ffmpeg-windows-build-helpers/blob/master/cross_compile_ffmpeg.sh#L1652-L1653
)

Otherwise you'll get "undefined reference to `_imp__caca_create_canvas'"
and "ERROR: caca not found using pkg-config".

_Libilbc_

On 13-10-2017 20:09, James Almer <jamrial at gmail.com> wrote:
> With this, the check will include the needed pthreads ldflags when
> pkg-config is invoked with the --static flag.
My 'libilbc.pc' doesn't include -lpthread at all. Adding it here
manually works for me.

-enabled libilbc           && require libilbc ilbc.h
WebRtcIlbcfix_InitDecode -lilbc
+enabled libilbc           && require_pkg_config libilbc libilbc ilbc.h
WebRtcIlbcfix_InitDecode -lpthread

_Libmodplug_

-enabled libmodplug        && require_pkg_config libmodplug libmodplug
libmodplug/modplug.h ModPlug_Load
+enabled libmodplug        && require_pkg_config libmodplug libmodplug
libmodplug/modplug.h ModPlug_Load -DMODPLUG_STATIC && add_cppflags
-DMODPLUG_STATIC

Although I've replaced libmodplug for libopenmpt, I know FFmpeg's
'configure' needs this. I don't know the "undefined reference"-message
anymore.

_Libopenmpt_

-enabled libopenmpt        && require_pkg_config libopenmpt "libopenmpt
>= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create
+enabled libopenmpt        && require_pkg_config libopenmpt "libopenmpt
>= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++
-lshlwapi

Adding -lstdc++ fixes the 12000 errors I mentioned earlier, but without
-lshlwapi you'd still get:

/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xcb):
undefined reference to `_imp__PathIsRelativeW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x224):
undefined reference to `_imp__PathIsUNCW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x4e9):
undefined reference to `_imp__PathIsRelativeW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x670):
undefined reference to `_imp__PathIsUNCW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xd4b):
undefined reference to `_imp__PathCombineW at 12'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xf1b):
undefined reference to `_imp__PathIsRelativeW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x10c4):
undefined reference to `_imp__PathIsUNCW at 4'

_Librubberband_

-enabled librubberband     && require_pkg_config librubberband
"rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new
+enabled librubberband     && require_pkg_config librubberband
"rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++

Same sort of error-messages as with libopenmpt.

_Libsnappy_

-enabled libsnappy         && require libsnappy snappy-c.h
snappy_compress -lsnappy
+enabled libsnappy         && require libsnappy snappy-c.h
snappy_compress -lsnappy -lstdc++

Same sort of error-messages as with libopenmpt.

_Libtwolame_

-enabled libtwolame        && require libtwolame twolame.h twolame_init
-ltwolame &&
+enabled libtwolame        && require libtwolame twolame.h twolame_init
-ltwolame -DLIBTWOLAME_STATIC && add_cppflags -DLIBTWOLAME_STATIC &&

Otherwise you'll get "undefined reference to `_imp__twolame_init'" and
"ERROR: libtwolame not found".

_Libzvbi_

-enabled libzvbi           && require libzvbi libzvbi.h vbi_decoder_new
-lzvbi &&
+enabled libzvbi           && require_pkg_config libzvbi zvbi-0.2
libzvbi.h vbi_decoder_new &&

Otherwise you'll get lots of "undefined reference to
`pthread_mutex_[...]'" errors.

zvbi-0.2.pc:

prefix=/cygdrive/[...]
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: ZVBI
Description: VBI Capturing and Decoding Library
Requires:
Version: 0.2.35
Libs: -L${libdir} -lzvbi -lm -lpthread -lwsock32  -lpthread  -lm -liconv
Cflags: -I${includedir}

This way all the libraries get loaded, including -lpthread.


And this works. No more errors during ./configure, but then...

[...]
CC      fftools/ffmpeg_cuvid.o
LD      ffmpeg_g.exe
/cygdrive/[...]/lib/libgnutls.a(sha256-ssse3-x86.o): warning: common of
`_gnutls_x86_cpuid_s' overridden by definition
/cygdrive/[...]/lib/libgnutls.a(x86-common.o): warning: defined here
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xcb):
undefined reference to `_imp__PathIsRelativeW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x224):
undefined reference to `_imp__PathIsUNCW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x4e9):
undefined reference to `_imp__PathIsRelativeW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x670):
undefined reference to `_imp__PathIsUNCW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xd4b):
undefined reference to `_imp__PathCombineW at 12'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0xf1b):
undefined reference to `_imp__PathIsRelativeW at 4'
/cygdrive/[...]/lib/libmpg123.a(compat.o):compat.c:(.text+0x10c4):
undefined reference to `_imp__PathIsUNCW at 4'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0xe66):
undefined reference to `_imp__CertGetCertificateContextProperty at 16'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x1652):
undefined reference to `_imp__CertOpenSystemStoreA at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x168e):
undefined reference to `_imp__CertFindCertificateInStore at 24'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x16b1):
undefined reference to `_imp__CertGetCertificateContextProperty at 16'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x192d):
undefined reference to `_imp__CertFreeCertificateContext at 4'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x193f):
undefined reference to `_imp__CertCloseStore at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2167):
undefined reference to `_imp__CertOpenSystemStoreA at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x21a3):
undefined reference to `_imp__CertFindCertificateInStore at 24'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x21f0):
undefined reference to `_imp__CertFreeCertificateContext at 4'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x221d):
undefined reference to `_imp__CertCloseStore at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x23ad):
undefined reference to `_imp__CertCloseStore at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x249f):
undefined reference to `_imp__CertOpenSystemStoreA at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x255b):
undefined reference to `_imp__CertEnumCertificatesInStore at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x26db):
undefined reference to `_imp__CertOpenSystemStoreA at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2735):
undefined reference to `_imp__CertFindCertificateInStore at 24'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x277b):
undefined reference to `_imp__CertGetCertificateContextProperty at 16'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x27cd):
undefined reference to `_imp__CertCloseStore at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x286f):
undefined reference to `_imp__CertDeleteCertificateFromStore at 4'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2ab5):
undefined reference to `_imp__CertCloseStore at 8'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2d70):
undefined reference to `_imp__PFXImportCertStore at 12'
/cygdrive/[...]/lib/libgnutls.a(keys-win.o):keys-win.c:(.text+0x2e7f):
undefined reference to `_imp__CertFindCertificateInStore at 24'
/cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0xe0): undefined
reference to `_imp__CertOpenSystemStoreA at 8'
/cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0xf5): undefined
reference to `_imp__CertEnumCertificatesInStore at 8'
/cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0x1fb):
undefined reference to `_imp__CertCloseStore at 8'
/cygdrive/[...]/lib/libgnutls.a(certs.o):certs.c:(.text+0x230):
undefined reference to `_imp__CertOpenSystemStoreA at 8'
collect2: error: ld returned 1 exit status
make: *** [Makefile:107: ffmpeg_g.exe] Error 1

...and I have no idea yet why this is happening.

-- Reino


More information about the ffmpeg-devel mailing list