使用Cygwin安装rb-gsl gem

时间:2011-04-11 16:07:31

标签: c ruby windows cygwin gsl

我在使用Cygwin在Windows下安装rb-gsl时遇到问题。我正在使用安装了开发工具包的RubyInstaller for Windows。我已经安装了Cygwin和GSL运行时,gsl-apps,gsl-devel和gsl-doc包。发出gem install命令时,我得到以下内容:

$ gem.bat install "C:\Documents and Settings\jzh3fd.2UA1071FGF\Desktop\gsl-1.14
.7.gem"
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing C:\Documents and Settings\jzh3fd.2UA1071FGF\Desktop\gsl
-1.14.7.gem:
        ERROR: Failed to build gem native extension.

        C:/Ruby192/bin/ruby.exe extconf.rb
checking gsl version... 1.14
checking gsl cflags... -I/usr/include
checking for main() in -lcblas... no
checking gsl libs... -L/usr/lib -lgsl -lgslcblas -lm
checking for round()... no
checking for rngextra/rngextra.h... no
checking for qrngextra/qrngextra.h... no
checking for ool/ool_version.h... no
checking for tensor/tensor.h... no
checking for jacobi.h... no
checking for gsl/gsl_cqp.h... no
checking for gsl/gsl_multimin_fsdf.h... no
checking for gsl_poly_solve_quartic() in -lgsl... no
checking for gsl_eigen_francis() in -lgsl... no
checking for ndlinear/gsl_multifit_ndlinear.h... no
checking for alf/alf.h... no
checking rb-gsl version...1.14.7
checking ruby version... 1.9.2
checking for graph... no
checking for narray.h... yes
checking for main() in -lnarray... no
checking for tamu_anova/tamu_anova.h... no
checking for main() in -ltamuanova... no
creating Makefile

make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_rb_gsl'"  > rb_gsl-i386-mingw32.de
f
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1
.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DHAVE_NARRAY_H  -IC:/Rub
y192/lib/ruby/gems/1.9.1/gems/narray-0.5.9.9/. -IC:/Ruby192/lib/ruby/site_ruby/1
.9.1/i386-msvcrt    -Wall -I../include  -I/usr/include  -o alf.o -c alf.c
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1
.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DHAVE_NARRAY_H  -IC:/Rub
y192/lib/ruby/gems/1.9.1/gems/narray-0.5.9.9/. -IC:/Ruby192/lib/ruby/site_ruby/1
.9.1/i386-msvcrt    -Wall -I../include  -I/usr/include  -o array.o -c array.c
In file included from array.c:14:0:
../include/rb_gsl_common.h:18:27: fatal error: gsl/gsl_errno.h: No such file or
directory
compilation terminated.
make: *** [array.o] Error 1


Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/gsl-1.14.
7 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/gsl-1.14.7/ext/gem_make.ou
t

我已经检查过,我可以在/ usr / include / gsl找到gsl_errno.h

1 个答案:

答案 0 :(得分:0)

安装gem时尝试在命令行上提供GSL包含的路径。

gem install gsl -- --with-gsl-include-path=/usr/include/gsl