Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] FFmpeg test package fails to link sndio deps #15240

Open
spiderkeys opened this issue Dec 8, 2023 · 5 comments
Open

[bug] FFmpeg test package fails to link sndio deps #15240

spiderkeys opened this issue Dec 8, 2023 · 5 comments
Assignees

Comments

@spiderkeys
Copy link

Environment details

  • Operating System+version: Ubuntu 22.04, x86_64
  • Compiler+version: gcc-11
  • Conan version: 2.0.14
  • Python version: 3.10.12

When I try to conan create the ffmpeg package, the test_package fails to build due to a link error relating to the sndio library. I've tested this with both the 5.0.3 version and latest 6.1 version, same result.

# My command:
$conan-center-index/recipes/ffmpeg/all$ conan create . --version 6.1 --build missing

...

[100%] Linking C executable test_package
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio_dec.o): in function `audio_read_packet':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_dec.c:68: undefined reference to `sio_read'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_dec.c:69: undefined reference to `sio_eof'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio_enc.o): in function `audio_write_trailer':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_enc.c:76: undefined reference to `sio_write'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio_enc.o): in function `audio_write_packet':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_enc.c:61: undefined reference to `sio_write'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_enc.c:62: undefined reference to `sio_eof'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio.o): in function `ff_sndio_close':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:117: undefined reference to `sio_close'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio.o): in function `ff_sndio_open':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:43: undefined reference to `sio_open'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:49: undefined reference to `sio_initpar'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:61: undefined reference to `sio_setpar'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:61: undefined reference to `sio_getpar'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:92: undefined reference to `sio_onmove'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:94: undefined reference to `sio_start'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:107: undefined reference to `sio_close'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/test_package.dir/build.make:146: test_package] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/test_package.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

*********************************************************
Recipe 'ffmpeg/6.1 (test package)' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: ffmpeg/6.1 (test package): Error in build() method, line 21
        cmake.build()
        ConanException: Error 2 while executing

Steps to reproduce

  1. Checkout conan-center-index commit: 23c84b31ab953a0ff401f53f91d51d820cd528f1
  2. Run:
$conan-center-index/recipes/ffmpeg/all$ conan create . --version 6.1 --build missing

Logs

======== Launching test_package ========

======== Computing dependency graph ========
Graph root
    ffmpeg/6.1 (test package): /home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package/conanfile.py
Requirements
    autoconf/2.71#5312af4e8a3f82a7f6454866081de83f - Cache
    automake/1.16.5#27a1996f8e84efd37c1bdacd9c8a5d7b - Cache
    brotli/1.1.0#1d3da62d9f5ab8b335087c7016f78412 - Cache
    bzip2/1.0.8#d4bac033d92db60e1cc04b4f537ad936 - Cache
    ffmpeg/6.1#068aaaa939e24aedf21d0cf558af27e1 - Cache
    flac/1.4.2#53e81edf48941467f42a57473de693f2 - Cache
    freetype/2.13.0#dfcb148d916916d94b8495db0fc912b1 - Cache
    libalsa/1.2.10#bf7284ed6e494ceb57589ee57488511b - Cache
    libcap/2.69#c076309153f498b6c881da151d119373 - Cache
    libfdk_aac/2.0.2#3b068a2838994e88a28350fd362a1b46 - Cache
    libiconv/1.17#80da49fca2bee7160307d39a19feff20 - Cache
    libmp3lame/3.100#da13ecbaf0d06421ae586b7226d985ad - Cache
    libpng/1.6.40#92e774c2383a04742eec3d22df84e206 - Cache
    libsndfile/1.2.2#8325f3ef50cfada831b274a9abc0c801 - Cache
    libtool/2.4.7#45550c309dbf3f03a44ff239e3c58f59 - Cache
    libvpx/1.11.0#79c60ccd77d14a519e2c8e957b46e034 - Cache
    libwebp/1.3.2#2331459d59ca9d64343e2be775081017 - Cache
    libx264/cci.20220602#219c8f26ca3490b99be5596693f1c68b - Cache
    libx265/3.4#af66bb15860f95bcbd4fc94430c3f8c3 - Cache
    m4/1.4.19#87fd6787ab1023734834970edaf2f20f - Cache
    mpg123/1.31.2#ac763d6389e7aa8e1ed91510497fc7ae - Cache
    ogg/1.3.5#00fb0bd978d034d12af5efd5d6921364 - Cache
    openh264/2.3.1#8735c416b224f8cca4e14b815ed2299a - Cache
    openjpeg/2.5.0#9bc933368c3a6317b5076a6ce1567d0a - Cache
    openssl/3.2.0#c345d32f02dbdd943d404cdaa77bff2b - Cache
    opus/1.4#f8826c093568b0bf60e993bd649b3842 - Cache
    pulseaudio/14.2#cac3d381ec56e41193b5406a5e52e815 - Cache
    vaapi/system#9fa40059fb979af4f9b301b84fb2dfa1 - Cache
    vdpau/system#bdd7d010c4e3d8762a8f6f08a3cf6760 - Cache
    vorbis/1.3.7#0400cbb550b491521361a41c889d5c48 - Cache
    xorg/system#f305a1fd0b61725df7f118b57d520b0c - Cache
    xz_utils/5.4.5#56e3eb071afe0b5021eaff18b9a6c193 - Cache
    zlib/1.2.13#416618fa04d433c6bd94279ed2e93638 - Cache
