[Bug 226959] devel/cmake: find_package(BLAS REQUIRED) doesn't find blas

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Apr 2 22:41:04 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226959

Adriaan de Groot <adridg at freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adridg at freebsd.org

--- Comment #7 from Adriaan de Groot <adridg at freebsd.org> ---
There was another PR filed -- I think by Diane Bruce -- about gfortran and
cmake and there was a long discussion there. I can't find it right now, though.

It's not entirely a CMake problem, although find_package(BLAS) shows it shortly
and simply. Jan points to "the libgcc problem", which is the underlying thing.
Consider this C program:

int main() { return 0; }

Compile it, and link to one of the blas libraries, on amd64 where /usr/bin/cc
is Clang:

cc t.c /usr/local/lib/libblas.so

with linker errors (many more than this)

//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__getf2 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__floatunditf at GCC_4.6.0'

Throw in the "right" libgcc_s and it links fine:

cc t.c /usr/local/lib/gcc6/libgcc_s.so.1 /usr/local/lib/libblas.so

Using gcc6 instead of Clang does not need this workaround, since it pulls in
the right libgcc_s to start with.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the kde-freebsd mailing list