Skip to content
Advertisement

make[2]: *** No rule to make target `/usr/lib/i386-linux-gnu/libmpfr.so’ in CGAL

I am using CGAL and I have this minimal example (which should be fine since it’s an example):

#include <iostream>
#include <vector>
#include <CGAL/Cartesian_d.h>
#include <CGAL/point_generators_d.h>
typedef CGAL::Cartesian_d<double> Kd;
typedef Kd::Point_d Point;
typedef CGAL::Creator_uniform_d<std::vector<double>::iterator, Point>Creator_d;
int main ()
{
  int nb_points = 10;
  int dim =5;
  double size = 100.0;
  std::cout << "Generating "<<nb_points<<" random points in a"
    <<" ball in "<<dim<<"D of center 0 and radius "<<size<<std::endl;
  std::vector<Point> v;
  v.reserve (nb_points);
  CGAL::Random_points_in_ball_d<Point> gen (dim, 100.0);
  for (int i = 0; i < nb_points; ++i) v.push_back (*gen++);
  for (int i = 0; i < nb_points; ++i) std::cout<<" "<<v[i]<<std::endl;
  return 0;
}

However, I am getting this error:

samaras@samaras-A15:~/code/random_generator$ make
Scanning dependencies of target main
[100%] Building CXX object CMakeFiles/main.dir/main.cpp.o
make[2]: *** No rule to make target `/usr/lib/i386-linux-gnu/libmpfr.so', needed by `main'.  Stop.
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2

What I should do?

I am creating the CmakeLists files like this:

~/code/CGAL-4.3/scripts/cgal_create_CMakeLists
cmake -DCGAL_DIR=$HOME/code/CGAL-4.3 .

as I describe here.

If you need more information, please let me know.

cd /usr/lib/i386-linux-gnu/libmpfr.so
bash: cd: /usr/lib/i386-linux-gnu/libmpfr.so: No such file or directory

Advertisement

Answer

The easiest way to install CGAL on Debian or Ubuntu is apt-get install libcgal-dev (or libcgal-qt4-dev). If you are going to build CGAL yourself, you should still apt-get build-dep cgal which installs the most relevant dependencies.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement