LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-21-2014, 06:45 AM   #1
ixcrpts
LQ Newbie
 
Registered: Nov 2013
Posts: 7

Rep: Reputation: Disabled
How to link gsl to another tool?


Hello,

I am trying to install one software which requires gsl and giving me this error.
fatal error: gsl/gsl_vector.h: No such file or directory

So, I installed gsl-1.16.
./configure --prefix=/path_to_dir/
make
make install

I am working on a server, so I could not install it as root via sudo.
So, now the required files are not in /use/local/... dir and I do not know how to link these gsl files, So that I can install my tool.

Any idea regarding gsl using locally would be appreciated.

Thanks
 
Old 09-21-2014, 06:59 AM   #2
fatmac
Senior Member
 
Registered: Sep 2011
Location: Surrey/Hants Border, UK
Distribution: BSD & Linux - As long as they are Lightweight
Posts: 1,704

Rep: Reputation: Disabled
The syntax is,
ln -s <what> <where>
 
Old 09-21-2014, 07:17 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
Installing gsl to /home/name/ :

$ tar xvf gsl-1.16.tar.gz
$ cd gsl-1.16/ && ./configure --prefix=/home/<name>/
$ make && make install
... then you will get /home/<name>/include/gsl/gsl_headers.h

For other applications to compile with the gsl headers,
please use e.g. CFLAGS=-I/home/<name>/include
.. or ./configure --with-gsl-headers=/home/<name>/include

-
 
Old 09-21-2014, 07:27 AM   #4
ixcrpts
LQ Newbie
 
Registered: Nov 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for your help fatmac.
The error of include files are solved. But now I am getting this error.

/usr/bin/ld: cannot find -lgsl
/usr/bin/ld: cannot find -lgslcblas
collect2: error: ld returned 1 exit status

Any help regarding this?
 
Old 09-21-2014, 07:35 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
← Ref. post #4.

CFLAGS=-L/<location-of-the_gsl-libraries>
.. or ./configure --with-gsl-libs=<location-of-the_gsl-libraries>
 
Old 09-21-2014, 08:08 AM   #6
ixcrpts
LQ Newbie
 
Registered: Nov 2013
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks knudfl.
I use this command and I am getting the same error.
/usr/bin/ld: cannot find -lgsl
/usr/bin/ld: cannot find -lgslcblas

So..
CFLAGS=-L/<location-of-the_gsl-libraries>
means:
CFLAGS=-L/</../gsl-1.16/lib>

I used this with make and also tried directly.

I found in the make file the lgsl and lgslcblas is defined like this..
LIBS += -lgsl -lgslcblas

If the gsl file is installed in the tool directory, would that be a problem?
 
Old 09-21-2014, 08:58 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
OK, you can try ...

$ export CFLAGS=-L../gsl-1.16/lib
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
link traffic monitoring tool sachin.davra Linux - Newbie 2 09-21-2014 05:45 PM
GSL on Cygwin can't find the Monte Carlo library. thethinker Linux - Software 0 02-02-2012 12:36 AM
error: GSL CBLAS library not found tony_lincon Linux - Newbie 5 06-18-2010 03:14 PM
gsl .h files not found ekdya Debian 3 07-21-2006 02:05 AM
gsl_sf_coulomb_wave_FG_e in gsl library darknails Programming 0 05-09-2005 11:32 AM


All times are GMT -5. The time now is 09:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration