<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.5.2 (issue on 4.5.. and 4.5.4)</li>
<li>Operating System / Platform =&gt; Gentoo Linux 64 bit</li>
<li>Compiler =&gt; gcc</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Compilation fails agaisn tlapack-3.10.0 with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:166:23: error: too few arguments to function ‘void sposv_(const char*, const int*, const int*, float*, const int*, float*, const int*, int*, size_t)’
  166 |                 sposv_(L, &amp;m, &amp;n, (float*)a, &amp;lda, (float*)b, &amp;m, &amp;lapackStatus);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:13003:6: note: declared here
13003 | void LAPACK_sposv_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:168:23: error: too few arguments to function ‘void dposv_(const char*, const int*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  168 |                 dposv_(L, &amp;m, &amp;n, (double*)a, &amp;lda, (double*)b, &amp;m, &amp;lapackStatus);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:12986:6: note: declared here
12986 | void LAPACK_dposv_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:177:23: error: too few arguments to function ‘void sposv_(const char*, const int*, const int*, float*, const int*, float*, const int*, int*, size_t)’
  177 |                 sposv_(L, &amp;m, &amp;n, (float*)a, &amp;lda, (float*)tmpB, &amp;m, &amp;lapackStatus);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:13003:6: note: declared here
13003 | void LAPACK_sposv_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:179:23: error: too few arguments to function ‘void dposv_(const char*, const int*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  179 |                 dposv_(L, &amp;m, &amp;n, (double*)a, &amp;lda, (double*)tmpB, &amp;m, &amp;lapackStatus);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:12986:6: note: declared here
12986 | void LAPACK_dposv_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:188:20: error: too few arguments to function ‘void spotrf_(const char*, const int*, float*, const int*, int*, size_t)’
  188 |             spotrf_(L, &amp;m, (float*)a, &amp;lda, &amp;lapackStatus);
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:13394:6: note: declared here
13394 | void LAPACK_spotrf_base(
      |      ^~~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:190:20: error: too few arguments to function ‘void dpotrf_(const char*, const int*, double*, const int*, int*, size_t)’
  190 |             dpotrf_(L, &amp;m, (double*)a, &amp;lda, &amp;lapackStatus);
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:13378:6: note: declared here
13378 | void LAPACK_dpotrf_base(
      |      ^~~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp: In function ‘int lapack_SVD(fptype*, size_t, fptype*, fptype*, size_t, fptype*, size_t, int, int, int, int*)’:
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:230:16: error: too few arguments to function ‘void sgesdd_(const char*, const int*, const int*, float*, const int*, float*, float*, const int*, float*, const int*, float*, const int*, int*, int*, size_t)’
  230 |         sgesdd_(mode, &amp;m, &amp;n, (float*)a, &amp;lda, (float*)w, (float*)u, &amp;ldu, (float*)vt, &amp;ldv, (float*)&amp;work1, &amp;lwork, iworkBuf, info);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:3264:6: note: declared here
 3264 | void LAPACK_sgesdd_base(
      |      ^~~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:238:16: error: too few arguments to function ‘void sgesdd_(const char*, const int*, const int*, float*, const int*, float*, float*, const int*, float*, const int*, float*, const int*, int*, int*, size_t)’
  238 |         sgesdd_(mode, &amp;m, &amp;n, (float*)a, &amp;lda, (float*)w, (float*)u, &amp;ldu, (float*)vt, &amp;ldv, (float*)buffer, &amp;lwork, iworkBuf, info);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:3264:6: note: declared here
 3264 | void LAPACK_sgesdd_base("><pre lang="/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:" class="notranslate"><code class="notranslate">/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:166:23: error: too few arguments to function ‘void sposv_(const char*, const int*, const int*, float*, const int*, float*, const int*, int*, size_t)’
  166 |                 sposv_(L, &amp;m, &amp;n, (float*)a, &amp;lda, (float*)b, &amp;m, &amp;lapackStatus);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:13003:6: note: declared here
13003 | void LAPACK_sposv_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:168:23: error: too few arguments to function ‘void dposv_(const char*, const int*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  168 |                 dposv_(L, &amp;m, &amp;n, (double*)a, &amp;lda, (double*)b, &amp;m, &amp;lapackStatus);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:12986:6: note: declared here
12986 | void LAPACK_dposv_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:177:23: error: too few arguments to function ‘void sposv_(const char*, const int*, const int*, float*, const int*, float*, const int*, int*, size_t)’
  177 |                 sposv_(L, &amp;m, &amp;n, (float*)a, &amp;lda, (float*)tmpB, &amp;m, &amp;lapackStatus);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:13003:6: note: declared here
13003 | void LAPACK_sposv_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:179:23: error: too few arguments to function ‘void dposv_(const char*, const int*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  179 |                 dposv_(L, &amp;m, &amp;n, (double*)a, &amp;lda, (double*)tmpB, &amp;m, &amp;lapackStatus);
      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:12986:6: note: declared here
12986 | void LAPACK_dposv_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:188:20: error: too few arguments to function ‘void spotrf_(const char*, const int*, float*, const int*, int*, size_t)’
  188 |             spotrf_(L, &amp;m, (float*)a, &amp;lda, &amp;lapackStatus);
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:13394:6: note: declared here
13394 | void LAPACK_spotrf_base(
      |      ^~~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:190:20: error: too few arguments to function ‘void dpotrf_(const char*, const int*, double*, const int*, int*, size_t)’
  190 |             dpotrf_(L, &amp;m, (double*)a, &amp;lda, &amp;lapackStatus);
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:13378:6: note: declared here
13378 | void LAPACK_dpotrf_base(
      |      ^~~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp: In function ‘int lapack_SVD(fptype*, size_t, fptype*, fptype*, size_t, fptype*, size_t, int, int, int, int*)’:
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:230:16: error: too few arguments to function ‘void sgesdd_(const char*, const int*, const int*, float*, const int*, float*, float*, const int*, float*, const int*, float*, const int*, int*, int*, size_t)’
  230 |         sgesdd_(mode, &amp;m, &amp;n, (float*)a, &amp;lda, (float*)w, (float*)u, &amp;ldu, (float*)vt, &amp;ldv, (float*)&amp;work1, &amp;lwork, iworkBuf, info);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:3264:6: note: declared here
 3264 | void LAPACK_sgesdd_base(
      |      ^~~~~~~~~~~~~~~~~~
/build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:238:16: error: too few arguments to function ‘void sgesdd_(const char*, const int*, const int*, float*, const int*, float*, float*, const int*, float*, const int*, float*, const int*, int*, int*, size_t)’
  238 |         sgesdd_(mode, &amp;m, &amp;n, (float*)a, &amp;lda, (float*)w, (float*)u, &amp;ldu, (float*)vt, &amp;ldv, (float*)buffer, &amp;lwork, iworkBuf, info);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from ./opencv_lapack.h:12,
                 from /build/opencv-cuda/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:3264:6: note: declared here
 3264 | void LAPACK_sgesdd_base(
</code></pre></div>
<p dir="auto">see also : <a href="https://bugs.gentoo.org/800539" rel="nofollow">gentoo bug</a> and <a href="https://github.com/opencv/opencv/issues/19846" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv/issues/19846/hovercard">similar issue againts lapack-3.9.1</a></p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">Try to compile againt lapack-3.10.0</p>
<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br>
forum.opencv.org, Stack Overflow, etc and have not found solution

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to latest OpenCV version and the issue is still there

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> There is reproducer code and related data files: videos, images, onnx, etc

</li>
</ul>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.5.2</li>
<li>Operating System / Platform =&gt; Linux</li>
<li>Compiler =&gt; GCC 10.2.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">opencv fails to build with lapack 3.9.1 with the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp: In function ‘int lapack_QR(fptype*, size_t, int, int, int, fptype*, size_t, fptype*, int*)’:
/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:293:111: error: too few arguments to function ‘void dgels_(const char*, const int*, const int*, const int*, double*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  293 |                 dgels_(mode, &amp;m, &amp;n, &amp;k, (double*)tmpA, &amp;ldtmpA, (double*)b, &amp;m, (double*)&amp;work1, &amp;lwork, info);
      |                                                                                                               ^
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from /build/opencv/src/build/opencv_lapack.h:12,
                 from /build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:1525:6: note: declared here
 1525 | void LAPACK_dgels_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:302:111: error: too few arguments to function ‘void dgels_(const char*, const int*, const int*, const int*, double*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  302 |                 dgels_(mode, &amp;m, &amp;n, &amp;k, (double*)tmpA, &amp;ldtmpA, (double*)b, &amp;m, (double*)buffer, &amp;lwork, info);
      |                                                                                                               ^
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from /build/opencv/src/build/opencv_lapack.h:12,
                 from /build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:1525:6: note: declared here
 1525 | void LAPACK_dgels_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:314:114: error: too few arguments to function ‘void dgels_(const char*, const int*, const int*, const int*, double*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  314 |                 dgels_(mode, &amp;m, &amp;n, &amp;k, (double*)tmpA, &amp;ldtmpA, (double*)tmpB, &amp;m, (double*)&amp;work1, &amp;lwork, info);
      |                                                                                                                  ^
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from /build/opencv/src/build/opencv_lapack.h:12,
                 from /build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:1525:6: note: declared here
 1525 | void LAPACK_dgels_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:323:114: error: too few arguments to function ‘void dgels_(const char*, const int*, const int*, const int*, double*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  323 |                 dgels_(mode, &amp;m, &amp;n, &amp;k, (double*)tmpA, &amp;ldtmpA, (double*)tmpB, &amp;m, (double*)buffer, &amp;lwork, info);
      |                                                                                                                  ^
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from /build/opencv/src/build/opencv_lapack.h:12,
                 from /build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:1525:6: note: declared here
 1525 | void LAPACK_dgels_base(
      |      ^~~~~~~~~~~~~~~~~
[  9%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/split.dispatch.cpp.o
[  9%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stat.dispatch.cpp.o
[  9%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stat_c.cpp.o
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/build.make:509: modules/core/CMakeFiles/opencv_core.dir/src/hal_internal.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs...."><pre class="notranslate"><code class="notranslate">/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp: In function ‘int lapack_QR(fptype*, size_t, int, int, int, fptype*, size_t, fptype*, int*)’:
/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:293:111: error: too few arguments to function ‘void dgels_(const char*, const int*, const int*, const int*, double*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  293 |                 dgels_(mode, &amp;m, &amp;n, &amp;k, (double*)tmpA, &amp;ldtmpA, (double*)b, &amp;m, (double*)&amp;work1, &amp;lwork, info);
      |                                                                                                               ^
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from /build/opencv/src/build/opencv_lapack.h:12,
                 from /build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:1525:6: note: declared here
 1525 | void LAPACK_dgels_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:302:111: error: too few arguments to function ‘void dgels_(const char*, const int*, const int*, const int*, double*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  302 |                 dgels_(mode, &amp;m, &amp;n, &amp;k, (double*)tmpA, &amp;ldtmpA, (double*)b, &amp;m, (double*)buffer, &amp;lwork, info);
      |                                                                                                               ^
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from /build/opencv/src/build/opencv_lapack.h:12,
                 from /build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:1525:6: note: declared here
 1525 | void LAPACK_dgels_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:314:114: error: too few arguments to function ‘void dgels_(const char*, const int*, const int*, const int*, double*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  314 |                 dgels_(mode, &amp;m, &amp;n, &amp;k, (double*)tmpA, &amp;ldtmpA, (double*)tmpB, &amp;m, (double*)&amp;work1, &amp;lwork, info);
      |                                                                                                                  ^
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from /build/opencv/src/build/opencv_lapack.h:12,
                 from /build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:1525:6: note: declared here
 1525 | void LAPACK_dgels_base(
      |      ^~~~~~~~~~~~~~~~~
/build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:323:114: error: too few arguments to function ‘void dgels_(const char*, const int*, const int*, const int*, double*, const int*, double*, const int*, double*, const int*, int*, size_t)’
  323 |                 dgels_(mode, &amp;m, &amp;n, &amp;k, (double*)tmpA, &amp;ldtmpA, (double*)tmpB, &amp;m, (double*)buffer, &amp;lwork, info);
      |                                                                                                                  ^
In file included from /usr/include/lapack.h:11,
                 from /usr/include/lapacke.h:36,
                 from /build/opencv/src/build/opencv_lapack.h:12,
                 from /build/opencv/src/opencv-4.5.2/modules/core/src/hal_internal.cpp:51:
/usr/include/lapack.h:1525:6: note: declared here
 1525 | void LAPACK_dgels_base(
      |      ^~~~~~~~~~~~~~~~~
[  9%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/split.dispatch.cpp.o
[  9%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stat.dispatch.cpp.o
[  9%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stat_c.cpp.o
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/build.make:509: modules/core/CMakeFiles/opencv_core.dir/src/hal_internal.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
</code></pre></div>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">Build opencv with lapack 3.9.1</p>
<p dir="auto">Possibly related: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/Reference-LAPACK/lapack/commit/2d9fbdeecca906d7abb89e9cc16b02ed5286298e/hovercard" href="https://github.com/Reference-LAPACK/lapack/commit/2d9fbdeecca906d7abb89e9cc16b02ed5286298e">Reference-LAPACK/lapack@<tt>2d9fbde</tt></a></p>