2

I'm trying to install the gsl gem on Ubuntu Saucy

I installed the relevant gsl packages with

sudo apt-get install gsl-bin libgsl0-dev

But then installing the gem fails

In file included from /usr/include/ruby-1.9.1/ruby.h:32:0,
                 from ../include/rb_gsl_array.h:34,
                 from wavelet.c:13:
wavelet.c: In function ‘rb_gsl_wavelet_define_const’:
wavelet.c:155:45: error: ‘forward’ undeclared (first use in this function)
   rb_define_const(klass, "FORWARD", INT2FIX(forward));
                                             ^
/usr/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
 #define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                                             ^
wavelet.c:155:45: note: each undeclared identifier is reported only once for each function it appears in
   rb_define_const(klass, "FORWARD", INT2FIX(forward));
                                             ^
/usr/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
 #define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                                             ^
wavelet.c:157:46: error: ‘backward’ undeclared (first use in this function)
   rb_define_const(klass, "BACKWARD", INT2FIX(backward));
                                              ^
/usr/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
 #define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
                                             ^
wavelet.c: In function ‘rb_gsl_wavelet_transform0’:
wavelet.c:194:31: error: ‘forward’ undeclared (first use in this function)
   gsl_wavelet_direction dir = forward;
                               ^
wavelet.c: In function ‘rb_gsl_wavelet2d’:
wavelet.c:534:31: error: ‘forward’ undeclared (first use in this function)
   gsl_wavelet_direction dir = forward;
                               ^
make: *** [wavelet.o] Error 1

The problem is similar to this one: Problems installing gsl gem

The top solution from that thread doesn't work though - the source package for gsl 1.14 is not available at that address anymore. I guess this will be useful to many users with Saucy.

Community
  • 1
  • 1
Dan Mazzini
  • 956
  • 9
  • 19

1 Answers1

1

The accepted answer at the linked question fixed this for me in 13.10, with some minor changes.

curl -O  ftp.unicamp.br/pub/gnu/gsl/gsl-1.14.tar.gz 
tar xvzf gsl-1.14.tar.gz
cd gsl-1.14
./configure
make
sudo make install
sudo gem install --conservative --no-ri --no-rdoc gsl

Obviously, one should be careful with installing a package from "just any FTP-server" :)

Community
  • 1
  • 1
berkes
  • 25,081
  • 21
  • 107
  • 188