Commit Graph

15 Commits

Author SHA1 Message Date
Yuantao Feng
7e9ef4db86
Merge pull request #25625 from fengyuentau:core/deploy_fix_lapack_ilp64
core: deployment compatibility for old mac after Accelerate New LAPACK fix #25625

Attempt to fix https://github.com/opencv/opencv/pull/24804#discussion_r1609957747

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
2024-05-30 17:03:07 +03:00
Yuantao Feng
49f80cb3c4
Merge pull request #24804 from fengyuentau:fix_lapack_warnings
core: try to solve warnings caused by Apple's new LAPACK interface #24804

Resolves https://github.com/opencv/opencv/issues/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
2024-05-21 16:58:16 +03:00
Alexander Alekhin
9777fbacf6 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-12-22 15:57:02 +00:00
dwardor
54c180092d
Merge pull request #21114 from dwardor:patch-1
* Fix compile against lapack-3.10.0

Fix compilation against lapack >= 3.9.1 and 3.10.0 while not breaking older versions

OpenCVFindLAPACK.cmake & CMakeLists.txt: determine OPENCV_USE_LAPACK_PREFIX from LAPACK_VERSION

hal_internal.cpp : Only apply LAPACK_FUNC to functions whose number of inputs depends on LAPACK_FORTRAN_STR_LEN in lapack >= 3.9.1

lapack_check.cpp : remove LAPACK_FUNC which is not OK as function are not used with input parameters (so lapack.h preprocessing of "LAPACK_xxxx(...)" is not applicable with lapack >= 3.9.1
If not removed lapack_check fails so LAPACK is deactivated in build (not want we want)

use OCV_ prefix and don't use Global, instead generate OCV_LAPACK_FUNC depending on CMake Conditions

Remove CONFIG from find_package(LAPACK) and use LAPACK_GLOBAL and LAPACK_NAME to figure out if using netlib's reference LAPACK implementation and how to #define OCV_LAPACK_FUNC(f)

* Fix typos and grammar in comments
2021-12-22 12:00:00 +00:00
Alexander Alekhin
7a282a8892 cmake: workaround oneAPI problem with -DMKL_WITH_TBB=ON 2021-02-03 19:41:54 +00:00
Maksim Shabunin
fff7b7e459 LAPACK: add support for complex numbers for MSVC 2019-05-22 18:43:45 +03:00
Alexander Alekhin
81c5fae56f core(lapack): fix build issues related to 'extern "C"' 2018-01-24 14:53:04 +03:00
Vadim Pisarevsky
b833d512ec fixed native Lapack detection script on Mac/iOS (where native Lapack is a part of Accelerate framework) 2017-12-05 15:45:37 +03:00
Alexander Alekhin
5f80e42dac cmake: update OpenBLAS support
- reorder path HINTS to avoid conflicts with other LAPACK libraries
- add extern "C" { } to avoid generation of C++ symbols
2017-10-28 10:17:37 +03:00
Alexander Alekhin
23f26fb4a8 cmake: fix LAPACK/MKL detection 2017-10-13 15:40:37 +03:00
Tomoaki Teshima
ebf13b39e5 fix build error on ODROID-X2 2017-04-18 19:31:57 +09:00
Alexander Alekhin
f9828cd0c9 cmake: fix MKL detection in case of unsupported versions
CMake should not fail.
2017-01-19 13:33:39 +03:00
Alexander Alekhin
2b44c0b649 cmake: fix lapack
- added compile check with multiple tries for different configurations
- restored find_package(LAPACK)
- avoided modification of OPENCV_LINKER_LIBS
2017-01-17 15:56:42 +03:00
Vadim Pisarevsky
0bd68671bd restored OpenBLAS detection; fixed MKL's lapack header (#7921) 2016-12-23 15:40:51 +03:00
Vadim Pisarevsky
ad74fdd7cc moved BLAS/LAPACK detection scripts from opencv_contrib/dnn to the main repository (#7918)
* moved BLAS/LAPACK detection scripts from opencv_contrib/dnn to the main repository.

* trying to fix the bug with undefined symbols sgesdd_ and dgesdd_

* removed extra whitespaces; disabled LAPACK on IOS
2016-12-22 22:57:44 +03:00