3

I am installing a simulator in Ubuntu in 18.04 and I get the following error during the execution of 'cmake ..' command.

The C compiler identification is GNU 7.5.0

-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find GSL (missing: GSL_INCLUDE_DIR GSL_LIBRARY GSL_CBLAS_LIBRARY)
  (found version "")

Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)

  /usr/share/cmake-3.10/Modules/FindGSL.cmake:148 (find_package_handle_standard_args)

  CMakeLists.txt:6 (find_package)

-- Configuring incomplete, errors occurred!

I checked for the include directory, library and cblas library of GSL. They all exist. Why wouldnt cmake read the directory paths automatically? I would like to have a solution to this.

N0rbert
  • 97,162
  • 34
  • 239
  • 423
VjayalakshmiK
  • 31
  • 1
  • 2

1 Answers1

2

You need to install the related development package:

sudo apt-get install libgsl-dev

and then retry CMake.

N0rbert
  • 97,162
  • 34
  • 239
  • 423
  • Thank you very much! I would like to add one thing though, for people who may encounter this (or similar) in future. I found the same solution on another old thread, and on running "sudo.... install libgsl-dev', it showed that the latest version was already installed. I did the mistake of not running CMake after this command, thinking nothing has changed. But it CMake should be run once more after the install command. – VjayalakshmiK Aug 24 '20 at 17:29