我正在尝试在我的 Ubuntu 14.04 机器上安装 SciRuby,但安装失败。我也有一个开放的 github问题,但在安装过程中没有成功。通过查看错误,我确信存在一些 C/C++ 编译问题。任何帮助,将不胜感激
➜ ~ gem install sciruby-full
Building native extensions. This could take a while...
ERROR: Error installing sciruby-full:
ERROR: Failed to build gem native extension.
/home/gemser/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20160312-28957-1w6fjq3.rb extconf.rb
using C++ standard... c++11
g++ reports version... 4.8.4-2ubuntu1~14.04.1)
checking for main() in -lclapack... no
checking for main() in -llapack... no
checking for main() in -lcblas... no
checking for main() in -latlas... no
checking for atlas/cblas.h... no
checking for cblas.h... yes
checking for clapack.h... no
checking for clapack_dgetrf() in atlas/clapack.h... no
checking for clapack_dgetri() in atlas/clapack.h... no
checking for dgesvd_() in clapack.h... no
checking for cblas_dgemm() in cblas.h... no
creating nmatrix_config.h
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling nmatrix.cpp
In file included from nmatrix.cpp:297:0:
ruby_nmatrix.c: In function ‘VALUE nm_reshape_bang(VALUE, VALUE)’:
ruby_nmatrix.c:1069:11: warning: unused variable ‘elem’ [-Wunused-variable]
void* elem = s->elements;
^
ruby_nmatrix.c: In function ‘VALUE nm_complex_conjugate(VALUE)’:
ruby_nmatrix.c:1047:59: warning: ‘copy’ is used uninitialized in this function [-Wuninitialized]
return nm_complex_conjugate_bang(nm_init_copy(copy,self));
^
ruby_nmatrix.c: In function ‘VALUE nm_init_new_version(int, VALUE*, VALUE)’:
ruby_nmatrix.c:1266:60: warning: ‘init’ may be used uninitialized in this function [-Wmaybe-uninitialized]
nm_unregister_values(reinterpret_cast<VALUE*>(init), 1);
^
compiling ruby_constants.cpp
compiling data/data.cpp
compiling util/io.cpp
compiling math.cpp
In file included from math.cpp:141:0:
math/rot.h: In function ‘void nm::math::rot(int, DType*, int, DType*, int, CSDType, CSDType) [with DType = nm::Complex<float>; CSDType = float]’:
math/rot.h:123:40: error: ‘cblas_csrot’ was not declared in this scope
cblas_csrot(N, X, incX, Y, incY, c, s);
^
math/rot.h: In function ‘void nm::math::rot(int, DType*, int, DType*, int, CSDType, CSDType) [with DType = nm::Complex<double>; CSDType = double]’:
math/rot.h:128:40: error: ‘cblas_zdrot’ was not declared in this scope
cblas_zdrot(N, X, incX, Y, incY, c, s);
^
In file included from math.cpp:142:0:
math/rotg.h: In function ‘void nm::math::rotg(DType*, DType*, DType*, DType*) [with DType = nm::Complex<float>]’:
math/rotg.h:99:125: error: ‘cblas_crotg’ was not declared in this scope
cblas_crotg(reinterpret_cast<void*>(a), reinterpret_cast<void*>(b), reinterpret_cast<void*>(c), reinterpret_cast<void*>(s));
^
math/rotg.h: In function ‘void nm::math::rotg(DType*, DType*, DType*, DType*) [with DType = nm::Complex<double>]’:
math/rotg.h:104:125: error: ‘cblas_zrotg’ was not declared in this scope
cblas_zrotg(reinterpret_cast<void*>(a), reinterpret_cast<void*>(b), reinterpret_cast<void*>(c), reinterpret_cast<void*>(s));
^
make: *** [math.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/abhimanyuaryan/.rvm/gems/ruby-2.2.3/gems/nmatrix-0.1.0 for inspection.
Results logged to /home/gemser/.rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/nmatrix-0.1.0/gem_make.out