Build requirements
    autoconf/2.71#5312af4e8a3f82a7f6454866081de83f - Cache
    automake/1.16.5#27a1996f8e84efd37c1bdacd9c8a5d7b - Cache
    gettext/0.21#449be1eec865ffc12c32fe24c4772ef6 - Cache
    gnu-config/cci.20210814#12da20e8cf2944f777a9ea286e5adb55 - Cache
    libiconv/1.17#80da49fca2bee7160307d39a19feff20 - Cache
    libtool/2.4.7#45550c309dbf3f03a44ff239e3c58f59 - Cache
    m4/1.4.19#87fd6787ab1023734834970edaf2f20f - Cache
    meson/1.2.2#cbb4b8d147762c87b0f93927d8027136 - Cache
    nasm/2.15.05#bcd9dfc539d94a51ef20dd921d368092 - Cache
    ninja/1.11.1#de85db1490cc53d3353a536dadf1db50 - Cache
    pkgconf/2.0.3#88569c5bf8f6760de238a623a1c4ecad - Cache
    yasm/1.3.0#f8b676849bfc7f0fb8c099374c4dd32e - Cache

======== Computing necessary packages ========
Requirements
    autoconf/2.71#5312af4e8a3f82a7f6454866081de83f:da39a3ee5e6b4b0d3255bfef95601890afd80709#669a93df881e9d7a78cb2f3f162097c4 - Cache
    automake/1.16.5#27a1996f8e84efd37c1bdacd9c8a5d7b:9a4eb3c8701508aa9458b1a73d0633783ecc2270#9719e51a6a62041af6a63e00eef35434 - Cache
    brotli/1.1.0#1d3da62d9f5ab8b335087c7016f78412:5b903b7d3547e48038c8edfc531cf76728b899e8#3875a4dc6da4356f6280042696e4db3c - Cache
    bzip2/1.0.8#d4bac033d92db60e1cc04b4f537ad936:763ddd53d7a4775fe84a285f56005a096d9786fd#af0350bcd1fdf51556a5a26c47b1a32b - Cache
    ffmpeg/6.1#068aaaa939e24aedf21d0cf558af27e1:d281f87689e44a2a536a19f22532a4d6a7f913e3#0cbf8d18f7dd572390fbccdd17fbced4 - Cache
    flac/1.4.2#53e81edf48941467f42a57473de693f2:01fe6dbfc4b61d1b87e784b3d1d1803b74a38466#dbb367f63a0d3b19a654288fa5b5b87b - Cache
    freetype/2.13.0#dfcb148d916916d94b8495db0fc912b1:ab8f5996c60be8ebe57fb0e09d3b8f3b4638d456#69f6a0b5daf3a2922b48272ce4c04fb1 - Cache
    libalsa/1.2.10#bf7284ed6e494ceb57589ee57488511b:5fa9eb432b28b79c0246ad3b98d042ed84a2b1ca#789aab059d4e0e2068d2cd664b792ac7 - Cache
    libcap/2.69#c076309153f498b6c881da151d119373:e394d65b8a668d2483958bc3fb8d1c2c1729493b#e93c71225bedafb67d1f009a5237b0f8 - Cache
    libfdk_aac/2.0.2#3b068a2838994e88a28350fd362a1b46:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe#2c9fdb28cdd3a024810a49a744d8e4c6 - Cache
    libiconv/1.17#80da49fca2bee7160307d39a19feff20:b647c43bfefae3f830561ca202b6cfd935b56205#fbd617c1c877b4e09c958d977c165986 - Cache
    libmp3lame/3.100#da13ecbaf0d06421ae586b7226d985ad:b647c43bfefae3f830561ca202b6cfd935b56205#27ab192d38ce938c38e1ef9fb707f8fe - Cache
    libpng/1.6.40#92e774c2383a04742eec3d22df84e206:52e28526917bc008177a3c5cf92ea21144c3ecd5#f21fe8f5d69a8d5aaff6ba12af48b5c9 - Cache
    libsndfile/1.2.2#8325f3ef50cfada831b274a9abc0c801:926041235ddaa3a983121414566faad581af0dd5#6057abf349c261f7d2866ff41e153785 - Cache
    libtool/2.4.7#45550c309dbf3f03a44ff239e3c58f59:b647c43bfefae3f830561ca202b6cfd935b56205#657e6f9c3522cd0915f03c7a71dc2dfd - Cache
    libvpx/1.11.0#79c60ccd77d14a519e2c8e957b46e034:e10fb4590c7304b8906c173a647c2c5dd2e61b44#3ccb4210ad13423bb6b27882a75909f6 - Cache
    libwebp/1.3.2#2331459d59ca9d64343e2be775081017:18f01a3f175888d5e3d128efe30c14773afadc83#7d50ae5ea9429a9ef34864109dfa0270 - Cache
    libx264/cci.20220602#219c8f26ca3490b99be5596693f1c68b:8e4079910145c3e45cb15e603514b075788d75c7#68fee516a72a3efaad6564f49ceb28e3 - Cache
    libx265/3.4#af66bb15860f95bcbd4fc94430c3f8c3:3274b8e4cc0184b54606fc1d6486c83926c266f4#53ab7a236d113eb7d4218515a742eb05 - Cache
    m4/1.4.19#87fd6787ab1023734834970edaf2f20f:3593751651824fb813502c69c971267624ced41a#eb16145946d9c9fa95b777969da769ab - Cache
    mpg123/1.31.2#ac763d6389e7aa8e1ed91510497fc7ae:cd3321362832070e917e6965cd88f846ae82dcde#ca67ad0a737e39e14ff6c55759092afe - Cache
    ogg/1.3.5#00fb0bd978d034d12af5efd5d6921364:b647c43bfefae3f830561ca202b6cfd935b56205#4e230e07cd08f3da0bc64900773c0642 - Cache
    openh264/2.3.1#8735c416b224f8cca4e14b815ed2299a:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe#4d0cdc980f4b4a0c0aef991332eec7d0 - Cache
    openjpeg/2.5.0#9bc933368c3a6317b5076a6ce1567d0a:b647c43bfefae3f830561ca202b6cfd935b56205#ff061986b45bc6ea0415c2de7da35641 - Cache
    openssl/3.2.0#c345d32f02dbdd943d404cdaa77bff2b:517a2f66278c9fbeb4bb0b64fc531fe112929bc9#05181b7efa6b87e77619831404c21bc0 - Cache
    opus/1.4#f8826c093568b0bf60e993bd649b3842:4df585f63ebee00f46c117ab89b69f931e4b3d26#7b4071c3d94ac11c81a8dc93fb1e0bc2 - Cache
    pulseaudio/14.2#cac3d381ec56e41193b5406a5e52e815:f5fa55c89eb35b3f46d01d85c85e9f56067f0c0e#423473ebc152856e15cd7d11e609afbf - Cache
    vaapi/system#9fa40059fb979af4f9b301b84fb2dfa1:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache
    vdpau/system#bdd7d010c4e3d8762a8f6f08a3cf6760:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache
    vorbis/1.3.7#0400cbb550b491521361a41c889d5c48:a7b68b4d31174eb97fff2f0a35ab28a9c1fd5e42#c042656fb1c4ac48edbd850bff96dc86 - Cache
    xorg/system#f305a1fd0b61725df7f118b57d520b0c:da39a3ee5e6b4b0d3255bfef95601890afd80709#0ba8627bd47edc3a501e8f0eb9a79e5e - Cache
    xz_utils/5.4.5#56e3eb071afe0b5021eaff18b9a6c193:b647c43bfefae3f830561ca202b6cfd935b56205#cc711d2f466feca7ce53bf0a534f83ac - Cache
    zlib/1.2.13#416618fa04d433c6bd94279ed2e93638:b647c43bfefae3f830561ca202b6cfd935b56205#bf4a282a2dd184a53eea48132b73b294 - Cache
