conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
970 stars 1.78k forks source link

[package] ffmpeg/5.0: libopenjp2 >= 2.1.0 not found using pkg-config #15356

Open Bobini1 opened 1 year ago

Bobini1 commented 1 year ago

Description

FFmpeg fails to build on my CI pipeline because it can't find libopenjp2. This only happens with GCC, clang on the same system installs fine. It seems like there was a similar issue before -> https://github.com/conan-io/conan-center-index/issues/10442

Package and Environment Details

Conan profile

[settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=11 os=Linux os_build=Linux [options] [build_requires] [env] [conf] tools.system.package_manager:mode=install tools.system.package_manager:sudo=True

Steps to reproduce

conan install . -b missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True

Logs

Click to expand log ``` ffmpeg/5.0: Applying build-requirement: yasm/1.3.0 ffmpeg/5.0: Applying build-requirement: pkgconf/1.9.3 ffmpeg/5.0: Configuring sources in /home/runner/.conan/data/ffmpeg/5.0/_/_/source ffmpeg/5.0: ffmpeg/5.0: Copying sources to build folder ffmpeg/5.0: Building your package in /home/runner/.conan/data/ffmpeg/5.0/_/_/build/3783411bd347bd24d3553fe0968d2396b6347461 ffmpeg/5.0: Generator pkg_config created liblzma.pc ffmpeg/5.0: Generator pkg_config created freetype2.pc ffmpeg/5.0: Generator pkg_config created libopenjp2.pc ffmpeg/5.0: Generator pkg_config created openh264.pc ffmpeg/5.0: Generator pkg_config created vpx.pc ffmpeg/5.0: Generator pkg_config created libmp3lame.pc ffmpeg/5.0: Generator pkg_config created libwebp.pc ffmpeg/5.0: Generator pkg_config created libwebpmux.pc ffmpeg/5.0: Generator pkg_config created libwebpdemux.pc ffmpeg/5.0: Generator pkg_config created libwebpdecoder.pc ffmpeg/5.0: Generator pkg_config created libwebp-all-do-not-use.pc ffmpeg/5.0: Generator pkg_config created libpulse.pc ffmpeg/5.0: Generator pkg_config created libpulse-simple.pc ffmpeg/5.0: Generator pkg_config created pulseaudio.pc ffmpeg/5.0: Generator pkg_config created vaapi.pc ffmpeg/5.0: Generator pkg_config created vdpau.pc ffmpeg/5.0: Generator pkg_config created vulkan.pc ffmpeg/5.0: Generator pkg_config created bzip2.pc ffmpeg/5.0: Generator pkg_config created libiconv.pc ffmpeg/5.0: Generator pkg_config created libpng.pc ffmpeg/5.0: Generator pkg_config created libbrotlicommon.pc ffmpeg/5.0: Generator pkg_config created libbrotlienc.pc ffmpeg/5.0: Generator pkg_config created libbrotlidec.pc ffmpeg/5.0: Generator pkg_config created brotli.pc ffmpeg/5.0: Generator pkg_config created libcrypto.pc ffmpeg/5.0: Generator pkg_config created libssl.pc ffmpeg/5.0: Generator pkg_config created openssl.pc ffmpeg/5.0: Generator pkg_config created alsa.pc ffmpeg/5.0: Generator pkg_config created uuid.pc ffmpeg/5.0: Generator pkg_config created xcb-dri3.pc ffmpeg/5.0: Generator pkg_config created xcb-util.pc ffmpeg/5.0: Generator pkg_config created xcb-event.pc ffmpeg/5.0: Generator pkg_config created xcb-aux.pc ffmpeg/5.0: Generator pkg_config created xcb-atom.pc ffmpeg/5.0: Generator pkg_config created xcb.pc ffmpeg/5.0: Generator pkg_config created xcb-xinerama.pc ffmpeg/5.0: Generator pkg_config created xcb-xfixes.pc ffmpeg/5.0: Generator pkg_config created xcb-sync.pc ffmpeg/5.0: Generator pkg_config created xcb-shm.pc ffmpeg/5.0: Generator pkg_config created xcb-shape.pc ffmpeg/5.0: Generator pkg_config created xcb-renderutil.pc ffmpeg/5.0: Generator pkg_config created xcb-render.pc ffmpeg/5.0: Generator pkg_config created xcb-randr.pc ffmpeg/5.0: Generator pkg_config created xcb-keysyms.pc ffmpeg/5.0: Generator pkg_config created xcb-image.pc ffmpeg/5.0: Generator pkg_config created xcb-icccm.pc ffmpeg/5.0: Generator pkg_config created xcb-xkb.pc ffmpeg/5.0: Generator pkg_config created xxf86vm.pc ffmpeg/5.0: Generator pkg_config created xvmc.pc ffmpeg/5.0: Generator pkg_config created xv.pc ffmpeg/5.0: Generator pkg_config created xtst.pc ffmpeg/5.0: Generator pkg_config created xt.pc ffmpeg/5.0: Generator pkg_config created xscrnsaver.pc ffmpeg/5.0: Generator pkg_config created xres.pc ffmpeg/5.0: Generator pkg_config created xrender.pc ffmpeg/5.0: Generator pkg_config created xrandr.pc ffmpeg/5.0: Generator pkg_config created xpm.pc ffmpeg/5.0: Generator pkg_config created xmuu.pc ffmpeg/5.0: Generator pkg_config created xmu.pc ffmpeg/5.0: Generator pkg_config created xkbfile.pc ffmpeg/5.0: Generator pkg_config created xinerama.pc ffmpeg/5.0: Generator pkg_config created xi.pc ffmpeg/5.0: Generator pkg_config created xfixes.pc ffmpeg/5.0: Generator pkg_config created xext.pc ffmpeg/5.0: Generator pkg_config created xdmcp.pc ffmpeg/5.0: Generator pkg_config created xdamage.pc ffmpeg/5.0: Generator pkg_config created xcursor.pc ffmpeg/5.0: Generator pkg_config created xcomposite.pc ffmpeg/5.0: Generator pkg_config created xaw7.pc ffmpeg/5.0: Generator pkg_config created xau.pc ffmpeg/5.0: Generator pkg_config created sm.pc ffmpeg/5.0: Generator pkg_config created ice.pc ffmpeg/5.0: Generator pkg_config created fontenc.pc ffmpeg/5.0: Generator pkg_config created x11-xcb.pc ffmpeg/5.0: Generator pkg_config created x11.pc ffmpeg/5.0: Generator pkg_config created xorg.pc ffmpeg/5.0: Generator pkg_config created sndfile.pc ffmpeg/5.0: Generator pkg_config created libcap.pc ffmpeg/5.0: Generator pkg_config created libtool.pc ffmpeg/5.0: Generator pkg_config created vulkanregistry.pc ffmpeg/5.0: Generator pkg_config created vulkanheaders.pc ffmpeg/5.0: Generator pkg_config created vulkan-headers.pc ffmpeg/5.0: Generator pkg_config created zlib.pc ffmpeg/5.0: Generator pkg_config created vorbis.pc ffmpeg/5.0: Generator pkg_config created vorbisfile.pc ffmpeg/5.0: Generator pkg_config created vorbisfile-alias.pc ffmpeg/5.0: Generator pkg_config created vorbisenc.pc ffmpeg/5.0: Generator pkg_config created vorbisenc-alias.pc ffmpeg/5.0: Generator pkg_config created vorbis-all-do-not-use.pc ffmpeg/5.0: Generator pkg_config created opus.pc ffmpeg/5.0: Generator pkg_config created flac.pc ffmpeg/5.0: Generator pkg_config created flac++.pc ffmpeg/5.0: Generator pkg_config created automake.pc ffmpeg/5.0: Generator pkg_config created ogg.pc ffmpeg/5.0: Generator pkg_config created autoconf.pc ffmpeg/5.0: Generator pkg_config created m4.pc ffmpeg/5.0: Aggregating env generators ffmpeg/5.0: Calling build() ffmpeg/5.0: Calling: > source_subfolder/configure '--pkg-config-flags=--static' '--disable-doc' '--disable-cross-compile' '--enable-asm' '--enable-shared' '--disable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--disable-postproc' '--enable-avfilter' '--enable-bzlib' '--enable-zlib' '--enable-lzma' '--enable-iconv' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--disable-libx264' '--disable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--disable-libfdk-aac' '--enable-libwebp' '--enable-openssl' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-cuda' '--disable-cuvid' '--disable-nonfree' '--disable-gpl' '--enable-vulkan' '--arch=x86_64' '--extra-cflags=' '--extra-ldflags=' '--prefix=/home/runner/.conan/data/ffmpeg/5.0/_/_/package/3783411bd347bd24d3553fe0968d2396b6347461' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' ERROR: libopenjp2 >= 2.1.0 not found using pkg-config If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat. Include the log file "ffbuild/config.log" produced by configure as this will help solve the problem. ffmpeg/5.0: WARN: pulseaudio/14.2: requirement openssl/1.1.1q overridden by ffmpeg/5.0 to openssl/1.1.1s ffmpeg/5.0: ERROR: Package '3783411bd347bd24d3553fe0968d2396b6347461' build failed ffmpeg/5.0: WARN: Build folder /home/runner/.conan/data/ffmpeg/5.0/_/_/build/3783411bd347bd24d3553fe0968d2396b6347461 ERROR: ffmpeg/5.0: Error in build() method, line 603 autotools = self._configure_autotools() while calling '_configure_autotools', line 579 self._autotools.configure( ConanException: Error 1 while executing source_subfolder/configure '--pkg-config-flags=--static' '--disable-doc' '--disable-cross-compile' '--enable-asm' '--enable-shared' '--disable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--disable-postproc' '--enable-avfilter' '--enable-bzlib' '--enable-zlib' '--enable-lzma' '--enable-iconv' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--disable-libx264' '--disable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--disable-libfdk-aac' '--enable-libwebp' '--enable-openssl' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-cuda' '--disable-cuvid' '--disable-nonfree' '--disable-gpl' '--enable-vulkan' '--arch=x86_64' '--extra-cflags=' '--extra-ldflags=' '--prefix=/home/runner/.conan/data/ffmpeg/5.0/_/_/package/3783411bd347bd24d3553fe0968d2396b6347461' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' ```
Jamaslab commented 1 year ago

Hi, I encountered this also in the past and I could solve it by building openjpeg explicitly in front of your build missing

-b openjpeg

mlutken commented 1 year ago

I have the same problem on Ubuntu 22.04: To reproduce: --- conanfile.txt ---

[requires]
ffmpeg/5.1

[generators]
CMakeDeps
CMakeToolchain

CMD: $ conan install . --output-folder=build --build=missing

OUTPUT: ERROR: libopenjp2 >= 2.1.0 not found using pkg-config

OTHER: If I then disable the use of openjpeg by adding this to the conanfile.txt

[options]
ffmpeg/5.1:with_openjpeg=False

Then it can't find the next library OUTPUT: ERROR: x265 not found using pkg-config

The suggested "-b openjpeg" from Jamaslab does not work for me.

loopless commented 3 months ago

Did anyone resolve this, I am trying to use openimageio and that requires ffmpeg. I am completely blocked by this error.

ERROR: libopenjp2 >= 2.1.0 not found using pkg-config

I am building on Windows.

uilianries commented 3 months ago

I can confirm that bug, but I only tested in Ubuntu 22.04 and running Conan 1.64.1:

conan --version
Conan version 1.64.1

conan create all 5.0.3@  -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True
WARN: *** Conan 1 is legacy and on a deprecation path ***
WARN: *** Please upgrade to Conan 2 ***
Exporting package recipe
ffmpeg/5.0.3 exports: File 'conandata.yml' found. Exporting it...
ffmpeg/5.0.3 exports: Copied 1 '.yml' file: conandata.yml
ffmpeg/5.0.3: Calling export_sources()
ffmpeg/5.0.3: The stored package has not changed
ffmpeg/5.0.3: Exported revision: 89b1dd37f96c57f9f7c8ee82051694f9
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++
compiler.version=11
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
[conf]
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True

WARN: freetype/2.13.2: requirement zlib/[>=1.2.10 <2] overridden by ffmpeg/5.0.3 to zlib/1.3.1 
WARN: libpng/1.6.43: requirement zlib/[>=1.2.11 <2] overridden by freetype/2.13.2 to zlib/1.3.1 
WARN: openssl/3.3.1: requirement zlib/[>=1.2.11 <2] overridden by ffmpeg/5.0.3 to zlib/1.3.1 
WARN: pulseaudio/14.2: requirement openssl/[>=1.1 <4] overridden by ffmpeg/5.0.3 to openssl/3.3.1 
ffmpeg/5.0.3: Forced build from source
Version ranges solved
    Version range '>=1.2.11 <2' required by 'ffmpeg/5.0.3' resolved to 'zlib/1.3.1' in local cache
    Version range '>=1.1 <4' required by 'ffmpeg/5.0.3' resolved to 'openssl/3.3.1' in local cache
    Version range '>=1.6 <2' required by 'freetype/2.13.2' resolved to 'libpng/1.6.43' in local cache
    Version range '>=1.2.10 <2' required by 'freetype/2.13.2' valid for downstream requirement 'zlib/1.3.1'
    Version range '>=1.2.11 <2' required by 'libpng/1.6.43' valid for downstream requirement 'zlib/1.3.1'
    Version range '>=1.2.11 <2' required by 'openssl/3.3.1' valid for downstream requirement 'zlib/1.3.1'
    Version range '>=1.1 <4' required by 'pulseaudio/14.2' valid for downstream requirement 'openssl/3.3.1'

ffmpeg/5.0.3 (test package): Installing package
Requirements
    autoconf/2.71 from 'conancenter' - Cache
    automake/1.16.5 from 'conancenter' - Cache
    brotli/1.1.0 from 'conancenter' - Cache
    bzip2/1.0.8 from 'conancenter' - Cache
    dav1d/1.2.1 from 'conancenter' - Cache
    ffmpeg/5.0.3 from local cache - Cache
    flac/1.4.2 from 'conancenter' - Cache
    freetype/2.13.2 from 'conancenter' - Cache
    libalsa/1.2.10 from 'conancenter' - Cache
    libaom-av1/3.6.1 from 'conancenter' - Cache
    libcap/2.69 from 'conancenter' - Cache
    libfdk_aac/2.0.3 from 'conancenter' - Cache
    libiconv/1.17 from 'conancenter' - Cache
    libmp3lame/3.100 from 'conancenter' - Cache
    libpng/1.6.43 from 'conancenter' - Cache
    libsndfile/1.2.2 from 'conancenter' - Cache
    libtool/2.4.7 from 'conancenter' - Cache
    libvpx/1.13.1 from 'conancenter' - Cache
    libwebp/1.3.2 from 'conancenter' - Cache
    libx264/cci.20220602 from 'conancenter' - Cache
    libx265/3.4 from 'conancenter' - Cache
    m4/1.4.19 from 'conancenter' - Cache
    mpg123/1.31.2 from 'conancenter' - Cache
    ogg/1.3.5 from 'conancenter' - Cache
    openh264/2.3.1 from 'conancenter' - Cache
    openjpeg/2.5.2 from 'conancenter' - Cache
    openssl/3.3.1 from 'conancenter' - Cache
    opus/1.4 from 'conancenter' - Cache
    pulseaudio/14.2 from 'conancenter' - Cache
    vaapi/system from 'conancenter' - Cache
    vdpau/system from 'conancenter' - Cache
    vorbis/1.3.7 from 'conancenter' - Cache
    xorg/system from 'conancenter' - Cache
    xz_utils/5.4.5 from 'conancenter' - Cache
    zlib/1.3.1 from 'conancenter' - Cache
Packages
    autoconf/2.71:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    automake/1.16.5:258f6f05ca54813b3d7180161753df7f9ccf7e1d - Cache
    brotli/1.1.0:e1dc2bcd4b907868f16d7f3b15e15c3bb07067f2 - Cache
    bzip2/1.0.8:c32092bf4d4bb47cf962af898e02823f499b017e - Cache
    dav1d/1.2.1:5072721b0aa5d41725e74ce271d6f36350d9ca77 - Cache
    ffmpeg/5.0.3:b32fc7820cead3a9a7b6ae0ed1953bf959e08c50 - Build
    flac/1.4.2:6e2d2c81e4777f61be84074b641fd4387e66a28b - Cache
    freetype/2.13.2:7d544953cc6cdd1bd06a4e40fc9904c650a37eb2 - Cache
    libalsa/1.2.10:30b1dc656c82170e68989f5a539d6e3469561214 - Cache
    libaom-av1/3.6.1:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache
    libcap/2.69:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache
    libfdk_aac/2.0.3:d8d8aba822aaa76849d2f1bafe4a2a62a9f83b74 - Cache
    libiconv/1.17:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache
    libmp3lame/3.100:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache
    libpng/1.6.43:025ffc7158b5e62f5f3ed9af91d48958d216f972 - Cache
    libsndfile/1.2.2:4f72266f0bcd60dc747d05af775fce88bd7ea856 - Cache
    libtool/2.4.7:00ffeae55ec276f0fef26ad0ed5cd0191ca724ce - Cache
    libvpx/1.13.1:61840846e02dc08e4c8b85235b52ffe195a30d1d - Cache
    libwebp/1.3.2:ec17d365d82d936171699c4130c92bcc8b6f5f90 - Cache
    libx264/cci.20220602:e8cffab19d24efd07c7c32199c01ab17420e1b42 - Cache
    libx265/3.4:89980a533c1e231e77d52f864df08fb8b3772227 - Cache
    m4/1.4.19:24647d9fe8ec489125dfbae4b3ebefaf7581674c - Cache
    mpg123/1.31.2:8e31ece6966077414c27453e6db9435ef82813d1 - Cache
    ogg/1.3.5:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache
    openh264/2.3.1:d8d8aba822aaa76849d2f1bafe4a2a62a9f83b74 - Cache
    openjpeg/2.5.2:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache
    openssl/3.3.1:304480252b01879c8641f79a653b593b8f26cf9f - Cache
    opus/1.4:c889e7f8d2da25a0967139692fd28155a3910c9f - Cache
    pulseaudio/14.2:b90b781a6997c7a208e0fe1a8536b0cdba1f1c61 - Cache
    vaapi/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    vdpau/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    vorbis/1.3.7:6dc8cd39c5b0e3955526ea49034a31dbe9d01a47 - Cache
    xorg/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    xz_utils/5.4.5:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache
    zlib/1.3.1:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache
Build requirements
    pkgconf/2.1.0 from 'conancenter' - Cache
    yasm/1.3.0 from 'conancenter' - Cache
Build requirements packages
    pkgconf/2.1.0:24647d9fe8ec489125dfbae4b3ebefaf7581674c - Cache
    yasm/1.3.0:24647d9fe8ec489125dfbae4b3ebefaf7581674c - Cache

Installing (downloading, building) binaries...
brotli/1.1.0: Already installed!
bzip2/1.0.8: Already installed!
dav1d/1.2.1: Already installed!
libalsa/1.2.10: Already installed!
libaom-av1/3.6.1: Already installed!
libcap/2.69: Already installed!
libfdk_aac/2.0.3: Already installed!
libiconv/1.17: Already installed!
libmp3lame/3.100: Already installed!
libvpx/1.13.1: Already installed!
libwebp/1.3.2: Already installed!
libx264/cci.20220602: Already installed!
libx265/3.4: Already installed!
m4/1.4.19: Already installed!
mpg123/1.31.2: Already installed!
mpg123/1.31.2: Appending PATH environment variable: /home/conan/.conan/data/mpg123/1.31.2/_/_/package/8e31ece6966077414c27453e6db9435ef82813d1/bin
ogg/1.3.5: Already installed!
openh264/2.3.1: Already installed!
openjpeg/2.5.2: Already installed!
opus/1.4: Already installed!
pkgconf/2.1.0: Already installed!
vaapi/system: Already installed!
vdpau/system: Already installed!
xorg/system: Already installed!
xz_utils/5.4.5: Already installed!
yasm/1.3.0: Already installed!
yasm/1.3.0: Appending PATH environment variable: /home/conan/.conan/data/yasm/1.3.0/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
zlib/1.3.1: Already installed!
autoconf/2.71: Already installed!
flac/1.4.2: Already installed!
libpng/1.6.43: Already installed!
openssl/3.3.1: Already installed!
vorbis/1.3.7: Already installed!
automake/1.16.5: Already installed!
freetype/2.13.2: Already installed!
libsndfile/1.2.2: Already installed!
libtool/2.4.7: Already installed!
pulseaudio/14.2: Already installed!
ffmpeg/5.0.3: Applying build-requirement: yasm/1.3.0
ffmpeg/5.0.3: Applying build-requirement: pkgconf/2.1.0
ffmpeg/5.0.3: Copying sources to build folder
ffmpeg/5.0.3: Building your package in /home/conan/.conan/data/ffmpeg/5.0.3/_/_/build/b32fc7820cead3a9a7b6ae0ed1953bf959e08c50
ffmpeg/5.0.3: Generator txt created conanbuildinfo.txt
ffmpeg/5.0.3: Calling generate()
ffmpeg/5.0.3: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
ffmpeg/5.0.3: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
ffmpeg/5.0.3: Aggregating env generators
ffmpeg/5.0.3: Calling build()
ffmpeg/5.0.3: Apply patch (portability): Compatibility with vulkan >= 1.3.239
ffmpeg/5.0.3: WARN: /home/conan/.conan/data/ffmpeg/5.0.3/_/_/build/b32fc7820cead3a9a7b6ae0ed1953bf959e08c50/patches/5.0-0001-fix-hwcontext_vulkan.patch: file 1/1:   b'libavutil/hwcontext_vulkan.c'
ffmpeg/5.0.3: WARN: /home/conan/.conan/data/ffmpeg/5.0.3/_/_/build/b32fc7820cead3a9a7b6ae0ed1953bf959e08c50/patches/5.0-0001-fix-hwcontext_vulkan.patch:  hunk no.1 doesn't match source file at line 357
ffmpeg/5.0.3: WARN: /home/conan/.conan/data/ffmpeg/5.0.3/_/_/build/b32fc7820cead3a9a7b6ae0ed1953bf959e08c50/patches/5.0-0001-fix-hwcontext_vulkan.patch:   expected: b''
ffmpeg/5.0.3: WARN: /home/conan/.conan/data/ffmpeg/5.0.3/_/_/build/b32fc7820cead3a9a7b6ae0ed1953bf959e08c50/patches/5.0-0001-fix-hwcontext_vulkan.patch:   actual  : b'};'
ffmpeg/5.0.3: WARN: /home/conan/.conan/data/ffmpeg/5.0.3/_/_/build/b32fc7820cead3a9a7b6ae0ed1953bf959e08c50/patches/5.0-0001-fix-hwcontext_vulkan.patch: already patched  b'libavutil/hwcontext_vulkan.c'
ffmpeg/5.0.3: Calling:
 > "/home/conan/.conan/data/ffmpeg/5.0.3/_/_/build/b32fc7820cead3a9a7b6ae0ed1953bf959e08c50/src/configure" '--disable-shared' '--enable-static' '--prefix=/' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' '--pkg-config-flags=--static' '--disable-doc' '--disable-cross-compile' '--enable-asm' '--disable-shared' '--enable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--enable-postproc' '--enable-avfilter' '--enable-bzlib' '--enable-zlib' '--enable-lzma' '--enable-iconv' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--enable-libx264' '--enable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--enable-libfdk-aac' '--enable-libwebp' '--enable-libaom' '--enable-openssl' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-vulkan' '--enable-libdav1d' '--disable-jni' '--disable-mediacodec' '--disable-cuda' '--disable-cuvid' '--enable-nonfree' '--enable-gpl' '--arch=x86_64' '--cc=gcc' '--cxx=g++' '--extra-cflags=-m64 -fPIC -O3' '--extra-ldflags=-m64' 
ERROR: x265 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
ffmpeg/5.0.3: 
ffmpeg/5.0.3: ERROR: Package 'b32fc7820cead3a9a7b6ae0ed1953bf959e08c50' build failed
ffmpeg/5.0.3: WARN: Build folder /home/conan/.conan/data/ffmpeg/5.0.3/_/_/build/b32fc7820cead3a9a7b6ae0ed1953bf959e08c50/build-release
ERROR: ffmpeg/5.0.3: Error in build() method, line 715
    autotools.configure()
    ConanException: Error 1 while executing "/home/conan/.conan/data/ffmpeg/5.0.3/_/_/build/b32fc7820cead3a9a7b6ae0ed1953bf959e08c50/src/configure" '--disable-shared' '--enable-static' '--prefix=/' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' '--pkg-config-flags=--static' '--disable-doc' '--disable-cross-compile' '--enable-asm' '--disable-shared' '--enable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--enable-postproc' '--enable-avfilter' '--enable-bzlib' '--enable-zlib' '--enable-lzma' '--enable-iconv' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--enable-libx264' '--enable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--enable-libfdk-aac' '--enable-libwebp' '--enable-libaom' '--enable-openssl' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-vulkan' '--enable-libdav1d' '--disable-jni' '--disable-mediacodec' '--disable-cuda' '--disable-cuvid' '--enable-nonfree' '--enable-gpl' '--arch=x86_64' '--cc=gcc' '--cxx=g++' '--extra-cflags=-m64 -fPIC -O3' '--extra-ldflags=-m64' 

However, the same does not happen in Conan 2.x. I would recommend migrating to Conan 2.x asap as Conan 1 is legacy and on a deprecation path.

uilianries commented 3 months ago

UPDATE: Doing a deeper investigation, this error only occurs when using -s compiler.libcxx=libstdc++. The ffmpeg uses internal checks to validate if dependencies are capable to be consumed. Here is part of config.log generated by ffmpeg:

require_pkg_config libx265 x265 x265.h x265_api_get
check_pkg_config libx265 x265 x265.h x265_api_get
test_pkg_config libx265 x265 x265.h x265_api_get
pkg-config --exists --print-errors x265
check_func_headers x265.h x265_api_get ...
BEGIN /tmp/ffconf.KvhPIA2j/test.c
    1   #include <x265.h>
    2   #include <stdint.h>
    3   long check_x265_api_get(void) { return (long) x265_api_get; }
    4   int main(void) { int ret = 0;
    5    ret |= ((intptr_t)check_x265_api_get) & 0xFFFF;
    6   return ret; }
END /tmp/ffconf.KvhPIA2j/test.c
encoder.cpp:(.text+0x2be4): undefined reference to `__log10_finite'
/opt/conan/binutils/bin/ld: encoder.cpp:(.text+0x2d60): undefined reference to `__log10_finite'
/opt/conan/binutils/bin/ld: encoder.cpp:(.text+0x2dba): undefined reference to `__log10_finite'

The missing reference __log10_finite is due incompatible glibc versions. The libx265 in ConanCenter was built using Ubuntu 16.04 (glibc 2.23), at same time, Ubuntu 22.04 uses glibc 2.35. Since glibc 2.31, the math was affected and _finite has been removed, causing the current error:

As solution, the libx265 package should be built from source, to use the glibc version available in your current machine.

conan install -r conancenter libx265/3.4@ --build=libx265/3.4