-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: conan v2 support #15819
ffmpeg: conan v2 support #15819
Conversation
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. |
This comment has been minimized.
This comment has been minimized.
recipes/ffmpeg/all/conanfile.py
Outdated
from conan.tools.scm import Version | ||
from conans import AutoToolsBuildEnvironment, tools | ||
from conans.tools import get_gnu_triplet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from conans.tools import get_gnu_triplet | |
from conan.tools.gnu.get_gnu_triplet import _get_gnu_triplet as get_gnu_triplet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not allowed by conancenter to import internal conan functions
I tried to build locally on Linux-gcc11,
It is looking for libva.pc. I added a call to copy vaapi.pc to libva.pc, but it then complained:
|
I guess #16464 fixed this issue. |
This comment has been minimized.
This comment has been minimized.
So several conan v2 issues in dependencies have been fixed by #16217, #16232, #16315, #16464, #16463, so these dependencies should work fine now.
|
recipes/ffmpeg/all/conanfile.py
Outdated
if cxx: | ||
args.append(f"--cxx={unix_path(self, cxx)}") | ||
pkg_config = self.conf.get("tools.gnu:pkg_config", default=buildenv_vars.get("PKG_CONFIG"), check_type=str) | ||
if pkg_config: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the flags for ar, nm, ranlib and strip are missing. This might cause some issues while cross compiling. At least it was an issue with conan1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed by 5f0359f
Testing this locally I found this (after building #15353)
Which is from
Which was broken with the 5.1 release, searching with https://github.com/FFmpeg/FFmpeg/tree/n5.0.2/libavcodec this probably was working, I see no issues for it https://github.com/conan-io/conan-center-index/issues?q=is%3Aissue+is%3Aopen+ffmpeg They changed this for all the project in 5.1 to have the major split out like this FFmpeg/FFmpeg@f2da2e1 |
Hooks produced the following warnings for commit 1cfddbaffmpeg/5.0
ffmpeg/4.4.3
ffmpeg/5.1
ffmpeg/4.2.1
ffmpeg/4.4
ffmpeg/4.3.2
|
I don't understand these undefined references in test package on Linux in v2 pipeline, it was working fine in previous build... Did you update conan client in c3i? |
used my magic power to check v2 failures 😡
|
This PR is missing Hopefully the team fixes this tomorrow :/ |
Just a note that this PR links to the correct MSVC runtime on Windows, while the current ffmpeg recipe tries to use "-dynamic" as a flag, and so ends up linking against libcmt (MSVC static runtime). Looking forward to seeing this PR live! |
Conan v1 pipeline ✔️All green in build 21 (
Conan v2 pipeline (informative, not required for merge) ❌
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 21 (
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. |
@prince-chrismc sorry, I don't understand. |
I agree it's orthogonal to cppstd. I don't understand why these vulkan-loader & pulseaudio packages are missing, given that in a previous c3i build (https://c3i.jfrog.io/c3i/misc-v2/logs/pr/15819/20-linux-gcc/ffmpeg/4.4.3//0b89df21e01e911503b70883ee6f5b777dbcf232-test.txt), they were available for the same configuration (Linux, Release, gcc 11, cppstd=gnu17, libstdc++11, all shared) |
So the team helped me out! In an investigation they found it was actually the 2.0 graph #16901 the issue was the header only library full package mode in the new everything shared config of v2 was being triggered under pulse audio. Since this is all new it's the first time we are seeing that. I did not double check the graph but I assume there are different revision of the same header only package which is causing the problem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets merge this in we can circle back to generate packages through the backend 🤞
Actually I'm pretty sure that this "invalidation" of package id of pre-built Linux packages of |
if cxx: | ||
args.append(f"--cxx={unix_path(self, cxx)}") | ||
ld = buildenv_vars.get("LD") | ||
if ld: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an issue when cross building ffmpeg with the ld flag. In the old package, the ld was not set and I have the feeling, that this had some reasons.
The problem when setting ld is that the build will fails with: C compiler test failed.
When checking the logs it seems, that the test build is trying to run gcc commands using the specified linker, which results in:
aarch64-linux-gnu-ld: unrecognized option '-Wl,-Bsymbolic,-znoexecstack'
which definitely the wrong tool for that flags.
I'm not sure, if this is somehow explainable or a bug in the configuration stage of ffmpeg itself. Or maybe I'm doing something wrong. Maybe someone would need to reproduce the issue.
If the issue can be reproduced I would vote to remove the ld flag setting for the moment since it was not set in the old conanfile as well. At least for me, when removing the ld part, the cross compilation is working finally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x86_64-linux-gnu-ld: unrecognised emulation mode: 64
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om
C compiler test failed.
@uilianries @RubenRBS @jcar87 @danimtb What the status of these packages? This PR can be merged if I change its status to ready for review, but v2 packages will be missing. |
Apologies for the confusion - the binaries for the dependencies are already there, and the last run for the v2 pipeline has proceeded further, with some failures however I agree we should proceed with the merge |
This is amazing work so far so lets get it in :) We can make a new PR to fine to and address those v2 packages that one comment raising concerns |
These errors are surprising. Error on Linux seems to be a conan client bug, and on macOS something weird in macOS agent already seen several times (boost and other recipes). |
Would it help conan v2 to add |
I have a question indirectly linked to this PR, this morning when trying to build my project it failed because the package is apparently missing. The log says the generated package id is 0885adea2acd88fb7e79b4bda9709c5ac37386ff and from the CI I can see the package exists but is BUILD + TEST_OK. I'm using conan 1.59 and can't afford to update to 2.0 yet. |
We are slowly dropping support for v1 configs are we move more resources to v2. #16968 for the latest and we will be dropping more. If your settings/profiles are not an exact match they'll be missing. Regardless you can simply add |
@jcar87 Linux builds & test work fine in v2 pipeline after #17014 & #17013. See #17065 (comment) |
Specify library name and version: lib/1.0