Build requirements
Skipped binaries
    autoconf/2.71, automake/1.16.5, gettext/0.21, gnu-config/cci.20210814, libiconv/1.17, libtool/2.4.7, m4/1.4.19, meson/1.2.2, nasm/2.15.05, ninja/1.11.1, pkgconf/2.0.3, yasm/1.3.0
vaapi/system: System requirements:  already installed
vdpau/system: System requirements:  already installed
xorg/system: System requirements:  already installed
xorg/system: System requirements:  already installed

======== Installing packages ========
brotli/1.1.0: Already installed! (1 of 33)
bzip2/1.0.8: Already installed! (2 of 33)
libcap/2.69: Already installed! (3 of 33)
libfdk_aac/2.0.2: Already installed! (4 of 33)
libiconv/1.17: Already installed! (5 of 33)
libwebp/1.3.2: Already installed! (6 of 33)
m4/1.4.19: Already installed! (7 of 33)
m4/1.4.19: Appending PATH environment variable: /opt/mr/.conan2/p/b/m4eb603ab1444f2/p/bin
ogg/1.3.5: Already installed! (8 of 33)
openjpeg/2.5.0: Already installed! (9 of 33)
opus/1.4: Already installed! (10 of 33)
vaapi/system: Already installed! (11 of 33)
vdpau/system: Already installed! (12 of 33)
xorg/system: Already installed! (13 of 33)
xz_utils/5.4.5: Already installed! (14 of 33)
zlib/1.2.13: Already installed! (15 of 33)
libmp3lame/3.100: Already installed! (16 of 33)
libvpx/1.11.0: Already installed! (17 of 33)
libx264/cci.20220602: Already installed! (18 of 33)
libx265/3.4: Already installed! (19 of 33)
openh264/2.3.1: Already installed! (20 of 33)
mpg123/1.31.2: Already installed! (21 of 33)
mpg123/1.31.2: Appending PATH environment variable: /opt/mr/.conan2/p/b/mpg1277aabeb8efe90/p/bin
libalsa/1.2.10: Already installed! (22 of 33)
autoconf/2.71: Already installed! (23 of 33)
flac/1.4.2: Already installed! (24 of 33)
flac/1.4.2: Appending PATH environment variable: /opt/mr/.conan2/p/b/flac5df3c5c9b2ac1/p/bin
libpng/1.6.40: Already installed! (25 of 33)
openssl/3.2.0: Already installed! (26 of 33)
vorbis/1.3.7: Already installed! (27 of 33)
automake/1.16.5: Already installed! (28 of 33)
freetype/2.13.0: Already installed! (29 of 33)
libsndfile/1.2.2: Already installed! (30 of 33)
libtool/2.4.7: Already installed! (31 of 33)
libtool/2.4.7: Appending PATH env: bin_path/opt/mr/.conan2/p/b/libto3e58a979fb085/p/bin
libtool/2.4.7: WARN: The use of 'unix_path_legacy_compat' is deprecated in Conan 2.0 and does not perform path conversions. This is retained for compatibility with Conan 1.x and will be removed in a future version.
libtool/2.4.7: WARN: The use of 'unix_path_legacy_compat' is deprecated in Conan 2.0 and does not perform path conversions. This is retained for compatibility with Conan 1.x and will be removed in a future version.
pulseaudio/14.2: Already installed! (32 of 33)
ffmpeg/6.1: Already installed! (33 of 33)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'cpp_info.names' used in: libx264/cci.20220602, libfdk_aac/2.0.2, xz_utils/5.4.5, libiconv/1.17, bzip2/1.0.8, zlib/1.2.13, freetype/2.13.0, ogg/1.3.5, libalsa/1.2.10, openjpeg/2.5.0, libsndfile/1.2.2, openssl/3.2.0, flac/1.4.2, vorbis/1.3.7, libwebp/1.3.2, brotli/1.1.0, libpng/1.6.40, opus/1.4, mpg123/1.31.2
WARN: deprecated:     'cpp_info.build_modules' used in: openjpeg/2.5.0, openssl/3.2.0, freetype/2.13.0, xz_utils/5.4.5, bzip2/1.0.8
WARN: deprecated:     'env_info' used in: automake/1.16.5, libsndfile/1.2.2, openssl/3.2.0, freetype/2.13.0, libalsa/1.2.10, mpg123/1.31.2, autoconf/2.71, flac/1.4.2, libtool/2.4.7, libiconv/1.17, bzip2/1.0.8, m4/1.4.19
WARN: deprecated:     'cpp_info.filenames' used in: mpg123/1.31.2, freetype/2.13.0, flac/1.4.2, libfdk_aac/2.0.2
WARN: deprecated:     'user_info' used in: automake/1.16.5, freetype/2.13.0

