[FFmpeg-devel] Configure: commit 6dfcbd80ad446ff163b47f2bf432bbf706436ea8 broke my builds

hydra3333 at gmail.com hydra3333 at gmail.com
Sun Oct 15 02:46:04 EEST 2017


Hello. Per ticket https://trac.ffmpeg.org/ticket/6731 I too am having 
trouble cross-compiling ffmpeg.

This is the configure being used
    ./configure --arch=x86 --target-os=mingw32 --cross-prefix=/home/u/Desktop/ffmpeg-windows-build-helpers-withOpenCL-master/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32- 
 --pkg-config=pkg-config --pkg-config-flags=--static --enable-gray --enable-version3 
 --disable-debug --disable-doc --disable-htmlpages --disable-manpages --disable-podpages 
 --disable-txtpages --disable-w32threads --enable-nvenc --enable-cuda --enable-cuvid 
 --enable-d3d11va --enable-libsoxr --enable-fontconfig  --enable-libass --enable-libbluray 
 --enable-iconv --enable-libtwolame  --enable-libzvbi --enable-libcaca --enable-libmodplug 
 --extra-libs=-lstdc++ --extra-libs=-lpng --extra-libs=-loleaut32  --enable-libmp3lame 
 --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora 
  --enable-libspeex --enable-libopenjpeg --enable-gnutls  --enable-libgsm --enable-libfreetype 
 --enable-libopus  --enable-bzlib --enable-libopencore-amrnb --enable-libopencore-amrwb 
 --enable-libvo-amrwbenc --enable-libvpx  --enable-libilbc --enable-libwavpack 
 --enable-libwebp --enable-libgme --enable-dxva2 --enable-gray  --enable-libopenh264 
 --enable-libmysofa --enable-libflite --enable-lzma --enable-libsnappy --enable-libzimg 
 --enable-libbs2b  --enable-gmp --enable-libfribidi  --enable-cross-compile  
--enable-pic  --extra-libs=-lpsapi --extra-libs=-lspeexdsp  --disable-schannel 
  --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC 
 --enable-gpl --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-librubberband 
 --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid 
 --enable-libmfx  --enable-avresample  --enable-libcdio  --extra-cflags=-mtune=generic 
 --extra-cflags=-O3 --enable-static --disable-shared --prefix=/home/u/Desktop/ffmpeg-windows-build-helpers-withOpenCL-master/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32 
 --enable-nonfree --enable-decklink --enable-libfdk-aac --enable-opencl  --enable-runtime-cpudetect 
  --disable-libx264 --extra-libs=-lpthread --extra-libs=-lcrypt32 --extra-libs=-lstdc++ 
 --extra-libs=-lass --extra-libs=-lfontconfig --extra-libs=-lexpat --extra-libs=-lfribidi 
 --extra-libs=-lfreetype --extra-libs=-lharfbuzz --extra-libs=-lbz2 --extra-libs=-llzma 
 --extra-libs=-liconv --extra-libs=-lcdio --extra-libs=-lcdio_paranoia --extra-libs=-lz 
 --extra-libs=-lm --extra-libs=-lpsapi --extra-libs=-lspeexdsp

And this is a part of my script in which I am adding libraries one by one 
once I see what error message appears in each subsequent attempt to build (I 
started with a set I saw in another post somewhere).
    # 2017.10.14 - START add this for various errors per 
https://patchwork.ffmpeg.org/patch/5540/ - removed from being extralibs 
being global any more ?
    config_options+=" --extra-libs=-lpthread"
    config_options+=" --extra-libs=-lcrypt32"
    config_options+=" --extra-libs=-lstdc++"
    config_options+=" --extra-libs=-lass"
    config_options+=" --extra-libs=-lfontconfig"
    config_options+=" --extra-libs=-lexpat"
    config_options+=" --extra-libs=-lfribidi"
    config_options+=" --extra-libs=-lfreetype"
    config_options+=" --extra-libs=-lharfbuzz"
    config_options+=" --extra-libs=-lpsapi" # dlfcn [frei0r?] requires this, 
