failed to install sciruby

Deadly 提交于 2019-12-12 06:47:01

问题


I am trying to install SciRuby on my Ubuntu 14.04 machine but installation failed. I also have an open github issue issue but had no success in installation process. By looking at the errors I am sure there some C/C++ compilation problem. Any help would be appreciated

➜  ~ 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/abhimanyuaryan/.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/abhimanyuaryan/.rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/nmatrix-0.1.0/gem_make.out

回答1:


It seems sciruby-full needs lots of native libraries. Run the steps..

RUN apt-get update   
RUN apt-get install -y build-essential python3 python3-dev python3-pip ruby ruby-dev libzmq3 libzmq3-dev gnuplot-nox libgsl0-dev libtool autoconf automake zlib1g-dev libsqlite3-dev libmagick++-dev imagemagick libatlas-base-dev    
RUN apt-get clean &&      
ln -s /usr/bin/libtoolize /usr/bin/libtool
RUN pip3 install "ipython[notebook]"
RUN gem install --no-rdoc --no-ri sciruby-full && iruby register


来源:https://stackoverflow.com/questions/35961227/failed-to-install-sciruby

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!