======== Testing the package ========
Removing previously existing 'test_package' build folder: /home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package/build/gcc-11-x86_64-gnu17-release
ffmpeg/6.1 (test package): Test package build: build/gcc-11-x86_64-gnu17-release
ffmpeg/6.1 (test package): Test package build folder: /home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package/build/gcc-11-x86_64-gnu17-release
ffmpeg/6.1 (test package): Writing generators to /home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package/build/gcc-11-x86_64-gnu17-release/generators
ffmpeg/6.1 (test package): Generator 'VirtualRunEnv' calling 'generate()'
ffmpeg/6.1 (test package): Generator 'CMakeToolchain' calling 'generate()'
ffmpeg/6.1 (test package): CMakeToolchain generated: conan_toolchain.cmake
ffmpeg/6.1 (test package): CMakeToolchain generated: CMakePresets.json
ffmpeg/6.1 (test package): CMakeToolchain generated: ../../../CMakeUserPresets.json
ffmpeg/6.1 (test package): Generator 'CMakeDeps' calling 'generate()'
ffmpeg/6.1 (test package): Generating aggregated env files
ffmpeg/6.1 (test package): Generated aggregated env files: ['conanrun.sh', 'conanbuild.sh']

======== Testing the package: Building ========
ffmpeg/6.1 (test package): Calling build()
ffmpeg/6.1 (test package): Running CMake.configure()
ffmpeg/6.1 (test package): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package/build/gcc-11-x86_64-gnu17-release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package"
-- Using Conan toolchain: /home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package/build/gcc-11-x86_64-gnu17-release/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 17 with extensions ON
-- The C compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Conan: Component target declared 'ffmpeg::avutil'
-- Conan: Component target declared 'ffmpeg::swscale'
-- Conan: Component target declared 'ffmpeg::swresample'
-- Conan: Component target declared 'ffmpeg::postproc'
-- Conan: Component target declared 'ffmpeg::avcodec'
-- Conan: Component target declared 'ffmpeg::avformat'
-- Conan: Component target declared 'ffmpeg::avfilter'
-- Conan: Component target declared 'ffmpeg::avdevice'
-- Conan: Target declared 'ffmpeg::ffmpeg'
-- Conan: Target declared 'LibLZMA::LibLZMA'
-- Conan: Including build module from '/opt/mr/.conan2/p/b/xz_ute1a8167c1bfa9/p/lib/cmake/conan-official-xz_utils-variables.cmake'
-- Conan: Target declared 'Freetype::Freetype'
-- Conan: Target declared 'PNG::PNG'
-- Conan: Target declared 'ZLIB::ZLIB'
-- Conan: Target declared 'BZip2::BZip2'
-- Conan: Including build module from '/opt/mr/.conan2/p/bzip274dd66a247bd5/p/lib/cmake/conan-official-bzip2-variables.cmake'
-- Conan: Component target declared 'brotli::brotlicommon'
-- Conan: Component target declared 'brotli::brotlidec'
-- Conan: Component target declared 'brotli::brotlienc'
-- Conan: Target declared 'brotli::brotli'
-- Conan: Including build module from '/opt/mr/.conan2/p/b/freet053ee0b109fe6/p/lib/cmake/conan-official-freetype-variables.cmake'
-- Conan: Target declared 'openjp2'
-- Conan: Including build module from '/opt/mr/.conan2/p/b/openjd6db0a8e4c204/p/lib/cmake/conan-official-openjpeg-variables.cmake'
-- Conan: Target declared 'openh264::openh264'
-- Conan: Target declared 'libx264::libx264'
-- Conan: Target declared 'libx265::libx265'
-- Conan: Target declared 'libvpx::libvpx'
-- Conan: Component target declared 'FDK-AAC::fdk-aac'
-- Conan: Component target declared 'WebP::webpdecoder'
-- Conan: Component target declared 'WebP::sharpyuv'
-- Conan: Component target declared 'WebP::webp'
-- Conan: Component target declared 'WebP::webpdemux'
-- Conan: Component target declared 'WebP::libwebpmux'
-- Conan: Target declared 'libwebp::libwebp'
-- Conan: Component target declared 'pulseaudio::pulse'
-- Conan: Component target declared 'pulseaudio::pulse-simple'
-- Conan: Target declared 'pulseaudio::pulseaudio'
-- Conan: Target declared 'Iconv::Iconv'
-- Conan: Component target declared 'SndFile::sndfile'
-- Conan: Component target declared 'Vorbis::vorbis'
-- Conan: Component target declared 'Vorbis::vorbisenc'
-- Conan: Component target declared 'Vorbis::vorbisfile'
-- Conan: Component target declared 'vorbis::vorbisenc-alias'
-- Conan: Component target declared 'vorbis::vorbisfile-alias'
-- Conan: Target declared 'vorbis::vorbis'
-- Conan: Component target declared 'Ogg::ogg'
-- Conan: Component target declared 'FLAC::FLAC'
-- Conan: Component target declared 'FLAC::FLAC++'
-- Conan: Target declared 'flac::flac'
-- Conan: Component target declared 'Opus::opus'
-- Conan: Component target declared 'MPG123::libmpg123'
-- Conan: Component target declared 'MPG123::libout123'
-- Conan: Component target declared 'MPG123::libsyn123'
-- Conan: Target declared 'mpg123::mpg123'
-- Conan: Target declared 'libmp3lame::libmp3lame'
-- Conan: Component target declared 'libcap::cap'
-- Conan: Target declared 'libcap::libcap'
-- Conan: Target declared 'libtool::libtool'
-- Conan: Target declared 'automake::automake'
-- Conan: Target declared 'autoconf::autoconf'
-- Conan: Target declared 'm4::m4'
-- Conan: Target declared 'ALSA::ALSA'
-- Conan: Component target declared 'xorg::x11'
-- Conan: Component target declared 'xorg::x11-xcb'
-- Conan: Component target declared 'xorg::fontenc'
-- Conan: Component target declared 'xorg::ice'
-- Conan: Component target declared 'xorg::xau'
-- Conan: Component target declared 'xorg::xaw7'
-- Conan: Component target declared 'xorg::xcomposite'
-- Conan: Component target declared 'xorg::xcursor'
-- Conan: Component target declared 'xorg::xdamage'
-- Conan: Component target declared 'xorg::xdmcp'
-- Conan: Component target declared 'xorg::xext'
-- Conan: Component target declared 'xorg::xfixes'
-- Conan: Component target declared 'xorg::xi'
-- Conan: Component target declared 'xorg::xinerama'
-- Conan: Component target declared 'xorg::xkbfile'
-- Conan: Component target declared 'xorg::xmu'
-- Conan: Component target declared 'xorg::xmuu'
-- Conan: Component target declared 'xorg::xpm'
-- Conan: Component target declared 'xorg::xrandr'
-- Conan: Component target declared 'xorg::xrender'
-- Conan: Component target declared 'xorg::xres'
-- Conan: Component target declared 'xorg::xscrnsaver'
-- Conan: Component target declared 'xorg::xt'
-- Conan: Component target declared 'xorg::xtst'
-- Conan: Component target declared 'xorg::xv'
-- Conan: Component target declared 'xorg::xvmc'
-- Conan: Component target declared 'xorg::xxf86vm'
-- Conan: Component target declared 'xorg::xcb-xkb'
-- Conan: Component target declared 'xorg::xcb-icccm'
-- Conan: Component target declared 'xorg::xcb-image'
-- Conan: Component target declared 'xorg::xcb-keysyms'
-- Conan: Component target declared 'xorg::xcb-randr'
-- Conan: Component target declared 'xorg::xcb-render'
-- Conan: Component target declared 'xorg::xcb-renderutil'
-- Conan: Component target declared 'xorg::xcb-shape'
-- Conan: Component target declared 'xorg::xcb-shm'
-- Conan: Component target declared 'xorg::xcb-sync'
-- Conan: Component target declared 'xorg::xcb-xfixes'
-- Conan: Component target declared 'xorg::xcb-xinerama'
-- Conan: Component target declared 'xorg::xcb'
-- Conan: Component target declared 'xorg::xcb-atom'
-- Conan: Component target declared 'xorg::xcb-aux'
-- Conan: Component target declared 'xorg::xcb-event'
-- Conan: Component target declared 'xorg::xcb-util'
-- Conan: Component target declared 'xorg::xcb-dri3'
-- Conan: Component target declared 'xorg::uuid'
-- Conan: Component target declared 'xorg::sm'
-- Conan: Target declared 'xorg::xorg'
-- Conan: Component target declared 'OpenSSL::Crypto'
-- Conan: Component target declared 'OpenSSL::SSL'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Including build module from '/opt/mr/.conan2/p/b/opense22a70964745a/p/lib/cmake/conan-official-openssl-variables.cmake'
-- Conan: Component target declared 'vaapi::libva'
-- Conan: Component target declared 'vaapi::libva-x11'
-- Conan: Component target declared 'vaapi::libva-drm'
-- Conan: Target declared 'vaapi::vaapi'
-- Conan: Target declared 'vdpau::vdpau'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package/build/gcc-11-x86_64-gnu17-release

