opencv / opencv_contrib

Repository for OpenCV's extra modules
Apache License 2.0
9.42k stars 5.76k forks source link

No rule to make target /usr/lib/libglog.so #2211

Open TheComet opened 5 years ago

TheComet commented 5 years ago
System information (version)
Detailed description

I am getting the compile error:

No rule to make target '/usr/lib/libglog.so', needed by 'lib/libopencv_sfm.so.4.1.1'.  Stop.

The file is actually located in /usr/lib64/libglog.so, not /usr/lib/libglog.so. What's strange is when I check the value of GLOG_LIBRARIES here, it is set to /usr/lib64/libglog.so which is correct.

I have no idea where this incorrect path is coming from.

Steps to reproduce
mkdir opencv && cd opencv
git clone https://github.com/opencv/opencv
git clone https://github.com/opencv/opencv_contrib
mkdir build && cd build
cmake -DOPENCV_EXTRA_MODULES_PATH=$(pwd)/../opencv_contrib/modules -DBUILD_PACKAGE=OFF -DBUILD_TESTS=OFF -DWITH_CUDA=ON -DWITH_VULKAN=ON ../opencv
make -j
DaddyWesker commented 3 years ago

Same issue here, but on opencv 4.5.1 Linux Mint 20. But i've used sudo apt-get install -y libgoogle-glog-dev and it built fine. But it is not your case, i suppose.

AnqiaoLi commented 2 years ago

Thanks, @DaddyWesker! This works in my case.