I have an extconf.rb
with the following lines:
have_header("cblas.h") # checking for cblas.h... yes
have_func("cblas_dgemm", ["cblas.h"]) # checking for cblas_dgemm() in cblas.h... no
create_header("nmatrix_config.h") # creating nmatrix_config.h
So, cblas_dgemm
is definitely in cblas.h
. When I look at mkmf.log, I see that this check actually looks for two things:
- a
_cblas_dgemm
symbol somewhere (?) - a callable
cblas_dgemm
incblas.h
.
Both tests are failing. I assume the former is failing because I need a dir_config
line for cblas
, and maybe a have_library('cblas')
.
But I can't figure out how to make the latter test pass (see line 24 of the gist). Is it possible to pass a block to have_func
so it actually calls it with reasonable arguments? Or is there some other way to run this test? Or do I have to have the dir_config
stuff setup properly?
Here's line 24, by the way:
conftest.c:7:1: error: too few arguments to function ‘cblas_dgemm’
And yes, of course, cblas_dgemm
needs many arguments -- some of them matrices.
It's frustrating how little documentation there is on any of these mkmf
functions.