Ask Your Question
2

fata error: LAPACKE_H_PATH-NOTFOUND when building OpenCV 3.2

asked 2017-01-08 02:50:56 -0600

adiperry gravatar image

updated 2017-01-08 08:10:07 -0600

LBerger gravatar image

Hello

I get this error when building OpenCV 3.2:

In file included from /home/username/opencv-3.2.0/opencv/modules/core/src/hal_internal.cpp:49:0: /home/username/opencv-3.2.0/opencv/build/opencv_lapack.h:2:45: fatal error: LAPACKE_H_PATH-NOTFOUND/lapacke.h: No such file or directory #include "LAPACKE_H_PATH-NOTFOUND/lapacke.h"

LAPACK and BLAS are installed.. Any ideas? Didn't get these errors with 3.1 or previous 2.4.X versions...

Thanks, AP

edit retag flag offensive close merge delete

Comments

LAPACKE_H_PATH-NOTFOUND it is like a cmake message.

Does cmake find lapack?

LBerger gravatar imageLBerger ( 2017-01-08 02:53:27 -0600 )edit

I was surprised to find it within include statement.. And yes, look like it does.

--     Use IPP Async:               NO
--     Use VA:                      NO
--     Use Intel VA-API/OpenCL:     NO
--     Use Lapack:                  YES (/usr/lib/libopenblas.so)
--     Use Eigen:                   YES (ver 3.2.0)
--     Use Cuda:                    YES (ver 7.5)
--     Use OpenCL:                  YES
--     Use OpenVX:                  NO
--     Use custom HAL:              NO
adiperry gravatar imageadiperry ( 2017-01-08 03:01:09 -0600 )edit

I'm using vs 2015 with mkl lapack so I cannot test. May be you can try to set LAPACK_INCLUDE_DIR with your own path in cmake process.

Don't forget to delete cmakecache

Wait some comments about your problem and If you cannot solve it post an issue.

In opencv 3.2 many things change about lapack and blas see https://github.com/opencv/opencv/wiki...

LBerger gravatar imageLBerger ( 2017-01-08 03:16:25 -0600 )edit

@adiperry

I think I had the same issue. Could you try to install:

sudo apt-get install liblapacke-dev checkinstall
Eduardo gravatar imageEduardo ( 2017-01-08 07:02:05 -0600 )edit
1

It seems to fix this failure. I'm getting other failures, like mentioned here: https://github.com/opencv/opencv/issu... Which also suggests it's LAPACK-related. (Ubuntu 14.04 with CUDA)

When setting "WITH_LAPACK=OFF" it works.

adiperry gravatar imageadiperry ( 2017-01-09 04:46:29 -0600 )edit

TL;DR

If you're using something like https://github.com/milq/scripts-ubuntu-debian/blob/master/install-opencv.sh (install-opencv.sh) from https://milq.github.io/install-opencv-ubuntu-debian/

The fix is to replace the line

cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON $

with

cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON -$

AlexLamson gravatar imageAlexLamson ( 2017-01-11 21:34:16 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
2

answered 2017-03-03 01:58:25 -0600

lccurious gravatar image

You can do sudo apt-get install liblapacke-dev checkinstall And then modify the #include "LAPACKE_H_PATH-NOTFOUND/lapacke.h" into #include "lapacke.h" and make, It works in my Ubuntu.

edit flag offensive delete link more

Comments

Thank you very much! it also work in my Ubuntu 16.04, I would add to your answer the file that you have to modify is called opencv_lapack.h

juanbarragan95 gravatar imagejuanbarragan95 ( 2018-07-05 16:37:28 -0600 )edit
0

answered 2017-03-29 10:56:55 -0600

Install openBLAS

sudo apt-get install libopenblas-dev

Replace LAPACKE_H_PATH-NOTFOUND with /opt/OpenBLAS/include

Solved my problem by doing this..!

edit flag offensive delete link more
0

answered 2017-06-05 09:25:41 -0600

You get this error if you install lapacke-dev after running cmake.

To fix it, just install it and run cmake again:

sudo apt-get install liblapacke-dev

cmake ....all of your flags

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-01-08 02:50:56 -0600

Seen: 18,761 times

Last updated: Jan 08 '17