ffmpeg/6.1 (test package): Running CMake.build()
ffmpeg/6.1 (test package): RUN: cmake --build "/home/spiderkeys/z/workspace/conan-center-index/recipes/ffmpeg/all/test_package/build/gcc-11-x86_64-gnu17-release" -- -j8
[ 50%] Building C object CMakeFiles/test_package.dir/test_package.c.o
[100%] Linking C executable test_package
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio_dec.o): in function `audio_read_packet':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_dec.c:68: undefined reference to `sio_read'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_dec.c:69: undefined reference to `sio_eof'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio_enc.o): in function `audio_write_trailer':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_enc.c:76: undefined reference to `sio_write'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio_enc.o): in function `audio_write_packet':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_enc.c:61: undefined reference to `sio_write'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio_enc.c:62: undefined reference to `sio_eof'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio.o): in function `ff_sndio_close':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:117: undefined reference to `sio_close'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/p/lib/libavdevice.a(sndio.o): in function `ff_sndio_open':
/opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:43: undefined reference to `sio_open'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:49: undefined reference to `sio_initpar'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:61: undefined reference to `sio_setpar'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:61: undefined reference to `sio_getpar'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:92: undefined reference to `sio_onmove'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:94: undefined reference to `sio_start'
/usr/bin/ld: /opt/mr/.conan2/p/b/ffmped2a1b8de57509/b/build-release/src/libavdevice/sndio.c:107: undefined reference to `sio_close'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/test_package.dir/build.make:146: test_package] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/test_package.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

*********************************************************
Recipe 'ffmpeg/6.1 (test package)' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: ffmpeg/6.1 (test package): Error in build() method, line 21
        cmake.build()
        ConanException: Error 2 while executing
@AbrilRBS AbrilRBS self-assigned this Dec 8, 2023
@memsharded
Copy link
Member

I have done a quick check with:

  • Ubuntu 20.04, running on docker on Windows
  • gcc 11

Here it seems it works ok, downloading the ConanCenter pre-compiled binary.

Maybe you can try to omit the --build=missing, and force an actual build of the binary locally and see if it works? Just to check that your locally built binary works fine (here the locally built binary also works fine)

@spiderkeys
Copy link
Author

spiderkeys commented Dec 9, 2023

(Note: sorry, just realized I filed this to the conan repo instead of cci)

Hm, it also works for me in the case where I build within a docker container (tried ubuntu:22.04). I built both using the existing conan-center prebuilt binaries, and also forced a complete rebuild of all deps with --build=missing and a custom setting added to make all package IDs change.

Both built successfully, so it seems like this may be environment related on my side somehow, but I can't really think of what. I know that libsndio is present in my host environment:

$ dpkg -l | grep sndio
ii  libsndio-dev:amd64                                 1.8.1-1.1                                   amd64        Small audio and MIDI framework from OpenBSD, development files
ii  libsndio7.0:amd64                                  1.8.1-1.1                                   amd64        Small audio and MIDI framework from OpenBSD, runtime libraries
ii  libsndio7.0:i386                                   1.8.1-1.1                                   i386         Small audio and MIDI framework from OpenBSD, runtime libraries

$ dpkg -L libsndio-dev:amd64
/.
/usr
/usr/include
/usr/include/sndio.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/sndio.pc
/usr/share
/usr/share/doc
/usr/share/doc/libsndio-dev
/usr/share/doc/libsndio-dev/copyright
/usr/share/man
/usr/share/man/man3
/usr/share/man/man3/mio_open.3.gz
/usr/share/man/man3/sio_open.3.gz
/usr/share/man/man3/sioctl_close.3.gz
/usr/share/man/man3/sioctl_eof.3.gz
/usr/share/man/man3/sioctl_nfds.3.gz
/usr/share/man/man3/sioctl_ondesc.3.gz
/usr/share/man/man3/sioctl_onval.3.gz
/usr/share/man/man3/sioctl_open.3.gz
/usr/share/man/man3/sioctl_pollfd.3.gz
/usr/share/man/man3/sioctl_revents.3.gz
/usr/share/man/man3/sioctl_setval.3.gz
/usr/lib/x86_64-linux-gnu/libsndio.so
/usr/share/doc/libsndio-dev/changelog.Debian.gz
/usr/share/man/man3/mio_close.3.gz
/usr/share/man/man3/mio_eof.3.gz
/usr/share/man/man3/mio_nfds.3.gz
/usr/share/man/man3/mio_pollfd.3.gz
/usr/share/man/man3/mio_read.3.gz
/usr/share/man/man3/mio_revents.3.gz
/usr/share/man/man3/mio_write.3.gz
/usr/share/man/man3/sio_close.3.gz
/usr/share/man/man3/sio_eof.3.gz
/usr/share/man/man3/sio_getcap.3.gz
/usr/share/man/man3/sio_getpar.3.gz
/usr/share/man/man3/sio_initpar.3.gz
/usr/share/man/man3/sio_nfds.3.gz
/usr/share/man/man3/sio_onmove.3.gz
/usr/share/man/man3/sio_onvol.3.gz
/usr/share/man/man3/sio_pollfd.3.gz
/usr/share/man/man3/sio_read.3.gz
/usr/share/man/man3/sio_revents.3.gz
/usr/share/man/man3/sio_setpar.3.gz
/usr/share/man/man3/sio_setvol.3.gz
/usr/share/man/man3/sio_start.3.gz
/usr/share/man/man3/sio_stop.3.gz
/usr/share/man/man3/sio_write.3.gz

$ readelf -s /usr/lib/x86_64-linux-gnu/libsndio.so | grep sio_
    99: 0000000000009310   995 FUNC    GLOBAL DEFAULT   14 _sio_alsa_open
   101: 000000000000b0f0   460 FUNC    GLOBAL DEFAULT   14 sio_open
   107: 00000000000072e0    31 FUNC    GLOBAL DEFAULT   14 sio_initpar
   109: 0000000000007300    44 FUNC    GLOBAL DEFAULT   14 _sio_create
   112: 00000000000078f0   373 FUNC    GLOBAL DEFAULT   14 sio_revents
   113: 0000000000007bc0   326 FUNC    GLOBAL DEFAULT   14 sio_read
   114: 0000000000008d40    25 FUNC    GLOBAL DEFAULT   14 _sio_onvol_cb
   121: 0000000000008c70    79 FUNC    GLOBAL DEFAULT   14 sio_setvol
   122: 000000000000adf0   186 FUNC    GLOBAL DEFAULT   14 _sio_aucat_open
   126: 0000000000007460   395 FUNC    GLOBAL DEFAULT   14 sio_setpar
   127: 0000000000008590   190 FUNC    GLOBAL DEFAULT   14 _sio_onmove_cb
   128: 0000000000007e70   105 FUNC    GLOBAL DEFAULT   14 sio_onmove
   129: 0000000000007330     9 FUNC    GLOBAL DEFAULT   14 sio_close
   134: 00000000000075f0   194 FUNC    GLOBAL DEFAULT   14 sio_getpar
   135: 0000000000007e60     8 FUNC    GLOBAL DEFAULT   14 sio_eof
   138: 0000000000008cc0   123 FUNC    GLOBAL DEFAULT   14 sio_onvol
   142: 00000000000078b0    10 FUNC    GLOBAL DEFAULT   14 sio_nfds
   143: 0000000000007ee0   493 FUNC    GLOBAL DEFAULT   14 _sio_printpos
   145: 0000000000007d10   334 FUNC    GLOBAL DEFAULT   14 sio_write
   146: 00000000000076c0   330 FUNC    GLOBAL DEFAULT   14 sio_start
   148: 0000000000007340   277 FUNC    GLOBAL DEFAULT   14 sio_stop
   151: 00000000000078c0    35 FUNC    GLOBAL DEFAULT   14 sio_pollfd
   153: 0000000000007810   154 FUNC    GLOBAL DEFAULT   14 sio_getcap

Seems like somehow the test is not transitively being linked to libsndio in my environment.

From what I can tell, there is no explicit path for the conan ffmpeg to ensure the libsndio deps are available.

The two paths where I thought this may be happening along were:

  1. If ffmpeg:with_pulse==True, pulseaudio is required, which requires libsndfile, which should provide libsndio through its own FindSndio.cmake file:
    https://github.com/libsndfile/libsndfile/blob/master/cmake/FindSndio.cmake
    Of note within the libsndfile conan recipe:
    def generate(self):
        tc = CMakeToolchain(self)
        tc.variables["CMAKE_DISABLE_FIND_PACKAGE_Sndio"] = True  # FIXME: missing sndio cci recipe (check whether it is really required)
        tc.variables["CMAKE_DISABLE_FIND_PACKAGE_Speex"] = True  # FIXME: missing sndio cci recipe (check whether it is really required)

with_pulse is true by default, so I could see this being the path it comes in through.

  1. If ffmpeg:with_sdl==True, sdl is required, and if sdl:sndio==True, we should get in SDL's recipe
self.cpp_info.components["libsdl2"].requires.append("sndio::sndio")

however, you will note also within the recipe:

if self.settings.os == "Linux":
            if self.options.sndio:
                raise ConanInvalidConfiguration("Package for 'sndio' is not available (yet)")

So it doesn't seem like it can come in through SDL. Also with_sdl is false by default for ffmpeg.

All of this said, I'm not sure how exactly a fresh build within a container is finding it correctly, but a fresh build in my host environment (which should generally be very similar, and does indeed have a pkgconfig-findable libsndio installed) would not.

@spiderkeys
Copy link
Author

spiderkeys commented Mar 12, 2024

Still having this issue using the latest ffmpeg recipe on both my desktop and laptop (both running Kubuntu 22.04). Given that the issue does not occur within a container, I would like to understand why it happens in my specific environment.

Any thoughts on how I could continue to debug what is happening here?

(Also, thinking maybe I should migrate this issue to conan-center-index, where I had meant to open it originally?)

@spiderkeys
Copy link
Author

spiderkeys commented Mar 13, 2024

I've create a PR that solves this issue by creating a recipe for libsndio. Please let me know your thoughts on this approach.

@memsharded
Copy link
Member

I have give this another try, now in my WSL (Ubuntu 22) environment, still can't make it fail, seems to be working fine here.

I don't have any dpkg -l | grep sndio in my system (I had to activate conan create . --version 6.1 --build missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True in order to succeed.

I'd definitely like to know better what is the reason, the PR conan-io/conan-center-index#23087 looks good, but it would be better to understand what is happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants