Closed AbhimanyuAryan closed 8 years ago
It's failing on your installation of nmatrix — probably the lapacke and BLAS extensions. Have you installed lapacke and ATLAS?
@mohawkjohn no I didn't have those
I installed them with the following commands:
sudo apt-get install libblas-dev checkinstall
sudo apt-get install libblas-doc checkinstall
sudo apt-get install liblapacke-dev checkinstall
sudo apt-get install liblapack-doc checkinstall
but still I get errors(little less this time):
➜ lapack-3.6.0 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/cooldudeabhi/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20151218-22442-zsgtfs.rb extconf.rb
using C++ standard... c++11
g++ reports version... 5.2.1-22ubuntu2)
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:35: 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));
^
Makefile:241: recipe for target 'math.o' failed
make: *** [math.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/cooldudeabhi/.rvm/gems/ruby-2.2.3/gems/nmatrix-0.1.0 for inspection.
Results logged to /home/cooldudeabhi/.rvm/gems/ruby-2.2.3/extensions/x86_64-linux/2.2.0/nmatrix-0.1.0/gem_make.out
You can still use NMatrix without these. But I'm not sure what the status of sciruby-full without them is. If you're trying to get NMatrix working, you should go look at the NMatrix install instructions.
Getting the exact same error (Ubuntu 14.04.3). I need to use sciruby-full.
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/luke/.rvm/rubies/ruby-2.1.3/bin/ruby -r ./siteconf20160102-5459-zu45uc.rb extconf.rb
using C++ standard... c++11
g++ reports version... 4.8.4-2ubuntu1~14.04)
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/luke/.rvm/gems/ruby-2.1.3/gems/nmatrix-0.1.0 for inspection.
Results logged to /home/luke/.rvm/gems/ruby-2.1.3/extensions/x86_64-linux/2.1.0/nmatrix-0.1.0/gem_make.out
Following This guide fixed my install issue.
please follow the debian instructions in
https://github.com/SciRuby/sciruby-notebooks/blob/master/Dockerfile
This should give you the full environment. Please tell us if it works.
hi @minad
gem install sciruby-full
also fails in sciruby-notebooks docker build.
Please see
https://hub.docker.com/r/kozo2/sciruby-notebooks/builds/bpyukznckubbidakejrimgd/
I see the same failure against debian-jessie (https://github.com/SciRuby/sciruby-notebooks/blob/master/Dockerfile). The build fails with
Step 5 : RUN gem install --no-rdoc --no-ri sciruby-full && iruby register
---> Running in a45de02b4710
ERROR: While executing gem ... (Gem::DependencyResolutionError)
conflicting dependencies nmatrix (= 0.2.0) and nmatrix (~> 0.1)
Activated nmatrix-0.1.0 via:
nmatrix-0.1.0 (~> 0.1), sciruby-full-0.2.8 (= 0.2.8)
instead of (= 0.2.0) via:
nmatrix-lapacke-0.2.0 (~> 0.2.0), mixed_models-0.1.1 (~> 0.1), sciruby-full-0.2.8 (= 0.2.8)
The command '/bin/sh -c gem install --no-rdoc --no-ri sciruby-full && iruby register' returned a non-zero code: 1
@L226 here's the fix
I have no idea why built failed. Could anyone please help me what failed and how to fix this issue?