I looked into this more, and it's just coincidental that adding the `int` appears to let it find the function.  Here's my process for figuring this out:

I duplicated the result you showed there on my machine (with a different include path, since my headers aren't in the same place).  Then I instrumented mkmf to output the code that it generates and tries to link.  I then compiled each with gcc.

Without the `int`, both tests in mkmf's `try_func` fail, the first because it can't find the function; the second because it finds `clapack_dgetrf`, but we haven't supplied any arguments.  With the `int`, the first test fails to compile with a syntax error (as it should for the reason I cited in the original comment).  However, the second test succeeds because it writes the following code for the call to `clapack_dgetrf`:
```C
int t(void) { int clapack_dgetrf(); return 0; }
```

Because the `int` is added here, this is *not* a function call, but a function declaration, which succeeds, and so the return status is 0, and it thinks that it found the function.

Here's a gist with the complete code generated by mkmf for each case (I added the stdio include):

https://gist.github.com/cjfuller/789f328597265088d39f#file-link_tests-c

I think the correct solution is to supply the correct number of arguments of the correct type, as I suggested above.