Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to install the GNU scientific library on Ubuntu 12.04. I've downloaded gsl-1.15 from the nearest GNU mirror (in my case this one). I ran the building steps listed on the INSTALL file:

$ sudo ./configure --prefix /usr/local

without any error.

$ sudo make

which resulted in two errors. I ran the next one anyway:

$ sudo make install

I'm posting just the final lines of the respective outputs:

$ sudo make

...
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT gsl-randist.o -MD -MP -MF .deps/gsl-randist.Tpo -c -o gsl-randist.o gsl-randist.c
mv -f .deps/gsl-randist.Tpo .deps/gsl-randist.Po
/bin/bash ./libtool --tag=CC   --mode=link gcc  -g -O2   -o gsl-randist gsl-randist.o libgsl.la cblas/libgslcblas.la -lm 
libtool: link: gcc -g -O2 -o .libs/gsl-randist gsl-randist.o  ./.libs/libgsl.so cblas/.libs/libgslcblas.so -lm
./.libs/libgsl.so: undefined reference to `gsl_sf_ellint_RD_e'
collect2: ld returned 1 exit status
make[2]: *** [gsl-randist] Error 1
make[2]: Leaving directory `/home/ana/gsl-1.15'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ana/gsl-1.15'
make: *** [all] Error 2

$ sudo make install

...
make[1]: Entering directory `/home/ana/gsl-1.15'
/bin/bash ./libtool --tag=CC   --mode=link gcc  -g -O2   -o gsl-randist gsl-randist.o libgsl.la cblas/libgslcblas.la -lm 
libtool: link: gcc -g -O2 -o .libs/gsl-randist gsl-randist.o  ./.libs/libgsl.so cblas/.libs/libgslcblas.so -lm
./.libs/libgsl.so: undefined reference to `gsl_sf_ellint_RD_e'
collect2: ld returned 1 exit status
make[1]: *** [gsl-randist] Error 1
make[1]: Leaving directory `/home/ana/gsl-1.15'
make: *** [install-recursive] Error 1

Can anyone help me figure out what is the source of this error?

Thank you.

share|improve this question
    
While this will not help you to resolve your issue, you should not build (run make) as root (sudo). Only run the install target with root privileges (usually needed, not when running a non-system-wide install). –  gertvdijk Jan 2 '13 at 2:50
    
What's the reason for compiling from source? The package gsl-bin is provided in the universe repository for your convenience. –  gertvdijk Jan 2 '13 at 2:52
    
I tried both compiling from source and installing through apt-get. In both cases, when I try to compile a test code for special functions, I get the error g++ -lm -lgsl -lgslcblas specfun.c /tmp/ccdeAgsn.o: In function ´main': specfun.c:(.text+0x25): undefined reference to ´gsl_sf_bessel_J0' collect2: ld returned 1 exit status –  Ana Carolina Jan 2 '13 at 15:16
    
has anyone had this same problem and has any idea on what I might be doing wrong? –  Ana Carolina Jan 2 '13 at 21:37
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.