https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226959
--- Comment #4 from Jan Beich <[email protected]> --- 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@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__floatunditf@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__subtf3@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__multf3@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__unordtf2@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__lttf2@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__addtf3@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__gttf2@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__divtf3@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__letf2@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__netf2@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__floatditf@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__eqtf2@GCC_4.6.0' //usr/local/lib/gcc6/libgfortran.so.3: undefined reference to `__floatsitf@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.
