1

I am trying to install a package which has a dependecy on gsl. In the package docs, it is mentioned:

0. This installation is known to work easily if you use Mac OS X and have 
installed python and gsl using MacPorts.

1. Modify the setup_cfg.py
Change the 'GSL_INCLUDE' and 'GSL_LIB' variables to your path to the GSL
header and library files. For example:
GSL_INCLUDE = 'some_path/gsl-1.15/include'
GSL_LIB = 'some_path/gsl-1.15/lib'

I am using ubuntu and installed gsl using

sudo apt-get install libgsl0-dev

How can I find the gsl libraries path? 'some_path/gsl-1.15/include' ; 'some_path/gsl-1.15/lib'

abhishek:/usr/lib$ pkg-config --libs gsl 
-lgsl -lgslcblas -lm
5
  • Why are you following instructions for LFS if you are using Ubuntu? You can install the GSL development package libgsl0-dev directly from the repository. Dec 18, 2015 at 14:37
  • I know. Either way I want the path. The other also renders the same result. Dec 18, 2015 at 14:42
  • If you've installed libgsl0-dev from the repository, then you should be able to link the libraries using pkg-config --libs gsl. The actual libraries should be in the standard search path /usr/lib. Dec 18, 2015 at 14:47
  • @steeldriver Thanks for the reply! Please check this: abhishek:/usr/lib$ pkg-config --libs gsl -lgsl -lgslcblas -lm Dec 19, 2015 at 6:39
  • @steeldriver Made major changes in question to make it more clear and understandable. Dec 19, 2015 at 7:31

1 Answer 1

3

If you installed the libgsl0-dev package, then its header files should have gone in /usr/include/gsl and its libraries in /usr/lib

You can confirm this by looking at the output of the command dpkg -L libgsl0-dev or by looking at the list of files online at http://packages.ubuntu.com

I don't think it is possible to know from what you have posted whether the software you are installing is expecting the gsl subdirectory - that is, whether it wants

GSL_INCLUDE = '/usr/include/gsl'

or just

GSL_INCLUDE = '/usr/include'

(in C-language terms, that would be the difference between something like #include <gsl/cblas.h> and #include <cblas.h>). You may need to try both.

Note that /usr/include and /usr/lib are standard search paths for tools such as gcc. Most often, when development packages install to such paths there is no need to set them explicitly - you will see that pkg-config --cflags --libs does not output any -I or -L include path or library path directives.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .