[FFmpeg-user] ffmpeg > 5.0 refuses to build with x264-static

Reindl Harald h.reindl at thelounge.net
Thu Mar 2 18:28:04 EET 2023



Am 02.03.23 um 08:38 schrieb Ferdi Scholten:
>>> ERROR: x264 not found using pkg-config
>>
>> So, what are the contents of x264.pc
>> and, what is the result of pkg-config --debug x264
>>
>> pkg-config is telling the linker how to link the library, If it is not 
>> found or incorrect you will get the not found message from configure
> On closer inspection, you might try adding
> 
> --pkg-config-flags="--static" to your ./configure commandline to inform 
> pkg-config that you are using statically linked libraries otherwise it 
> assumes dynamically linked libraries

x264 works with your suggestions, x265 which are ordinary Fedora 36 
packages has the same issue
luckily i don't care much about x265 and so disbaled it

before ffmpeg 5.1 both worked for years - period

-------------------------

- update to 6.0.0
- work around 'ERROR: x265 not found using pkg-config' with 
'--disable-libx265' for now
- add '/rpmbuild/BUILD/ffmpeg-snapshot/x264-static' to PKG_CONFIG_PATH
- add --pkg-config-flags="--static" to configure-flags

-------------------------

[builduser at testserver:~]$ rpm -qa | grep x265
x265-libs-3.5-5.fc36.x86_64
x265-devel-3.5-5.fc36.x86_64

[builduser at testserver:~]$ locate x265.pc
/usr/lib64/pkgconfig/x265.pc
[builduser at testserver:~]$ cat /usr/lib64/pkgconfig/x265.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include

Name: x265
Description: H.265/HEVC video encoder
Version: 3.5
Libs: -L${libdir} -lx265
Libs.private: -lstdc++ -lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl -lnuma
Cflags: -I${includedir}

[builduser at testserver:~]$ pkg-config --debug x265
libpkgconf/dependency.c:115 [add_or_replace_dependency_node]: added 
dependency [x265] to list @0x7ffdfa02f7b8; flags=0
libpkgconf/pkg.c:1565 [pkgconf_pkg_traverse]: virtual:world: level 2000
libpkgconf/pkg.c:1580 [pkgconf_pkg_traverse]: virtual:world: walking 
requires list
libpkgconf/pkg.c:1346 [pkgconf_pkg_verify_dependency]: trying to verify 
dependency: x265
libpkgconf/pkg.c:733 [pkgconf_pkg_find]: looking for: x265
libpkgconf/cache.c:62 [pkgconf_cache_lookup]: miss: x265
libpkgconf/pkg.c:571 [pkgconf_pkg_try_specific_path]: trying path: 
/usr/lib64/pkgconfig for x265
libpkgconf/pkg.c:585 [pkgconf_pkg_try_specific_path]: found: 
/usr/lib64/pkgconfig/x265.pc
libpkgconf/tuple.c:189 [pkgconf_tuple_add]: adding tuple to 
@0x55ca70dd4bd8: pcfiledir => /usr/lib64/pkgconfig (parsed? 1)
libpkgconf/tuple.c:189 [pkgconf_tuple_add]: adding tuple to 
@0x55ca70dd4bd8: prefix => /usr (parsed? 1)
libpkgconf/tuple.c:189 [pkgconf_tuple_add]: adding tuple to 
@0x55ca70dd4bd8: exec_prefix => ${prefix} (parsed? 1)
libpkgconf/tuple.c:189 [pkgconf_tuple_add]: adding tuple to 
@0x55ca70dd4bd8: libdir => /usr/lib64 (parsed? 1)
libpkgconf/tuple.c:189 [pkgconf_tuple_add]: adding tuple to 
@0x55ca70dd4bd8: includedir => ${prefix}/include (parsed? 1)
libpkgconf/fragment.c:676 [pkgconf_fragment_parse]: post-subst: 
[-L${libdir} -lx265] -> [-L/usr/lib64 -lx265]
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {L, 
'/usr/lib64'} to list @0x55ca70dd4b18
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'x265'} to list @0x55ca70dd4b18
libpkgconf/fragment.c:676 [pkgconf_fragment_parse]: post-subst: 
[-lstdc++ -lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl -lnuma] -> [-lstdc++ 
-lm -lgcc_s -lgcc -lgcc_s -lgcc -lrt -ldl -lnuma]
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'stdc++'} to list @0x55ca70dd4b30
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'm'} to list @0x55ca70dd4b30
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'gcc_s'} to list @0x55ca70dd4b30
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'gcc'} to list @0x55ca70dd4b30
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'gcc_s'} to list @0x55ca70dd4b30
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'gcc'} to list @0x55ca70dd4b30
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'rt'} to list @0x55ca70dd4b30
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'dl'} to list @0x55ca70dd4b30
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {l, 
'numa'} to list @0x55ca70dd4b30
libpkgconf/fragment.c:676 [pkgconf_fragment_parse]: post-subst: 
[-I${includedir}] -> [-I/usr/include]
libpkgconf/fragment.c:147 [pkgconf_fragment_add]: added fragment {I, 
'/usr/include'} to list @0x55ca70dd4b48
libpkgconf/dependency.c:115 [add_or_replace_dependency_node]: added 
dependency [x265 = 3.5] to list @0x55ca70dd4bc0; flags=0
libpkgconf/pkg.c:534 [pkgconf_pkg_ref]: refcount at 0x55ca70dd4ac0: 1
libpkgconf/pkg.c:534 [pkgconf_pkg_ref]: refcount at 0x55ca70dd4ac0: 2
libpkgconf/cache.c:87 [pkgconf_cache_add]: added @0x55ca70dd4ac0 to cache
libpkgconf/pkg.c:534 [pkgconf_pkg_ref]: refcount at 0x55ca70dd4ac0: 3
libpkgconf/pkg.c:1565 [pkgconf_pkg_traverse]: x265: level 1999
libpkgconf/pkg.c:1580 [pkgconf_pkg_traverse]: x265: walking requires list
libpkgconf/pkg.c:557 [pkgconf_pkg_unref]: refcount at 0x55ca70dd4ac0: 2
libpkgconf/pkg.c:557 [pkgconf_pkg_unref]: refcount at 0x55ca70dd4ac0: 1
libpkgconf/client.c:180 [pkgconf_client_deinit]: deinit @0x55ca70967800
libpkgconf/pkg.c:557 [pkgconf_pkg_unref]: refcount at 0x55ca70dd4ac0: 0
libpkgconf/cache.c:113 [pkgconf_cache_remove]: removed @0x55ca70dd4ac0 
from cache
libpkgconf/cache.c:142 [pkgconf_cache_free]: cleared package cache


More information about the ffmpeg-user mailing list