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: use ar / nm / ranlib / strip from toolchain #15978

Conversation

kambala-decapitator
Copy link
Contributor

@kambala-decapitator kambala-decapitator commented Feb 13, 2023

Specify library name and version: ffmpeg/all

Consuming static library on Android resulted in missing FFmpeg symbols at link step like

ld: error: undefined symbol: avcodec_alloc_context3

During static FFmpeg build on macOS host there were warnings like:

warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: libavformat/libavformat.a the table of contents is empty (no object file members in the library define global symbols)

warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: /Users/kambala/dev/vcmi/conan-deps-android-32/.conan/data/ffmpeg/4.4.3///package/e278c1bb85139d14996f9927c53fb33f16135eea/lib/libswscale.a the table of contents is empty (no object file members in the library define global symbols)

and during shared build:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: warning: can't process non-object and non-archive file: /Users/kambala/dev/vcmi/conan-deps-android-32/.conan/data/ffmpeg/4.4.3///package/482031e64ba053214bda580dcc61306842009f95/lib/libavcodec.so

Only ranlib and strip adjustments are required, but I guess it wouldn't hurt to pass toolchain's ar and nm as well.


enables proper linking for Android
@github-actions
Copy link
Contributor

🤖 Beep Boop! This pull request is making changes to 'recipes/ffmpeg//'.

👋 @MartinDelille you might be interested. 😉

@ghost
Copy link

ghost commented Feb 13, 2023

I detected other pull requests that are modifying ffmpeg/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 1 (e05e976f6a6370a6c77b49e479d2144a1a853497):

  • ffmpeg/4.4.3@:
    CI failed to create some packages (All logs)

    Logs for packageID 4a84cee5d6a5ef1f21c928e50f34a7d0f7c0a371:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.libcxx=libc++
    compiler.version=11.0
    os=Macos
    [options]
    ffmpeg:shared=True
    
    [...]
        openh264/2.1.1 from 'conan-center' - Downloaded
        openjpeg/2.5.0 from 'conan-center' - Downloaded
        openssl/1.1.1s from 'conan-center' - Downloaded
        opus/1.3.1 from 'conan-center' - Downloaded
        vorbis/1.3.7 from 'conan-center' - Downloaded
        xz_utils/5.2.5 from 'conan-center' - Downloaded
        zlib/1.2.13 from 'conan-center' - Downloaded
    Packages
        brotli/1.0.9:ad4450ca6ad40efb182097a7370a0fa495cf2552 - Download
        bzip2/1.0.8:32bef4803d4b079e983ecb27f105881e778bc5a7 - Download
        ffmpeg/4.4.3:4a84cee5d6a5ef1f21c928e50f34a7d0f7c0a371 - Build
        freetype/2.12.1:f4c0145073ecfc496791f7fb27b34ce4842839a4 - Download
        libfdk_aac/2.0.2:eec6acc43f6348a597c20e5bd28d9e0590a02597 - Download
        libiconv/1.17:f74366f76f700cc6e991285892ad7a23c30e6d47 - Missing
        libmp3lame/3.100:f74366f76f700cc6e991285892ad7a23c30e6d47 - Download
        libpng/1.6.39:8fbcc84fd73710baeb1053770e9887336c02dc9b - Download
        libvpx/1.11.0:b99ef2f575485ad5cc304df067086b3962b4d759 - Download
        libwebp/1.2.4:925627bb9faa4169b8ec3d0d66343ea8295547e5 - Download
        libx264/cci.20220602:69ee63f07d5b57f6472680664b942365c3d4ad90 - Download
        libx265/3.4:d6c5876accd58200861dfa57918aee5aecb564f9 - Download
        ogg/1.3.5:f74366f76f700cc6e991285892ad7a23c30e6d47 - Download
        openh264/2.1.1:eec6acc43f6348a597c20e5bd28d9e0590a02597 - Download
        openjpeg/2.5.0:f74366f76f700cc6e991285892ad7a23c30e6d47 - Download
        openssl/1.1.1s:f74366f76f700cc6e991285892ad7a23c30e6d47 - Download
        opus/1.3.1:f74366f76f700cc6e991285892ad7a23c30e6d47 - Download
        vorbis/1.3.7:853d5de4ab49af74d80696ea461b3783627bc470 - Download
        xz_utils/5.2.5:f74366f76f700cc6e991285892ad7a23c30e6d47 - Download
        zlib/1.2.13:f74366f76f700cc6e991285892ad7a23c30e6d47 - Download
    Build requirements
        pkgconf/1.9.3 from 'conan-center' - Downloaded
        yasm/1.3.0 from 'conan-center' - Downloaded
    Build requirements packages
        pkgconf/1.9.3:801752c0480319b8e090188c566245a78e9abcf4 - Download
        yasm/1.3.0:801752c0480319b8e090188c566245a78e9abcf4 - Download
    
    Installing (downloading, building) binaries...
    
    ERROR: Missing binary: libiconv/1.17:f74366f76f700cc6e991285892ad7a23c30e6d47
    libiconv/1.17: WARN: Can't find a 'libiconv/1.17' package for the specified settings, options and dependencies:
    - Settings: arch=x86_64, build_type=Release, compiler=apple-clang, compiler.version=11.0, os=Macos
    - Options: fPIC=True, shared=False
    - Dependencies: 
    - Requirements: 
    - Package ID: f74366f76f700cc6e991285892ad7a23c30e6d47
    
    ERROR: Missing prebuilt package for 'libiconv/1.17'
    Use 'conan search libiconv/1.17@ --table=table.html -r=remote' and open the table.html file to see available packages
    Or try to build locally from sources with '--build=libiconv'
    
    More Info at 'https://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package'
    
  • ffmpeg/5.0@:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.3.2@:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.4@:
    Didn't run or was cancelled before finishing

  • ffmpeg/4.2.1@:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.


