-
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
libx264: conan v2, and to make it work on Windows msys (build for msvc) #15353
libx264: conan v2, and to make it work on Windows msys (build for msvc) #15353
Conversation
Can I please get some guidance on this PR ? |
I've done some more, but I really don't know what to do with the compiler_wrapper and other such things that other recipes seem to perform. |
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 7b7a9bblibx264/20191217
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit 26c59d8libx264/20191217
libx264/cci.20220602
libx264/20190605
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks to StellaSmith! Co-authored-by: Stella Smith <40411082+StellaSmith@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Thanks @SpaceIm, I've been buried in other things recently, I'll get back to this soon. |
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
@paulharris Could you close/open this PR to see whether it passes CI? libx264 is a dependency of ffmpeg and it would be nice to have a conan v2 compatible recipe for this one ;) |
recipes/libx264/all/conanfile.py
Outdated
if self.options.shared: | ||
args.append("--enable-shared") | ||
args["--enable-shared"] = "" | ||
args["--disable-static"] = None # --disable-static is not understood | ||
else: | ||
args.append("--enable-static") | ||
args["--enable-static"] = "" | ||
args["--disable-shared"] = None # --disable-shared is not understood |
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.
--disable-static can be moved outside this branching I think, otherwise it' a little bit confusing I think.
recipes/libx264/all/conanfile.py
Outdated
env.define("AS", os.environ["CC"]) | ||
ndk_root = unix_path(self, os.environ["NDK_ROOT"]) |
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.
CC should come from tools.build:compiler_executables
config and fallback eventually to CC from VirtualBuildEnv, not os.environ
Same for NDK_ROOT, I think there is tools.android:ndk_path
config for this one.
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 gave it a try but I don't build Android so hard to test.
I referred to git log -p
for hints on usage patterns.
Conan v1 pipeline ✔️All green in build 17 (
Conan v2 pipeline (informative, not required for merge) ✔️
All green in build 18 ( |
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 it's good enough. Let's move forward.
@prince-chrismc @uilianries could you review please? This PR is mandatory to get a chance to pass ffmpeg builds in v2 pipeline (which is mandatory for opencv 4.x with its current default options). |
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.
LGTM
@property | ||
def _source_subfolder(self): | ||
return "source_subfolder" | ||
# otherwise build fails with: ln: failed to create symbolic link './Makefile' -> '../../../../../../../../../../../../../j/w/prod/buildsinglereference@2/.conan/data/libx264/cci.20220602/_/_/build/622692a7dbc145becf87f01b017e2a0d93cc644e/src/Makefile': File name too long |
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.
Thanks for adding comments !!!
…ys (build for msvc) * First attempt to upgrade for conan v2 compatibility * Fixup tests, try and fix compiler_wrapper etc * Fix up linter * Fixup configure --prefix * Use AutotoolsToolchain.update_configure_args() * Attempt to fix File-name-too-long error on Windows * Avoid one bit of the recipe for conan v2 * Fix typo * Fix for apple rpaths * Apply suggestions from code review Thanks to StellaSmith! Co-authored-by: Stella Smith <40411082+StellaSmith@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> * Remove unused vars: build_canonical_name host_canonical_name * Fixes as suggested by SpaceIM --------- Co-authored-by: Stella Smith <40411082+StellaSmith@users.noreply.github.com> Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
I started upgrading this recipe, but have got stuck on the parts related to MacOS and nasm...
example, the only example I could see to replace apple_deployment_target_flag() was from the Boost recipe upgrade, and it looks different.
Could I please get some assistance? Or perhaps someone else lead this PR?
My goal is to allow this recipe to build nicely for MSVC from within my msys shell.