has no .pc file should put in frei0r.pc? ...
    config_options+=" --extra-libs=-lspeexdsp" # libebur :|
    config_options+=" --extra-libs=-lbz2"
    config_options+=" --extra-libs=-llzma"
    config_options+=" --extra-libs=-liconv"
    config_options+=" --extra-libs=-lcdio"
    config_options+=" --extra-libs=-lcdio_paranoia"
    config_options+=" --extra-libs=-lz"
    config_options+=" --extra-libs=-lm"
    config_options+=" --extra-libs=-lgdi32"

However I'm not quite sure what to do when I see the following errors in 
config.log, so advice would be appreciated.

/home/u/Desktop/ffmpeg-windows-build-helpers-withOpenCL-master/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-gcc 
 -Wl,--large-address-aware -Wl,--nxcompat,--dynamicbase -Wl,--as-needed -Wl,--pic-executable,-e,_mainCRTStartup 
 -o /tmp/ffconf.a5swywFH/test.exe 
/tmp/ffconf.a5swywFH/test.o -lcdio_paranoia -lcdio_cdda -lcdio -lspeexdsp -lpsapi 
 -lm -lz -lcdio_paranoia -lcdio -liconv -llzma -lbz2 -lharfbuzz -lfreetype -lfribidi 
 -lexpat -lfontconfig -lass -lstdc++ -lcrypt32 -lpthread -lspeexdsp -lpsapi  
