-
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
[libjpeg-turbo] Fixes cross compilation for armv8 #3392
Conversation
All green in build 1 (
|
if tools.cross_building(self.settings): | ||
tools.replace_in_file(os.path.join(self._source_subfolder,"CMakeLists.txt"),"CMAKE_SYSTEM_PROCESSOR","CMAKE_SYSTEM_PROCESSOR_TARGET") |
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.
patch in build()
instead of source()
please.
What is CMAKE_SYSTEM_PROCESSOR_TARGET
? CMAKE_SYSTEM_PROCESSOR
is already the target architecture.
if not self.options.keep_binaries: | ||
for pattern_to_remove in ["cjpeg*", "djpeg*", "jpegtran*", "tjbench*", "wrjpgcom*", "rdjpgcom*", "*.pdb"]: | ||
for bin_file in glob.glob(os.path.join(self.package_folder, "bin", pattern_to_remove)): | ||
os.remove(bin_file) |
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.
don't keep pdb files.
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.
yes, this is unrelated change
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 the executables are already generated, why removing them from the package? I would say that storage is not an issue nowadays (at least, it isn't for us in ConanCenter). I would remove keep_binaries
option and keep these binaries in the package.
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.
@KristianJerpetjon
We have an issue for discussing including pdbs: #1982
#1982 (comment) seems to suggest a conan feature will be added for handling pdb's.
Doesn't this sound like something that Conan cross-building features should be able to handle? It is certainly impracticable adding a |
|
||
def _configure_cmake(self): | ||
if self._cmake: | ||
return self._cmake | ||
self._cmake = CMake(self, set_cmake_flags=True) | ||
if tools.cross_building(self.settings): | ||
if self.settings.arch == "armv8": | ||
self._cmake.definitions["CMAKE_SYSTEM_PROCESSOR_TARGET"] = "aarch64" |
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.
not sure why the only armv8 is affected? maybe there is a wider conan issue? /cc @jgsogo
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'm with @SpaceIm , I don't know what is CMAKE_SYSTEM_PROCESSOR_TARGET, I cannot find it in CMake docs.
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.
maybe it was supposed to be https://cmake.org/cmake/help/v3.1/variable/CMAKE_SYSTEM_PROCESSOR.html ?
The OP is replacing the standard variable with a custom one for the recipe
I don't fully understand what you're trying to fix. What is the value of Conan has a way to overload some cmake defaults: see https://docs.conan.io/en/latest/reference/build_helpers/cmake.html#definitions |
@KristianJerpetjon I don't think it's a right place to have a fix in the recipe(s). I also don't think it's correct to have it exclusively for amrv8.
so it gives me the impression that CMAKE_SYSTEM_PROCESSOR is optional and shouldn't be vital. I'd recommend:
I believe the correct fix may require setting |
All green in build 2 (
|
created conan-io/conan#8025 |
I detected other pull requests that are modifying libjpeg-turbo 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 pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions. |
Specify library name and version: libjpeg-turbo/all
conan-center hook activated.