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

[ffmpeg] Build error on x64-linux #42084

Open
9034725985 opened this issue Nov 10, 2024 · 3 comments
Open

[ffmpeg] Build error on x64-linux #42084

9034725985 opened this issue Nov 10, 2024 · 3 comments
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@9034725985
Copy link

Copy issue body from /home/kushal/source/ladybird/Build/release/vcpkg_installed/vcpkg/issue_body.md

Package: ffmpeg[avcodec,avdevice,avfilter,avformat,core,dav1d,openh264,opus,swresample,swscale,theora,vorbis,vpx,webp,zlib]:[email protected]#11

Host Environment

  • Host: x64-linux
  • Compiler: GNU 14.2.1
  • vcpkg-tool version: 2024-10-18-e392d7347fe72dff56e7857f7571c22301237ae6
    vcpkg-scripts version: 10b7a17 2024-10-21 (3 weeks ago)

To Reproduce

vcpkg install --no-print-usage

Failure logs

-- Using cached ffmpeg-ffmpeg-n6.1.1.tar.gz.
-- Cleaning sources at /home/kushal/source/ladybird/Build/vcpkg/buildtrees/ffmpeg/src/n6.1.1-95b141da41.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/kushal/source/ladybird/Build/vcpkg/downloads/ffmpeg-ffmpeg-n6.1.1.tar.gz
-- Applying patch 0001-create-lib-libraries.patch
-- Applying patch 0002-fix-msvc-link.patch
-- Applying patch 0003-fix-windowsinclude.patch
-- Applying patch 0004-dependencies.patch
-- Applying patch 0005-fix-nasm.patch
-- Applying patch 0007-fix-lib-naming.patch
-- Applying patch 0012-Fix-ssl-110-detection.patch
-- Applying patch 0013-define-WINVER.patch
-- Applying patch 0020-fix-aarch64-libswscale.patch
-- Applying patch 0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch
-- Applying patch 0041-add-const-for-opengl-definition.patch
-- Applying patch 0042-fix-arm64-linux.patch
-- Using source at /home/kushal/source/ladybird/Build/vcpkg/buildtrees/ffmpeg/src/n6.1.1-95b141da41.clean
-- Found external ninja('1.12.1').
-- Getting CMake variables for x64-linux
-- Building Options: --enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect --target-os=linux --enable-pthreads --cc=cc --cxx=c++ --nm=nm --ar='ar' --ranlib=ranlib --strip=strip --disable-ffmpeg --disable-ffplay --disable-ffprobe --enable-avcodec --enable-avdevice --enable-avformat --enable-avfilter --disable-postproc --enable-swresample --enable-swscale --disable-alsa --disable-amf --disable-libaom --disable-libass --disable-avisynth --disable-bzlib --enable-libdav1d --disable-libfdk-aac --disable-libfontconfig --disable-libfreetype --disable-libfribidi --disable-iconv --disable-libilbc --disable-lzma --disable-libmp3lame --disable-libmodplug --disable-cuda --disable-nvenc --disable-nvdec  --disable-cuvid --disable-ffnvcodec --disable-opencl --disable-opengl --enable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --disable-openssl --enable-libopus --disable-sdl2 --disable-libsnappy --disable-libsoxr --disable-libspeex --disable-libssh --disable-libtensorflow --disable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --disable-libx264 --disable-libx265 --disable-libxml2 --enable-zlib --disable-libsrt --disable-libmfx --enable-cross-compile --disable-static --enable-shared --pkg-config=/bin/pkg-config
-- Building Release Options: --enable-optimizations --extra-ldflags=-L"/home/kushal/source/ladybird/Build/release/vcpkg_installed/x64-linux/lib"
-- Building ffmpeg for Release
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavcodec.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavdevice.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavfilter.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavformat.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavutil.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libswresample.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libswscale.pc
CMake Error at /home/kushal/source/ladybird/Build/release/vcpkg_installed/x64-linux/share/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.cmake:31 (execute_process):
  execute_process failed command indexes:

    1: "Abnormal exit with child return code: Segmentation fault"

