解决 /usr/lib/x86_64-linux-gnu/liblapack.so.3: undefined reference to `gotoblas'
最近需要用到openblas库,本地ubuntu 系统内有一个版本,但是想用自己新编译的openblas,
使用cmake指定了链接的库地址,
SET(LINK_LIB_DIRS "/usr/local/lib" "/home/beauty/beautify_linux/3rdparty/OpenBLAS/lib/libopenblas.a") SET(OpenBLAS_LIBRARIES /home/github/OpenBLAS/build/lib/libopenblas.a) SET(OpenCV_LIBRARIES libopencv_core.so libopencv_imgproc.so libopencv_imgcodecs.so libopencv_highgui.so libopencv_videoio.so opencv_objdetect) SET(Other_LIBRARIES libboost_filesystem.so libboost_system.so) SET(LINK_LIBS ${OpenBLAS_LIBRARIES} ${OpenCV_LIBRARIES} ${Other_LIBRARIES})
#INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
LINK_DIRECTORIES(${LINK_LIB_DIRS})
#ADD_LIBRARY(beautify SHARED ${SRC_LIST})
ADD_LIBRARY(beautify_static STATIC ${SRC_LIST})
# 指定静态库的输出名称
#SET_TARGET_PROPERTIES(beautify_static PROPERTIES OUTPUT_NAME "beautify")
# 使动态库和静态库同时存在
#SET_TARGET_PROPERTIES(beautify PROPERTIES CLEAN_DIRECT_OUTPUT 1)
#SET_TARGET_PROPERTIES(beautify_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
# 指定动态库版本
# VERSION 动态库版本
# SOVERSION API版本
#SET_TARGET_PROPERTIES(beautify PROPERTIES VERSION 1.0 SOVERSION 1)
TARGET_LINK_LIBRARIES(beautify_static ${LINK_LIBS})
但是,但是。。ldd的时候显示的依赖路径总是系统目录下的。。
无奈只能把系统下的删掉,这时候才能运行程序。
虽然很不优雅。。但是实在着急只能出此下策。。
sudo apt-get remove libopenblas-base