{"action":"created","issue":{"url":"https://api.github.com/repos/opencv/opencv/issues/9953","repository_url":"https://api.github.com/repos/opencv/opencv","labels_url":"https://api.github.com/repos/opencv/opencv/issues/9953/labels{/name}","comments_url":"https://api.github.com/repos/opencv/opencv/issues/9953/comments","events_url":"https://api.github.com/repos/opencv/opencv/issues/9953/events","html_url":"https://github.com/opencv/opencv/issues/9953","id":269152063,"node_id":"MDU6SXNzdWUyNjkxNTIwNjM=","number":9953,"title":"Building against OpenBLAS complains about missing lapacke.h","user":{"login":"FlorianFranzen","id":781077,"node_id":"MDQ6VXNlcjc4MTA3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/781077?v=4","gravatar_id":"","url":"https://api.github.com/users/FlorianFranzen","html_url":"https://github.com/FlorianFranzen","followers_url":"https://api.github.com/users/FlorianFranzen/followers","following_url":"https://api.github.com/users/FlorianFranzen/following{/other_user}","gists_url":"https://api.github.com/users/FlorianFranzen/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianFranzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianFranzen/subscriptions","organizations_url":"https://api.github.com/users/FlorianFranzen/orgs","repos_url":"https://api.github.com/users/FlorianFranzen/repos","events_url":"https://api.github.com/users/FlorianFranzen/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianFranzen/received_events","type":"User","site_admin":false},"labels":[{"id":241025032,"node_id":"MDU6TGFiZWwyNDEwMjUwMzI=","url":"https://api.github.com/repos/opencv/opencv/labels/category:%20build/install","name":"category: build/install","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-10-27T15:47:08Z","updated_at":"2018-06-04T15:39:10Z","closed_at":null,"author_association":"NONE","body":"##### System information (version)\r\n- OpenCV => 3.3.1\r\n- Operating System / Platform => Ubuntu 16.04. (xenial)\r\n\r\n##### Detailed description\r\n\r\nIt is not possible to build openCV against libOpenBLAS unless one also installs an additional LAPACK implementation that includes the ```lapacke.h``` header, e.g. ```liblapacke-dev``` on Ubuntu.\r\n\r\nTo me that does not look like the intended behavior and it might be explained by the fact, that OpenBLAS on Ubuntu only include ```cblas.h``` and ```f77blas.h``` as an header. \r\n\r\nOn the other hand ```OpenCVFindOpenBLAS.cmake``` does not check for ```lapacke.h```, so it might just be the case that ```ocv_lapack_check()``` is too strict when it comes to OpenBLAS.\r\n\r\n@alalek You seem to have some experience with this. Any thoughts on this?\r\n\r\n##### Steps to reproduce\r\n\r\nIf I only install ```libopenblas-dev```, I get the following cmake output once ```ocv_lapack_check()``` inside ```OpenCVFindLAPACK.cmake``` is called:\r\n\r\n```\r\n-- LAPACK(OpenBLAS): LAPACK_LIBRARIES: /usr/lib/libopenblas.so\r\nCMake Warning at cmake/OpenCVFindLAPACK.cmake:29 (message):\r\n  LAPACK(OpenBLAS): CBLAS/LAPACK headers are not found in '/usr/include'\r\nCall Stack (most recent call first):\r\n  cmake/OpenCVFindLAPACK.cmake:155 (ocv_lapack_check)\r\n  CMakeLists.txt:596 (include)\r\n\r\n```\r\n\r\nIf I now install any LAPACK implementation that includes a ```lapacke.h```, e.g.: ```liblapacke-dev```, everything passes and OpenBLAS will be used:\r\n\r\n```\r\n-- LAPACK(OpenBLAS): LAPACK_LIBRARIES: /usr/lib/libopenblas.so\r\n-- LAPACK(OpenBLAS): Support is enabled.\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/opencv/opencv/issues/comments/394400458","html_url":"https://github.com/opencv/opencv/issues/9953#issuecomment-394400458","issue_url":"https://api.github.com/repos/opencv/opencv/issues/9953","id":394400458,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDQwMDQ1OA==","user":{"login":"henczati","id":5007476,"node_id":"MDQ6VXNlcjUwMDc0NzY=","avatar_url":"https://avatars3.githubusercontent.com/u/5007476?v=4","gravatar_id":"","url":"https://api.github.com/users/henczati","html_url":"https://github.com/henczati","followers_url":"https://api.github.com/users/henczati/followers","following_url":"https://api.github.com/users/henczati/following{/other_user}","gists_url":"https://api.github.com/users/henczati/gists{/gist_id}","starred_url":"https://api.github.com/users/henczati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henczati/subscriptions","organizations_url":"https://api.github.com/users/henczati/orgs","repos_url":"https://api.github.com/users/henczati/repos","events_url":"https://api.github.com/users/henczati/events{/privacy}","received_events_url":"https://api.github.com/users/henczati/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T15:39:10Z","updated_at":"2018-06-04T15:39:10Z","author_association":"NONE","body":"+1 on [using the default CMake detectors](https://github.com/opencv/opencv/issues/9953#issuecomment-394395246). I expect they would already have platform-specific patches solving e.g. [mentioned packaging differences](https://github.com/opencv/opencv/issues/9953#issuecomment-340122217)."}}
{"actor":{"display_login":"henczati"}}