[FFmpeg-devel] Configure: commit 6dfcbd80ad446ff163b47f2bf432bbf706436ea8 broke my builds
Mark Himsley
mark.himsley at gmail.com
Sat Oct 14 13:48:49 EEST 2017
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
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"; }
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 &&
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
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
--
Mark Himsley
More information about the ffmpeg-devel
mailing list