Search code examples
cmakearmdebianapt-getgmp

CMake Could NOT find GMP


I am trying to cross-compile CVC4, but GMP could not be found. I use the following guide for the installation: http://cvc4.cs.stanford.edu/wiki/Developer%27s_Guide

When I run ./configure.sh production I get the following error:

CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find GMP (missing: GMP_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindGMP.cmake:10 (find_package_handle_standard_args)
  CMakeLists.txt:356 (find_package)


-- Configuring incomplete, errors occurred!

However, I have installed libgmp3-dev:armel and libgmp10:armel:

$ sudo apt-get install libgmp3-dev:armel
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgmp3-dev:armel is already the newest version (2:6.1.2+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 61 not upgraded.

$ sudo apt-get install libgmp10:armel
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgmp10:armel is already the newest version (2:6.1.2+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 61 not upgraded.

Are there other gmp packages I need to install or is it necessary to specify the installation location as a parameter for the ./configure.sh command.


Solution

  • The solution was to specify the installation location as a parameter for the ./configure.sh command:

    ./configure.sh --gmp-dir=/usr/lib/arm-linux-gnueabi