LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 05: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, 05:59 AM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,487

Rep: Reputation: Disabled
The syntax is,
ln -s <what> <where>
 
Old 09-21-2014, 06:17 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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, 06: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, 06:35 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

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

CFLAGS=-L/<location-of-the_gsl-libraries>
.. or ./configure --with-gsl-libs=<location-of-the_gsl-libraries>
 
Old 09-21-2014, 07: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, 07:58 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

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

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


Reply



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 04:45 PM
GSL on Cygwin can't find the Monte Carlo library. thethinker Linux - Software 0 02-01-2012 11:36 PM
error: GSL CBLAS library not found tony_lincon Linux - Newbie 5 06-18-2010 02:14 PM
gsl .h files not found ekdya Debian 3 07-21-2006 01:05 AM
gsl_sf_coulomb_wave_FG_e in gsl library darknails Programming 0 05-09-2005 10:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:30 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
Open Source Consulting | Domain Registration