Call Stack (most recent call first):
  buildtrees/versioning_/versions/ffmpeg/15b90b33b76e69c2d9b876b32c4c9b47c97846ed/portfile.cmake:892 (x_vcpkg_pkgconfig_get_modules)
  scripts/ports.cmake:192 (include)



Additional context

vcpkg.json
{
  "builtin-baseline": "10b7a178346f3f0abef60cecd5130e295afd8da4",
  "dependencies": [
    {
      "name": "curl",
      "features": [
        "brotli",
        "http2"
      ]
    },
    {
      "name": "dirent",
      "platform": "windows"
    },
    {
      "name": "ffmpeg",
      "platform": "!android",
      "features": [
        "avcodec",
        "avformat",
        "dav1d",
        "openh264",
        "opus",
        "webp",
        "theora",
        "vorbis",
        "vpx",
        "zlib"
      ]
    },
    {
      "name": "fontconfig",
      "platform": "linux | freebsd | openbsd | osx | windows"
    },
    {
      "name": "harfbuzz",
      "platform": "linux | freebsd | openbsd | windows",
      "features": [
        "freetype",
        "icu"
      ]
    },
    {
      "name": "harfbuzz",
      "platform": "osx",
      "features": [
        "coretext",
        "icu"
      ]
    },
    "icu",
    "libjpeg-turbo",
    "libjxl",
    {
      "name": "libpng",
      "features": [
        "apng"
      ]
    },
    {
      "name": "libavif",
      "features": [
        "dav1d"
      ]
    },
    {
      "name": "libwebp",
      "features": [
        "anim",
        "libwebpmux",
        "simd"
      ]
    },
    "simdutf",
    {
      "name": "skia",
      "platform": "osx",
      "features": [
        "metal",
        "fontconfig",
        "harfbuzz",
        "icu"
      ]
    },
    {
      "name": "skia",
      "platform": "linux | freebsd | openbsd | windows",
      "features": [
        "freetype",
        "fontconfig",
        "harfbuzz",
        "icu",
        "vulkan"
      ]
    },
    {
      "name": "skia",
      "platform": "android"
    },
    "sqlite3",
    {
      "name": "vulkan",
      "platform": "!android"
    },
    {
      "name": "vulkan-headers",
      "platform": "!android"
    },
    "woff2"
  ],
  "overrides": [
    {
      "name": "curl",
      "version": "8.10.1#0"
    },
    {
      "name": "ffmpeg",
      "version": "6.1.1#11"
    },
    {
      "name": "fontconfig",
      "version": "2.14.2#1"
    },
    {
      "name": "icu",
      "version": "74.2#2"
    },
    {
      "name": "libjpeg-turbo",
      "version": "3.0.2"
    },
    {
      "name": "libjxl",
      "version": "0.11.0"
    },
    {
      "name": "libpng",
      "version": "1.6.43#3"
    },
    {
      "name": "libavif",
      "version": "1.0.4#1"
    },
    {
      "name": "libwebp",
      "version": "1.4.0#1"
    },
    {
      "name": "simdutf",
      "version": "5.6.0#0"
    },
    {
      "name": "skia",
      "version": "129#0"
    },
    {
      "name": "sqlite3",
      "version": "3.46.1"
    },
    {
      "name": "woff2",
      "version": "1.0.2#4"
    }
  ]
}

I tried again by switching to master branch and running install

Package: ffmpeg[avcodec,avdevice,avfilter,avformat,core,dav1d,openh264,opus,swresample,swscale,theora,vorbis,vpx,webp,zlib]:[email protected]#11

Host Environment

  • Host: x64-linux
  • Compiler: GNU 14.2.1
  • vcpkg-tool version: 2024-10-18-1.fc41
    vcpkg-scripts version: 813a241 2024-11-08 (34 hours ago)

To Reproduce

vcpkg install

Failure logs

-- Using cached ffmpeg-ffmpeg-n6.1.1.tar.gz.
-- Cleaning sources at /home/kushal/source/ladybird/Build/vcpkg/buildtrees/ffmpeg/src/n6.1.1-95b141da41.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/kushal/source/ladybird/Build/vcpkg/downloads/ffmpeg-ffmpeg-n6.1.1.tar.gz
-- Applying patch 0001-create-lib-libraries.patch
-- Applying patch 0002-fix-msvc-link.patch
-- Applying patch 0003-fix-windowsinclude.patch
-- Applying patch 0004-dependencies.patch
-- Applying patch 0005-fix-nasm.patch
-- Applying patch 0007-fix-lib-naming.patch
-- Applying patch 0012-Fix-ssl-110-detection.patch
-- Applying patch 0013-define-WINVER.patch
-- Applying patch 0020-fix-aarch64-libswscale.patch
-- Applying patch 0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch
-- Applying patch 0041-add-const-for-opengl-definition.patch
-- Applying patch 0042-fix-arm64-linux.patch
-- Using source at /home/kushal/source/ladybird/Build/vcpkg/buildtrees/ffmpeg/src/n6.1.1-95b141da41.clean
-- Found external ninja('1.12.1').
-- Getting CMake variables for x64-linux
-- Building Options: --enable-pic --disable-doc --enable-debug --enable-runtime-cpudetect --disable-autodetect --target-os=linux --enable-pthreads --cc=cc --cxx=c++ --nm=nm --ar='ar' --ranlib=ranlib --strip=strip --disable-ffmpeg --disable-ffplay --disable-ffprobe --enable-avcodec --enable-avdevice --enable-avformat --enable-avfilter --disable-postproc --enable-swresample --enable-swscale --disable-alsa --disable-amf --disable-libaom --disable-libass --disable-avisynth --disable-bzlib --enable-libdav1d --disable-libfdk-aac --disable-libfontconfig --disable-libfreetype --disable-libfribidi --disable-iconv --disable-libilbc --disable-lzma --disable-libmp3lame --disable-libmodplug --disable-cuda --disable-nvenc --disable-nvdec  --disable-cuvid --disable-ffnvcodec --disable-opencl --disable-opengl --enable-libopenh264 --disable-libopenjpeg --disable-libopenmpt --disable-openssl --enable-libopus --disable-sdl2 --disable-libsnappy --disable-libsoxr --disable-libspeex --disable-libssh --disable-libtensorflow --disable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --disable-libx264 --disable-libx265 --disable-libxml2 --enable-zlib --disable-libsrt --disable-libmfx --enable-cross-compile --pkg-config=/bin/pkg-config --pkg-config-flags=--static
-- Building Release Options: --enable-optimizations --extra-ldflags=-L"/home/kushal/source/ladybird/vcpkg_installed/x64-linux/lib"
-- Building ffmpeg for Release
-- Building Debug Options: --disable-optimizations --extra-ldflags=-L"/home/kushal/source/ladybird/vcpkg_installed/x64-linux/debug/lib"
-- Building ffmpeg for Debug
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavcodec.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavdevice.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavfilter.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavformat.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libavutil.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libswresample.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig/libswscale.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/debug/lib/pkgconfig/libavcodec.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/debug/lib/pkgconfig/libavdevice.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/debug/lib/pkgconfig/libavfilter.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/debug/lib/pkgconfig/libavformat.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/debug/lib/pkgconfig/libavutil.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/debug/lib/pkgconfig/libswresample.pc
-- Fixing pkgconfig file: /home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/debug/lib/pkgconfig/libswscale.pc
CMake Error at /home/kushal/source/ladybird/vcpkg_installed/x64-linux/share/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.cmake:31 (execute_process):
  execute_process failed command indexes:

    1: "Abnormal exit with child return code: Segmentation fault"

Call Stack (most recent call first):
  buildtrees/versioning_/versions/ffmpeg/15b90b33b76e69c2d9b876b32c4c9b47c97846ed/portfile.cmake:892 (x_vcpkg_pkgconfig_get_modules)
  scripts/ports.cmake:192 (include)



Additional context

vcpkg.json
{
  "builtin-baseline": "10b7a178346f3f0abef60cecd5130e295afd8da4",
  "dependencies": [
    {
      "name": "curl",
      "features": [
        "brotli",
        "http2"
      ]
    },
    {
      "name": "dirent",
      "platform": "windows"
    },
    {
      "name": "ffmpeg",
      "platform": "!android",
      "features": [
        "avcodec",
        "avformat",
        "dav1d",
        "openh264",
        "opus",
        "webp",
        "theora",
        "vorbis",
        "vpx",
        "zlib"
      ]
    },
    {
      "name": "fontconfig",
      "platform": "linux | freebsd | openbsd | osx | windows"
    },
    {
      "name": "harfbuzz",
      "platform": "linux | freebsd | openbsd | windows",
      "features": [
        "freetype",
        "icu"
      ]
    },
    {
      "name": "harfbuzz",
      "platform": "osx",
      "features": [
        "coretext",
        "icu"
      ]
    },
    "icu",
    "libjpeg-turbo",
    "libjxl",
    {
      "name": "libpng",
      "features": [
        "apng"
      ]
    },
    {
      "name": "libavif",
      "features": [
        "dav1d"
      ]
    },
    {
      "name": "libwebp",
      "features": [
        "anim",
        "libwebpmux",
        "simd"
      ]
    },
    "simdutf",
    {
      "name": "skia",
      "platform": "osx",
      "features": [
        "metal",
        "fontconfig",
        "harfbuzz",
        "icu"
      ]
    },
    {
      "name": "skia",
      "platform": "linux | freebsd | openbsd | windows",
      "features": [
        "freetype",
        "fontconfig",
        "harfbuzz",
        "icu",
        "vulkan"
      ]
    },
    {
      "name": "skia",
      "platform": "android"
    },
    "sqlite3",
    {
      "name": "vulkan",
      "platform": "!android"
    },
    {
      "name": "vulkan-headers",
      "platform": "!android"
    },
    "woff2"
  ],
  "overrides": [
    {
      "name": "curl",
      "version": "8.10.1#0"
    },
    {
      "name": "ffmpeg",
      "version": "6.1.1#11"
    },
    {
      "name": "fontconfig",
      "version": "2.14.2#1"
    },
    {
      "name": "icu",
      "version": "74.2#2"
    },
    {
      "name": "libjpeg-turbo",
      "version": "3.0.2"
    },
    {
      "name": "libjxl",
      "version": "0.11.0"
    },
    {
      "name": "libpng",
      "version": "1.6.43#3"
    },
    {
      "name": "libavif",
      "version": "1.0.4#1"
    },
    {
      "name": "libwebp",
      "version": "1.4.0#1"
    },
    {
      "name": "simdutf",
      "version": "5.6.0#0"
    },
    {
      "name": "skia",
      "version": "129#0"
    },
    {
      "name": "sqlite3",
      "version": "3.46.1"
    },
    {
      "name": "woff2",
      "version": "1.0.2#4"
    }
  ]
}

same problem.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 10, 2024

Which version of pkgconf (aka pkg-config) do you use?
Some versions of pkgconf explode over non-trivial dependency trees.

@9034725985
Copy link
Author

9034725985 commented Nov 10, 2024

I am trying to build ladybird web browser on Fedora 41. I will check what version of pkg config I have.

I think 2.3.0?