-loleaut32 -lpng -lstdc++
/home/u/Desktop/ffmpeg-windows-build-helpers-withOpenCL-master/sandbox/cross_compilers/mingw-w64-i686/lib/gcc/i686-w64-mingw32/7.2.0/../../../../i686-w64-mingw32/lib/../lib/libcdio.a(win32.o):win32.c:(.text+0x80): 
undefined reference to `_imp__mciSendCommandA at 16'
/home/u/Desktop/ffmpeg-windows-build-helpers-withOpenCL-master/sandbox/cross_compilers/mingw-w64-i686/lib/gcc/i686-w64-mingw32/7.2.0/../../../../i686-w64-mingw32/lib/../lib/libcdio.a(win32.o):win32.c:(.text+0xa2): 
undefined reference to `_imp__mciGetErrorStringA at 12'
/home/u/Desktop/ffmpeg-windows-build-helpers-withOpenCL-master/sandbox/cross_compilers/mingw-w64-i686/lib/gcc/i686-w64-mingw32/7.2.0/../../../../i686-w64-mingw32/lib/../lib/libcdio.a(aspi32.o):aspi32.c:(.text+0x1b9a): 
undefined reference to `_imp__mciSendCommandA at 16'
<snip lots>
/home/u/Desktop/ffmpeg-windows-build-helpers-withOpenCL-master/sandbox/cross_compilers/mingw-w64-i686/lib/gcc/i686-w64-mingw32/7.2.0/../../../../i686-w64-mingw32/lib/../lib/libcdio.a(aspi32.o):aspi32.c:(.text+0x3205): 
undefined reference to `_imp__mciGetErrorStringA at 12'
/home/u/Desktop/ffmpeg-windows-build-helpers-withOpenCL-master/sandbox/cross_compilers/mingw-w64-i686/lib/gcc/i686-w64-mingw32/7.2.0/../../../../i686-w64-mingw32/lib/../lib/libcdio.a(aspi32.o):aspi32.c:(.text+0x3236): 
undefined reference to `_imp__mciGetErrorStringA at 12'
collect2: error: ld returned 1 exit status
ERROR: No usable libcdio/cdparanoia found

From: James Almer
Sent: Sunday, October 15, 2017 1:05 AM
To: ffmpeg-devel at ffmpeg.org
Subject: Re: [FFmpeg-devel] Configure: commit 
6dfcbd80ad446ff163b47f2bf432bbf706436ea8 broke my builds

On 10/14/2017 7:48 AM, Mark Himsley wrote:
> Update: for me with my specific set of libraries, I have had to apply
> this patch to configure in order to make configure accept my
> configuration parameters: specifically changes to mp3lame, openjpeg
> 1.5, x265 and xvid.
>
> diff --git a/configure b/configure
> index dfbc251..67c012d 100755
> --- a/configure
> +++ b/configure
> @@ -6008,7 +6008,7 @@ enabled libkvazaar        && require_pkg_config
> libkvazaar "kvazaar >= 0.8.1" kv
>  enabled libmfx            && { use_pkg_config libmfx libmfx
> "mfx/mfxvideo.h" MFXInit ||
>                                 { require libmfx "mfx/mfxvideo.h"
> MFXInit -llibmfx && warn "using libmfx without pkg-config"; } }
>  enabled libmodplug        && require_pkg_config libmodplug libmodplug
> libmodplug/modplug.h ModPlug_Load
> -enabled libmp3lame        && require "libmp3lame >= 3.98.3"
> lame/lame.h lame_set_VBR_quality -lmp3lame
> +enabled libmp3lame        && require "libmp3lame >= 3.98.3"
> lame/lame.h lame_set_VBR_quality -lmp3lame -lm

Will fix this. Thanks.

>  enabled libmysofa         && require libmysofa "mysofa.h" 
> mysofa_load -lmysofa
>  enabled libnpp            && { check_lib libnpp npp.h
> nppGetLibVersion -lnppig -lnppicc -lnppc ||
>                                 check_lib libnpp npp.h
> nppGetLibVersion -lnppi -lnppc ||
> @@ -6027,7 +6027,7 @@ enabled libopenjpeg       && { { check_lib
> libopenjpeg openjpeg-2.3/openjpeg.h o
>                                 { check_lib libopenjpeg
> openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC &&
> add_cppflags -DOPJ_STATIC; } ||
>                                 check_lib libopenjpeg
> openjpeg-2.1/openjpeg.h opj_version -lopenjp2 ||
>                                 { check_lib libopenjpeg
> openjpeg-2.0/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC &&
> add_cppflags -DOPJ_STATIC; } ||
> -                               { check_lib libopenjpeg
> openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC &&
> add_cppflags -DOPJ_STATIC; } ||
> +                               { check_lib libopenjpeg
> openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -lm -DOPJ_STATIC &&
> add_cppflags -DOPJ_STATIC; } ||
>                                 { check_lib libopenjpeg openjpeg.h
> opj_version -lopenjpeg -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
>                                 die "ERROR: libopenjpeg not found"; }

OpenJPEG will be solved soon by switching to pkg-config (which adds the
math library ldflag).

>  enabled libopenmpt        && require_pkg_config libopenmpt
> "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create
> @@ -6096,10 +6096,10 @@ enabled libx264           && { use_pkg_config
> libx264 x264 "stdint.h x264.h" x26
>                               require_cpp_condition x264.h "X264_BUILD
>> = 118" &&
>                               { check_cpp_condition x264.h "X264_MPEG2" &&
>                                 enable libx262; }
> -enabled libx265           && require_pkg_config libx265 x265 x265.h
> x265_api_get &&
> +enabled libx265           && require_pkg_config libx265 x265 x265.h
> x265_api_get -lpthread &&

This one should be fixed by x265. It's them who should add a pthreads
dependency on their pkg-config file for static builds if it's required.

>                               require_cpp_condition x265.h "X265_BUILD >= 
> 68"
>  enabled libxavs           && require libxavs "stdint.h xavs.h"
> xavs_encoder_encode -lxavs
> -enabled libxvid           && require libxvid xvid.h 
> xvid_global -lxvidcore
> +enabled libxvid           && require libxvid xvid.h xvid_global
> -lxvidcore -lpthread -lm

Will fix it.

>  enabled libzimg           && require_pkg_config libzimg "zimg >=
> 2.3.0" zimg.h zimg_get_api_version
>  enabled libzmq            && require_pkg_config libzmq libzmq zmq.h 
> zmq_ctx_new
>  enabled libzvbi           && require libzvbi libzvbi.h
> vbi_decoder_new -lzvbi &&
>
>
>
> On 14 October 2017 at 11:00, Mark Himsley <mark.himsley at gmail.com> wrote:
>> I build FFmpeg and all the libraries I need every night. Since 08:00
>> BST on 12-Oct-2017 that build has not worked, the previous build on
>> 11-Oct-2017 worked.
>>
>> My configure command for building 64bit Linux that is run on an Ubuntu
>> 16.04 system, which worked on Wednesday but not on Thursday, is:
>>
>> ./configure --extra-version=static_x86_64-pc-linux-gnu
>> --extra-cflags="--static -static" --extra-libs="-static"
>> --pkg-config-flags="--static" --cross-prefix= --arch=x86_64
>> --target-os=linux --prefix="/opt/bbc/ff_lib" --enable-gpl
>> --enable-nonfree --disable-ffplay --disable-dxva2 --enable-libmp3lame
>> --enable-libfdk-aac --enable-libspeex --enable-libtheora
>> --enable-libvorbis --enable-libopus --enable-libopenjpeg
>> --enable-libvpx --enable-libxvid --enable-libx264 --enable-libx265
>>
>> (yes, the configure contains options, like cross-prefix and arch and
>> target that are not necessarily normally needed, but I build for
>> Linux, Windows 32 and 64 bit static binaries and macOS static binary
>> with the same configure command but with different variable
>> substitutions)
>>
>> The configure.log extract is:
>>
>> ...
>> require libmp3lame >= 3.98.3 lame/lame.h lame_set_VBR_quality -lmp3lame
>> check_lib libmp3lame lame/lame.h lame_set_VBR_quality -lmp3lame
>> check_func_headers lame/lame.h lame_set_VBR_quality -lmp3lame
>> check_ld cc -lmp3lame
>> check_cc
>> BEGIN /tmp/ffconf.Daqbd9DA/test.c
>>     1   #include <lame/lame.h>
>>     2   #include <stdint.h>
>>     3   long check_lame_set_VBR_quality(void) { return (long)
>> lame_set_VBR_quality; }
>>     4   int main(void) { int ret = 0;
>>     5    ret |= ((intptr_t)check_lame_set_VBR_quality) & 0xFFFF;
>>     6   return ret; }
>> END /tmp/ffconf.Daqbd9DA/test.c
>> gcc --static -static -I/opt/bbc/ff_lib/include -D_ISOC99_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112
>> -D_XOPEN_SOURCE=600 --static -static -I/opt/bbc/ff_lib/include
>> --static -static -std=c11 -fomit-frame
>> -pointer -pthread -I/opt/bbc/ff_lib/include -c -o
>> /tmp/ffconf.Daqbd9DA/test.o /tmp/ffconf.Daqbd9DA/test.c
>> gcc -L/opt/bbc/ff_lib/lib -static -Wl,--as-needed -Wl,-z,noexecstack
>> -o /tmp/ffconf.Daqbd9DA/test /tmp/ffconf.Daqbd9DA/test.o -lmp3lame
>> -static
>> /opt/bbc/ff_lib/lib/libmp3lame.a(gain_analysis.o): In function 
>> `AnalyzeSamples':
>> gain_analysis.c:(.text+0xedd): undefined reference to `log10'
>> /opt/bbc/ff_lib/lib/libmp3lame.a(gain_analysis.o): In function 
>> `analyzeResult':
>> gain_analysis.c:(.text+0x12aa): undefined reference to `ceil'
>> /opt/bbc/ff_lib/lib/libmp3lame.a(lame.o): In function `filter_coef':
>> lame.c:(.text+0xb1): undefined reference to `cos'
>> /opt/bbc/ff_lib/lib/libmp3lame.a(lame.o): In function `lame_init_params':
>> lame.c:(.text+0x320c): undefined reference to `pow'
>> lame.c:(.text+0x3463): undefined reference to `powf'
>> /opt/bbc/ff_lib/lib/libmp3lame.a(lame.o): In function 
>> `lame_print_internals':
>> lame.c:(.text+0x4613): undefined reference to `log10'
>> ...
>>
>> Etc. Which suggests to me that -lm is missing.
>>
>> When I checkout 58143b15adda6391ec07f3eb19e80ed91d801edd, the parent
>> of 6dfcbd80ad446ff163b47f2bf432bbf706436ea8, my configure works.
>> When I checkout 6dfcbd80ad446ff163b47f2bf432bbf706436ea8 my configure 
>> fails.
>>
>>
>> If I edit configure to add -lm to the mp3lame tests, which works for
>> that library, the next library test fails in a similar way. I think
>> 6dfcbd80ad446ff163b47f2bf432bbf706436ea8 has done sevear damage to the
>> configuration of FFmpeg. I wonder if building static was considered,
>> or whether my configure command line is not passing the right
>> parameters to make a static builds.
>>
>> --
>> Mark Himsley
>
>
>

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel 



More information about the ffmpeg-devel mailing list