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

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Mar 28 10:36:17 UTC 2018


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

--- Comment #4 from Jan Beich <jbeich at FreeBSD.org> ---
I've managed to reproduce. find_package(BLAS) fails because libgfortran loads
an old/incorrect libgcc_s version. Only affects ports built by Clang + BFD
linker. Possible workarounds: LDFLAGS=-L/usr/local/lib/gcc6 aka USES=fortran,
LDFLAGS=-fuse-ld={gold,lld}.

$ pkg install cmake blas
$ echo "find_package(BLAS REQUIRED)" >CMakeLists.txt
$ cmake -Wno-dev
$ cat CMakeFiles/CMakeError.log
Determining if the function sgemm_ exists failed with the following output:
Change Dir: CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e22cb/fast"
/usr/bin/make -f CMakeFiles/cmTC_e22cb.dir/build.make
CMakeFiles/cmTC_e22cb.dir/build
Building C object CMakeFiles/cmTC_e22cb.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=sgemm_ -o
CMakeFiles/cmTC_e22cb.dir/CheckFunctionExists.c.o   -c
/usr/local/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_e22cb
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e22cb.dir/link.txt
--verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=sgemm_   
CMakeFiles/cmTC_e22cb.dir/CheckFunctionExists.c.o  -o cmTC_e22cb
-Wl,-rpath,/usr/local/lib /usr/local/lib/libblas.so 
//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'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__subtf3 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__multf3 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__unordtf2 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__lttf2 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__addtf3 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__gttf2 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__divtf3 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__letf2 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__netf2 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__floatditf at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__eqtf2 at GCC_4.6.0'
//usr/local/lib/gcc6/libgfortran.so.3: undefined reference to
`__floatsitf at GCC_4.6.0'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

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


More information about the kde-freebsd mailing list