conan-io / conan-center-index

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

[package] ffmpeg/7.0.1: MSYS2 MinGW-w64: OpenH264 and dav1d compilation failure (nasm) #24920

Open olekolek1000 opened 2 months ago

olekolek1000 commented 2 months ago

Description

Installing ffmpeg with with_openh264=True or with_libdav1d=True causes nasm-related compilation failure.

Interestingly, nasm is properly detected by Meson: Program nasm found: YES.

Package and Environment Details

Conan profile

Host profile: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu17 compiler.libcxx=libstdc++11 compiler.version=14 os=Windows

Build profile: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=gnu17 compiler.libcxx=libstdc++11 compiler.version=14 os=Windows

Steps to reproduce

  1. Clean-install msys2 from https://www.msys2.org/ (Windows 11)
  2. Run MSYS2-MinGW64 (and update via pacman -Syu)
  3. Install mingw64/pip
  4. pip install conan
  5. Install ffmpeg with specific options:
ffmpeg*:shared=True
ffmpeg*:avcodec=True
ffmpeg*:swscale=True
ffmpeg*:avdevice=True
ffmpeg*:avfilter=True
ffmpeg*:avformat=True
ffmpeg*:postproc=True
ffmpeg*:with_asm=True
ffmpeg*:with_sdl=False
ffmpeg*:with_ssl=openssl
ffmpeg*:with_xcb=False
ffmpeg*:with_lzma=False
ffmpeg*:with_opus=True
ffmpeg*:with_zlib=True
ffmpeg*:swresample=True
ffmpeg*:with_bzip2=False
ffmpeg*:with_pulse=False
ffmpeg*:with_vaapi=False
ffmpeg*:with_vdpau=False
ffmpeg*:with_libaom=True
ffmpeg*:with_libvpx=True
ffmpeg*:with_vorbis=True
ffmpeg*:with_vulkan=False
ffmpeg*:with_zeromq=False
ffmpeg*:with_libalsa=False
ffmpeg*:with_libwebp=False
ffmpeg*:with_libx264=False
ffmpeg*:with_libx265=False
ffmpeg*:with_freetype=False
ffmpeg*:with_libdav1d=False
ffmpeg*:with_libiconv=False
ffmpeg*:with_openh264=True
ffmpeg*:with_openjpeg=True
ffmpeg*:with_programs=False
ffmpeg*:with_libsvtav1=False
ffmpeg*:with_libfdk_aac=False
ffmpeg*:with_libmp3lame=True
ffmpeg*:disable_all_muxers=False
ffmpeg*:disable_everything=False
ffmpeg*:disable_all_devices=False
ffmpeg*:disable_all_filters=False
ffmpeg*:disable_all_parsers=False
ffmpeg*:disable_all_decoders=False
ffmpeg*:disable_all_demuxers=False
ffmpeg*:disable_all_encoders=False
ffmpeg*:disable_all_protocols=False
ffmpeg*:disable_all_input_devices=False
ffmpeg*:disable_all_output_devices=False
ffmpeg*:disable_all_bitstream_filters=False
ffmpeg*:disable_all_hardware_accelerators=False

Logs

Click to expand log ``` openh264/2.3.1: RUN: meson setup --native-file "C:/Users/user/.conan2/p/b/openheee399916c7ba/b/build-release/conan/conan_meson_native.ini" "C:/Users/user/.conan2/p/b/openheee399916c7ba/b/build-release" "C:/Users/user/.conan2/p/b/openheee399916c7ba/b/src" --prefix=/ The Meson build system Version: 1.4.1 Source dir: C:/Users/user/.conan2/p/b/openheee399916c7ba/b/src Build dir: C:/Users/user/.conan2/p/b/openheee399916c7ba/b/build-release Build type: native build Project name: openh264 Project version: 2.3.1 C compiler for the host machine: gcc (gcc 14.2.0 "gcc (Rev1, Built by MSYS2 project) 14.2.0") C linker for the host machine: gcc ld.bfd 2.42 C++ compiler for the host machine: g++ (gcc 14.2.0 "g++ (Rev1, Built by MSYS2 project) 14.2.0") C++ linker for the host machine: g++ ld.bfd 2.42 Host machine cpu family: x86_64 Host machine cpu: x86_64 Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES Compiler for C++ supports arguments -Wno-class-memaccess: YES Compiler for C++ supports arguments -Wno-strict-aliasing: YES Run-time dependency threads found: YES Library m found: YES Program nasm found: YES Found pkg-config: YES (C:/Users/user/.conan2/p/pkgcoe905804c6b50c/p/bin/pkgconf.exe) 2.2.0 Build targets in project: 8 openh264 2.3.1 User defined options Native files: C:/Users/user/.conan2/p/b/openheee399916c7ba/b/build-release/conan/conan_meson_native.ini prefix : / Found ninja-1.11.1 at C:/Users/user/.conan2/p/ninjae2ad385cd85df/p/bin/ninja.EXE openh264/2.3.1: Meson build cmd: meson compile -C "C:/Users/user/.conan2/p/b/openheee399916c7ba/b/build-release" -j16 openh264/2.3.1: RUN: meson compile -C "C:/Users/user/.conan2/p/b/openheee399916c7ba/b/build-release" -j16 INFO: autodetecting backend as ninja INFO: calculating backend command to run: C:/Users/user/.conan2/p/ninjae2ad385cd85df/p/bin/ninja.EXE -j 16 ninja: error: 'C:/Users/user/.conan2/p/nasm82fc2c9a305c1/p/bin/nasm', needed by 'codec/common/libcommon.a.p/cpuid.o', missing and no known rule to make it openh264/2.3.1: ERROR: Package '247c82a7ffee9cb8cee8b17216f90a338f3de7b6' build failed openh264/2.3.1: WARN: Build folder C:/Users/user/.conan2/p/b/openheee399916c7ba/b/build-release ERROR: openh264/2.3.1: Error in build() method, line 88 meson.build() ConanException: Error 1 while executing ```
olekolek1000 commented 2 months ago

QUICK UPDATE: Can be temporarily fixed by copying nasm.exe to nasm in C:\Users\user\.conan2\p\nasm82fc2c9a305c1\p\bin.

image

olekolek1000 commented 2 months ago

Further configuration steps are failing anyways, like not finding openh264 via pkg-config.