Joe
Joe

Reputation: 21

ceres-solver-2.0.0 cmake : No rule to make Target***

I tried to install ceres-solver(https://github.com/ceres-solver/ceres-solver) on the Linux server in the lab, and since I didn't have root privileges, I tried to download the Zip and unpack the cmake build. But there was a problem with make install.

The following are all of my Linux commands.

tar -zxf ceres-solver-2.0.0.tar.gz

cd ceres-solver-2.0.0/

mkdir build

cd build

cmake -DCMAKE_INSTALL_PREFIX=/home/zhangzb/include/Ceres/ -DCMAKE_PREFIX_PATH=/home/zhangzb/include/Glog -DCMAKE_PREFIX_PATH=/home/zhangzb/include/eigen3/ -DCMAKE_PREFIX_PATH=/home/zhangzb/include/Gflags/ -Dglog_DIR=/home/zhangzb/include/Glog  ..

make install

After the cmakecommand, everything is proceeding normally. But after the make install command, the following issue occurred.

make[2]: *** No rule to make target '/tmp/build/80754af9/snappy_1649923748780/_build_env/x86_64-conda-linux-gnu/sysroot/usr/lib/librt.so', needed by 'bin/small_blas_gemv_benchmark'.  Stop.
CMakeFiles/Makefile2:3192: recipe for target 'internal/ceres/CMakeFiles/small_blas_gemv_benchmark.dir/all' failed
make[1]: *** [internal/ceres/CMakeFiles/small_blas_gemv_benchmark.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2

I noticed that it's trying to find librt.so in '/tmp/build/80754af9/snappy_1649923748780/_build_env/x86_64-conda-linux-gnu/sysroot/usr/lib/librt.so', but librt.so is located in /usr/lib/x86_64-linux-gnu/.

zhangzb@master:~/include/ceres-solver-2.0.0/build$ ls -l /usr/lib/x86_64-linux-gnu/librt.so
lrwxrwxrwx 1 root root 32 5 3 2022 /usr/lib/x86_64-linux-gnu/librt.so -> /lib/x86_64-linux-gnu/librt.so.1

I hope it can locate librt.so in the correct location(/usr/lib/x86_64-linux-gnu/librt.so) so that I can successfully install the Ceres Solver.

Upvotes: 1

Views: 329

Answers (0)

Related Questions