CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
core: try to solve warnings caused by Apple's new LAPACK interface #24804
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
Conversation
See https://cmake.org/cmake/help/latest/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html for the first item. Looks like it's what you need. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@vpisarev @asmorkalov @opencv-alalek Could you review and merge if no further changes are needed? |
core: try to solve warnings caused by Apple's new LAPACK interface opencv#24804 Resolves opencv#24660 Apple's BLAS documentation: https://developer.apple.com/documentation/accelerate/blas?language=objc New interface since macOS >= 13.3, iOS >= 16.4. Todo: - [x] Detect macOS version. - [x] ~Detect iOS versions (major and minor version).~ No calling of Accelerate New LAPACK on iOS. - [x] Solve calling `cblas_cgemm` and `cblas_zgemm`. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
execute_process(COMMAND sw_vers -productVersion | ||
OUTPUT_VARIABLE MACOS_VERSION | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) |
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 a problem... it checks the version of macOS on the machine doing the compiling, it does not check the version of macOS that's actually running the code (at runtime). It's common for a developer to be using a new macOS but wanting his code to still run on an old macOS, and that's why these kinds of checks are inappropriate.
Instead, we must check against the 'deployment target' chosen by the developer, set in CMAKE_OSX_DEPLOYMENT_TARGET
.
Could we revert this merge, or correct this quickly?
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.
Let me take care of this. cc @asmorkalov @opencv-alalek
core: deployment compatibility for old mac after Accelerate New LAPACK fix #25625 Attempt to fix #24804 (comment) We may need to explicitly add build option `-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0` or environment variable (`export MACOSX_DEPLOYMENT_TARGET=12.0`) for mac builds (python package most probably) on builders with new macOS (>= 13.3). ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
Resolves #24660
Apple's BLAS documentation: https://developer.apple.com/documentation/accelerate/blas?language=objc
New interface since macOS >= 13.3, iOS >= 16.4.
Todo:
Detect iOS versions (major and minor version).No calling of Accelerate New LAPACK on iOS.cblas_cgemm
andcblas_zgemm
.Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.