Conan v2 pipeline (informative, not required for merge) ❌

Note: Conan v2 builds are informative and they are not required for the PR to be merged.

The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future.

See details:

Failure in build 1 (e05e976f6a6370a6c77b49e479d2144a1a853497):

  • ffmpeg/5.0@:
    Error running command conan export --name ffmpeg --version 5.0 recipes/ffmpeg/all/conanfile.py:

    ERROR: Error loading conanfile at '/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py", line 7, in <module>
        from conans import AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'AutoToolsBuildEnvironment' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • ffmpeg/4.4.3@:
    Error running command conan export --name ffmpeg --version 4.4.3 recipes/ffmpeg/all/conanfile.py:

    ERROR: Error loading conanfile at '/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py", line 7, in <module>
        from conans import AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'AutoToolsBuildEnvironment' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • ffmpeg/4.4@:
    Error running command conan export --name ffmpeg --version 4.4 recipes/ffmpeg/all/conanfile.py:

    ERROR: Error loading conanfile at '/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py", line 7, in <module>
        from conans import AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'AutoToolsBuildEnvironment' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • ffmpeg/4.3.2@:
    Error running command conan export --name ffmpeg --version 4.3.2 recipes/ffmpeg/all/conanfile.py:

    ERROR: Error loading conanfile at '/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py", line 7, in <module>
        from conans import AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'AutoToolsBuildEnvironment' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • ffmpeg/4.2.1@:
    Error running command conan export --name ffmpeg --version 4.2.1 recipes/ffmpeg/all/conanfile.py:

    ERROR: Error loading conanfile at '/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod-v2_cci_PR-15978/recipes/ffmpeg/all/conanfile.py", line 7, in <module>
        from conans import AutoToolsBuildEnvironment, tools
    ImportError: cannot import name 'AutoToolsBuildEnvironment' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit e05e976
ffmpeg/4.4.3
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libswscale.5.9.100.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libpostproc.55.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libswscale.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libpostproc.55.9.100.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavdevice.58.13.100.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavutil.56.70.100.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libswscale.5.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libswresample.3.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavfilter.7.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavformat.58.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavformat.58.76.100.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libswresample.3.9.100.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavformat.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavutil.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavfilter.7.110.100.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavutil.56.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavcodec.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavdevice.58.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libswresample.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavdevice.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libpostproc.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavfilter.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavcodec.58.134.100.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libavcodec.58.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.

@kambala-decapitator
Copy link
Contributor Author

These changes were added to #15459

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

Successfully merging this pull request may close these issues.

2 participants