-
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
libx265: Disable assembly when building for Android #24627
libx265: Disable assembly when building for Android #24627
Conversation
Signed-off-by: Uilian Ries <uilianries@gmail.com>
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.
Minor question regarding how the recipe is handling things, otherwise looks good
@@ -49,7 +49,8 @@ def config_options(self): | |||
del self.options.with_numa | |||
# FIXME: Disable assembly by default if host is arm and compiler apple-clang for the moment. | |||
# Indeed, apple-clang is not able to understand some asm instructions of libx265 | |||
if self.settings.compiler == "apple-clang" and "arm" in self.settings.arch: | |||
# FIXME: Disable assembly by default if host is Android for the moment. It fails to build | |||
if (self.settings.compiler == "apple-clang" and "arm" in self.settings.arch) or self.settings.os == "Android": | |||
self.options.assembly = False |
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.
Is this even working? I've submitted conan-io/conan#16672 to show that changing values in config_options will have no effect if the user is setting the option in the CLI
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.
If you change the option value in config_option
, it will change the default value only. In case the user pass assembly=True
, the validate_build
will take care and raise and error. Indeed the user has priority over the value configured via config_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.
Also, the build log shows my command line, I didn't enforce the assembly option to False, but it passes:
https://gist.github.com/uilianries/971fc896b481170ee311ac6e9eb35152
In case passing assembly=True it will fail for sure, the issue #23721 has a very similar build log with my current error.
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.
This is how it has always worked since Conan 1.x - setting the value of an option in config_options
makes it the "default" value - and the default value is only used if the user did not override it elsewhere (e.g via CLI).
This comment has been minimized.
This comment has been minimized.
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!
Building for Mac M1 it fails too when the option I added a restriction in Kudos @AbrilRBS for spotting it. |
Conan v1 pipeline ✔️All green in build 4 (
Conan v2 pipeline ✔️
All green in build 4 ( |
Summary
Changes to recipe: libx265/3.4
Motivation
As reported by the issue #23721 the libx265 fails to be built to Android when using the option value
assembly=True
. This is not only breaking this package, but also affecting ffmpeg directly when cross-building to Android.It's a known issue reported in the upstream already, but no official solution so far: https://bitbucket.org/multicoreware/x265_git/issues/603/aarch64-assembly-code-failing-when-cross
Details
To build assembly code in x265, it's used a custom command in the project, which propagates manually which flags should be used by the compiler, resulting in failure when cross-build to Android-armv8.
Other package managers tried custom patches (including Gentoo) to solve the case, but it still fails for me locally. For instance, when passing target to build assembly code:
I'll be disabling assembly for now, but keeping it open for contributions, as didn't remove the option.
Full build log for Android with this new change: https://gist.github.com/uilianries/971fc896b481170ee311ac6e9eb35152
closes #23721
Related to #24566