fTetWild
fTetWild copied to clipboard
Ubuntu cannot find gmp
Hello,
When I try to install gmp on Ubuntu by using this command:
sudo apt-get install gmp
it says:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gmp
Does anyone know what's wrong here?
Thanks!
I installed gmp on ubuntu with this command sudo apt-get install libgmp3-dev
.
is the installation in the path?
Cmake is looking in these env vars: GMP_INC
and GMP_LIB
See the official instruction below.
Note if cmake cannot find gmp you need to export the envirnement variable GMP_INC and GMP_LIB to the folder where you installed (e.g., <conda_dir>\Library\include for GMP_INC and <conda_dir>\Library\lib for GMP_LIB).
Previously I did sudo apt-get install gmp
and got the same errors:
$ sudo apt install gmp
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gmp
Then, cmake
gave errors about GMP_INC and GMP_LIB:
$ cmake ..
...
-- Could NOT find GMP (missing: GMP_INCLUDE_DIRS GMP_LIBRARIES)
-- GMP libs: GMP_LIBRARIES-NOTFOUND GMP_INCLUDE_DIRS-NOTFOUND
CMake Error at CMakeLists.txt:81 (MESSAGE):
Cannot find GMP
Thanks to @hph73, the alternative command sudo apt-get install libgmp3-dev
worked for me. I didn't have to set GMP_INC, GMP_LIB myself. It just works!
$ sudo apt-get install libgmp3-dev
$ cmake ..
$ make
It built successfully after 5 minutes with a number of compiler warnings (shadowed declarations, enumeration values not handled, assume signed overflow not occur).
fTetWild/build (master)$ ./FloatTetwild_bin --help
6 10 12 2 9 5 16 13 0 14 4 1 19 8 18 11 3 17 15 7
float-tetwild
Usage: ./FloatTetwild_bin [OPTIONS]
Options:
-h,--help Print this help message and exit
-i,--input TEXT:FILE Input surface mesh INPUT in .off/.obj/.stl/.ply format. (string, required)
-o,--output TEXT Output tetmesh OUTPUT in .msh format. (string, optional, default: input_file+postfix+'.msh')
--tag TEXT:FILE Tag input faces for Boolean operation.
--op INT Boolean operation: 0: union, 1: intersection, 2: difference.
-l,--lr FLOAT ideal_edge_length = diag_of_bbox * L. (double, optional, default: 0.05)
-e,--epsr FLOAT epsilon = diag_of_bbox * EPS. (double, optional, default: 1e-3)
--max-its INT (for debugging usage only)
--stop-energy FLOAT Stop optimization when max energy is lower than this.
--stage INT (for debugging usage only)
--stop-p INT (for debugging usage only)
--postfix TEXT (for debugging usage only)
--log TEXT Log info to given file.
--level INT Log level (0 = most verbose, 6 = off).
-q,--is-quiet Mute console output. (optional)
--skip-simplify skip preprocessing.
--no-binary export meshes as ascii
--no-color don't export color
--not-sort-input (for debugging usage only)
--correct-surface-orientation
(for debugging usage only)
--envelope-log TEXT (for debugging usage only)
--smooth-open-boundary Smooth the open boundary.
--export-raw Export raw output.
--manifold-surface Force the output to be manifold.
--coarsen Coarsen the output as much as possible.
--csg TEXT:FILE json file containg a csg tree
--use-old-energy (for debugging usage only)
--disable-filtering Disable filtering out outside elements.
--use-floodfill Use flood-fill to extract interior volume.
--use-general-wn Use general winding number.
--use-input-for-wn Use input surface for winding number.
--bg-mesh TEXT:FILE Background mesh for sizing field (.msh file).
--max-threads UINT Maximum number of threads used
Thank you!