[CMake] FindBlas and header file "blas.h"

Nicholas Kinar n.kinar at usask.ca
Fri Mar 1 13:42:23 EST 2013


On 01/03/2013 11:57 AM, Nicholas Kinar wrote:
> Moreover, running Cmake (via make compilation) tells me that the files 
> are found; however, the "blas.h" header file is not found.
>
> nkinar at Betty:/media/RESEARCH/DEVELOP-SEISMIC/dip$ make
> -- A library with BLAS API found.
> -- A library with BLAS API found.
> -- A library with LAPACK API found.
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /media/RESEARCH/DEVELOP-SEISMIC/dip
> [  9%] Building C object CMakeFiles/stest.dir/conjgrad.c.o
> /media/RESEARCH/DEVELOP-SEISMIC/dip/conjgrad.c:26:18: fatal error: 
> blas.h: No such file or directory
> compilation terminated.
> make[2]: *** [CMakeFiles/stest.dir/conjgrad.c.o] Error 1
> make[1]: *** [CMakeFiles/stest.dir/all] Error 2
> make: *** [all] Error 2
>
> What am I still doing wrong here?

The issue appears to be that on Ubuntu, "blas.h" is named "cblas.h".  
This file was installed in the /usr/include directory. Changing "blas.h" 
to "cblas.h" fixes the problem, and allows the compile to continue properly.

Nicholas



More information about the CMake mailing list