dnf info
kushal@flex2024:~/source/zal/zal_program$ dnf info pkgconf-pkg-config
Updating and loading repositories:
Repositories loaded.
Installed packages
Name            : pkgconf-pkg-config
Epoch           : 0
Version         : 2.3.0
Release         : 1.fc41
Architecture    : x86_64
Installed size  : 989.0   B
Source          : pkgconf-2.3.0-1.fc41.src.rpm
From repository : anaconda
Summary         : pkgconf shim to provide /usr/bin/pkg-config
URL             : http://pkgconf.org/
License         : ISC AND BSD-4-Clause AND BSD-2-Clause AND pkgconf AND MIT
Description     : This package provides the shim links for pkgconf to be automatically
                : used in place of pkgconfig. This ensures that pkgconf is used as
                : the system provider of pkg-config.
Vendor          : Fedora Project

Available packages
Name           : pkgconf-pkg-config
Epoch          : 0
Version        : 2.3.0
Release        : 1.fc41
Architecture   : i686
Download size  : 10.0 KiB
Installed size : 979.0   B
Source         : pkgconf-2.3.0-1.fc41.src.rpm
Repository     : fedora
Summary        : pkgconf shim to provide /usr/bin/pkg-config
URL            : http://pkgconf.org/
License        : ISC AND BSD-4-Clause AND BSD-2-Clause AND pkgconf AND MIT
Description    : This package provides the shim links for pkgconf to be automatically
               : used in place of pkgconfig. This ensures that pkgconf is used as
               : the system provider of pkg-config.
Vendor         : Fedora Project
kushal@flex2024:~/source/zal/zal_program$



kushal@flex2024:~/source/zal/zal_program$ dnf info pkgconf
Updating and loading repositories:
Repositories loaded.
Installed packages
Name            : pkgconf
Epoch           : 0
Version         : 2.3.0
Release         : 1.fc41
Architecture    : x86_64
Installed size  : 88.6 KiB
Source          : pkgconf-2.3.0-1.fc41.src.rpm
From repository : anaconda
Summary         : Package compiler and linker metadata toolkit
URL             : http://pkgconf.org/
License         : ISC AND BSD-4-Clause AND BSD-2-Clause AND pkgconf AND MIT
Description     : pkgconf is a program which helps to configure compiler and linker flags
                : for development frameworks. It is similar to pkg-config from freedesktop.org
                : and handles .pc files in a similar manner as pkg-config.
Vendor          : Fedora Project

Available packages
Name           : pkgconf
Epoch          : 0
Version        : 2.3.0
Release        : 1.fc41
Architecture   : i686
Download size  : 45.5 KiB
Installed size : 87.0 KiB
Source         : pkgconf-2.3.0-1.fc41.src.rpm
Repository     : fedora
Summary        : Package compiler and linker metadata toolkit
URL            : http://pkgconf.org/
License        : ISC AND BSD-4-Clause AND BSD-2-Clause AND pkgconf AND MIT
Description    : pkgconf is a program which helps to configure compiler and linker flags
               : for development frameworks. It is similar to pkg-config from freedesktop.org
               : and handles .pc files in a similar manner as pkg-config.
Vendor         : Fedora Project

@dg0yt
Copy link
Contributor

dg0yt commented Nov 11, 2024

2.3.0 should be good but maybe it isn't.

Note that x64-linux has static library linkage, and ffmpeg is pulling in a lot of dependencies. I.e. pkgconf has to resolve a larger graph than usual. But the implementation is efficient in 2.3.0, and it is tested with large graphs (also in vcpkg).

Unfortunately the failing command isn't logged, but it should be something like

PKG_CONFIG_PATH="/home/kushal/source/ladybird/vcpkg_installed/x64-linux/lib/pkgconfig;/home/kushal/source/ladybird/Build/vcpkg/packages/ffmpeg_x64-linux/lib/pkgconfig" pkgconf --libs libavcodec libavdevice libavfilter libavformat libavutil libswresample libswscale

Not sure if this provides more information, but it can be a starting point for local analysis.

@Mengna-Li Mengna-Li added the requires:repro The issue is not currently repro-able label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

3 participants