dlib icon indicating copy to clipboard operation
dlib copied to clipboard

No package 'lapack' found and lib.a(sockets_kernel_1.cpp.o) has no symbols

Open yehan-xiao opened this issue 10 years ago • 2 comments

Hi, thanks for providing dlib code on github. I'm new in this area.
This is my case. What should I do to make it work? I'm confused why I have Lapack library but no package 'lapack'? And how can I solve the problems happening in Linking CXX static library libdlib.a? I appreciate in advance!

xyh-iMac:lib xyh$ cd dlib xyh-iMac:dlib xyh$ cd examples/build xyh-iMac:build xyh$ cmake .. -- C++11 activated. -- Searching for BLAS and LAPACK -- Checking for module 'cblas' -- No package 'cblas' found -- Checking for module 'lapack' -- No package 'lapack' found -- Found OpenBLAS library -- Found LAPACK library -- Configuring done -- Generating done -- Build files have been written to: /usr/local/lib/dlib/examples/build xyh-iMac:build xyh$ cmake --build . --config Release Scanning dependencies of target dlib [ 0%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/jpeg_loader.cpp.o [ 0%] Linking CXX static library libdlib.a /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(sockets_kernel_1.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(dir_nav_kernel_1.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(threads_kernel_1.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(stack_trace.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(gui_core_kernel_1.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(sockets_kernel_1.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(dir_nav_kernel_1.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(threads_kernel_1.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(stack_trace.cpp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libdlib.a(gui_core_kernel_1.cpp.o) has no symbols [ 35%] Built target dlib [ 36%] Linking CXX executable webcam_face_pose_ex Undefined symbols for architecture x86_64: "__gfortran_concat_string", referenced from: dgesvd in liblapack.a(dgesvd.o) dormbr in liblapack.a(dormbr.o) dormlq in liblapack.a(dormlq.o) dormqr in liblapack.a(dormqr.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [webcam_face_pose_ex] Error 1 make[1]: *** [CMakeFiles/webcam_face_pose_ex.dir/all] Error 2 make: *** [all] Error 2

yehan-xiao avatar Nov 14 '16 18:11 yehan-xiao

Looks like you have a broken version of OpenBLAS installed. I would delete that copy of OpenBLAS. Or tell cmake to not use any lapack, which you can do via ccmake or cmake-gui.

davisking avatar Nov 14 '16 21:11 davisking

@davisking Thank you very much! It makes sense to me.

I made some changes about OpenBLAS and Numpy according to http://stackoverflow.com/questions/11443302/compiling-numpy-with-openblas-integration/14391693#14391693 and http://dedupe.readthedocs.io/en/latest/OSX-Install-Notes.html

Although it still shows "no No package 'lapack' found", it succeeds to compile.

yehan-xiao avatar Nov 15 '16 16:11 yehan-xiao