GithubHelp home page GithubHelp logo

Cannot install on OS X about nmatrix HOT 10 CLOSED

alexspeller avatar alexspeller commented on September 28, 2024
Cannot install on OS X

from nmatrix.

Comments (10)

alexspeller avatar alexspeller commented on September 28, 2024

I just found these instructions on the wiki, however these do not work either. Following those instructions gives this result:

"gcc -o conftest -I/Users/alex/.rbenv/versions/1.9.3-p392/include/ruby-1.9.1/x86_64-darwin12.2.0 -I/Users/alex/.rbenv/versions/1.9.3-p392/include/ruby-1.9.1/ruby/backward -I/Users/alex/.rbenv/versions/1.9.3-p392/include/ruby-1.9.1 -I../../../../ext/nmatrix -I'/Users/alex/.rbenv/versions/1.9.3-p392/include'  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I'/Users/alex/.rbenv/versions/1.9.3-p392/include'  -Wall   -O3 -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration  -pipe conftest.c  -L. -L/Users/alex/.rbenv/versions/1.9.3-p392/lib -L. -L'/Users/alex/.rbenv/versions/1.9.3-p392/lib'  -L/usr/local/lib     -lruby-static  -lpthread -ldl -lobjc "
gcc: error: unrecognized command line option ‘-Wshorten-64-to-32’
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */

from nmatrix.

alexspeller avatar alexspeller commented on September 28, 2024

Success! It took many hours and several reinstalls of my entire toolchain but I got there in the end. I updated the wiki with the resolution of the issues I faced.

from nmatrix.

agarie avatar agarie commented on September 28, 2024

Hey @alexspeller, sorry but I only saw the email about this issue now. Anyway, thanks for adding it to the wiki and good luck!

You can find API documentation in this link. If you find any other problems, please open more issues. :)

from nmatrix.

robertfeldt avatar robertfeldt commented on September 28, 2024

I'm still running in to this same problem as alexspeller and the Wiki is NOT helping me resolving this. I'd really appreciate concrete details on how you resolved this Alex (or others). Log of problem below.

feldt:/$ export C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers
feldt:/$ export CPLUS_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers
feldt:$ cd dev/external/nmatrix/
feldt:
/dev/external/nmatrix$ bundle exec rake compile
rake/gempackagetask is deprecated. Use rubygems/package_task instead
cd tmp/x86_64-darwin12.2.1/nmatrix/2.0.0
make
compiling ../../../../ext/nmatrix/nmatrix.cpp
In file included from ../../../../ext/nmatrix/nmatrix.cpp:50:0:
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::potrf(CBLAS_ORDER, CBLAS_UPLO, int, DType_, int) [with DType = float]':
../../../../ext/nmatrix/util/math.h:1681:47: error: 'clapack_spotrf' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::potrf(CBLAS_ORDER, CBLAS_UPLO, int, DType_, int) [with DType = double]':
../../../../ext/nmatrix/util/math.h:1686:47: error: 'clapack_dpotrf' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::potrf(CBLAS_ORDER, CBLAS_UPLO, int, DType_, int) [with DType = nm::Complex]':
../../../../ext/nmatrix/util/math.h:1691:72: error: 'clapack_cpotrf' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::potrf(CBLAS_ORDER, CBLAS_UPLO, int, DType_, int) [with DType = nm::Complex]':
../../../../ext/nmatrix/util/math.h:1696:72: error: 'clapack_zpotrf' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'void nm::math::lauum(CBLAS_ORDER, CBLAS_UPLO, int, float_, int)':
../../../../ext/nmatrix/util/math.h:2206:40: error: there are no arguments to 'clapack_slauum' that depend on a template parameter, so a declaration of 'clapack_slauum' must be available [-fpermissive]
../../../../ext/nmatrix/util/math.h:2206:40: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../../../../ext/nmatrix/util/math.h: In function 'void nm::math::lauum(CBLAS_ORDER, CBLAS_UPLO, int, double_, int)':
../../../../ext/nmatrix/util/math.h:2211:40: error: there are no arguments to 'clapack_dlauum' that depend on a template parameter, so a declaration of 'clapack_dlauum' must be available [-fpermissive]
../../../../ext/nmatrix/util/math.h: In function 'void nm::math::lauum(CBLAS_ORDER, CBLAS_UPLO, int, nm::Complex64_, int)':
../../../../ext/nmatrix/util/math.h:2216:40: error: there are no arguments to 'clapack_clauum' that depend on a template parameter, so a declaration of 'clapack_clauum' must be available [-fpermissive]
../../../../ext/nmatrix/util/math.h: In function 'void nm::math::lauum(CBLAS_ORDER, CBLAS_UPLO, int, nm::Complex128_, int)':
../../../../ext/nmatrix/util/math.h:2221:40: error: there are no arguments to 'clapack_zlauum' that depend on a template parameter, so a declaration of 'clapack_zlauum' must be available [-fpermissive]
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::getri(CBLAS_ORDER, int, DType_, int, const int_) [with DType = float]':
../../../../ext/nmatrix/util/math.h:2333:47: error: 'clapack_sgetri' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::getri(CBLAS_ORDER, int, DType_, int, const int_) [with DType = double]':
../../../../ext/nmatrix/util/math.h:2338:47: error: 'clapack_dgetri' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::getri(CBLAS_ORDER, int, DType_, int, const int_) [with DType = nm::Complex]':
../../../../ext/nmatrix/util/math.h:2343:72: error: 'clapack_cgetri' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::getri(CBLAS_ORDER, int, DType_, int, const int_) [with DType = nm::Complex]':
../../../../ext/nmatrix/util/math.h:2348:72: error: 'clapack_zgetri' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::potri(CBLAS_ORDER, CBLAS_UPLO, int, DType_, int) [with DType = float]':
../../../../ext/nmatrix/util/math.h:2363:47: error: 'clapack_spotri' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::potri(CBLAS_ORDER, CBLAS_UPLO, int, DType_, int) [with DType = double]':
../../../../ext/nmatrix/util/math.h:2368:47: error: 'clapack_dpotri' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::potri(CBLAS_ORDER, CBLAS_UPLO, int, DType_, int) [with DType = nm::Complex]':
../../../../ext/nmatrix/util/math.h:2373:72: error: 'clapack_cpotri' was not declared in this scope
../../../../ext/nmatrix/util/math.h: In function 'int nm::math::potri(CBLAS_ORDER, CBLAS_UPLO, int, DType_, int) [with DType = nm::Complex]':
../../../../ext/nmatrix/util/math.h:2378:72: error: 'clapack_zpotri' was not declared in this scope
../../../../ext/nmatrix/nmatrix.cpp: In function 'VALUE nm_factorize_lu(VALUE)':
../../../../ext/nmatrix/nmatrix.cpp:1570:7: error: 'clapack_cgetrf' was not declared in this scope
../../../../ext/nmatrix/nmatrix.cpp:1570:23: error: 'clapack_zgetrf' was not declared in this scope
../../../../ext/nmatrix/nmatrix.cpp: In function 'VALUE nm_xslice(int, VALUE_, void_ ()(STORAGE, SLICE_), void ()(NMATRIX), VALUE)':
../../../../ext/nmatrix/nmatrix.cpp:1672:31: warning: unused variable 'orient' [-Wunused-variable]
make: *_* [nmatrix.o] Error 1
rake aborted!
Command failed with status (2): [make...]
/Users/feldt/.rvm/gems/ruby-2.0.0-p0/gems/rake-compiler-0.8.3/lib/rake/extensiontask.rb:112:in block (2 levels) in define_compile_tasks' /Users/feldt/.rvm/gems/ruby-2.0.0-p0/gems/rake-compiler-0.8.3/lib/rake/extensiontask.rb:111:inblock in define_compile_tasks'
Tasks: TOP => compile => compile:x86_64-darwin12.2.1 => compile:nmatrix:x86_64-darwin12.2.1 => copy:nmatrix:x86_64-darwin12.2.1:2.0.0 => tmp/x86_64-darwin12.2.1/nmatrix/2.0.0/nmatrix.bundle
(See full trace by running task with --trace)
feldt:/dev/external/nmatrix$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1]
feldt:
/dev/external/nmatrix$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc47/4.7.3/gcc/libexec/gcc/x86_64-apple-darwin12.4.0/4.7.3/lto-wrapper
Target: x86_64-apple-darwin12.4.0
Configured with: ../configure --build=x86_64-apple-darwin12.4.0 --prefix=/usr/local/Cellar/gcc47/4.7.3/gcc --datarootdir=/usr/local/Cellar/gcc47/4.7.3/share --bindir=/usr/local/Cellar/gcc47/4.7.3/bin --enable-languages=c --program-suffix=-4.7 --with-gmp=/usr/local/opt/gmp4 --with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08 --with-ppl=/usr/local/opt/ppl011 --with-cloog=/usr/local/opt/cloog-ppl015 --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-plugin --enable-lto --disable-werror --disable-nls --disable-multilib
Thread model: posix
gcc version 4.7.3 (GCC)

from nmatrix.

alexspeller avatar alexspeller commented on September 28, 2024

@robertfeldt I put the exact steps I followed on the wiki. If those aren't working for you then I can't help.

from nmatrix.

robertfeldt avatar robertfeldt commented on September 28, 2024

Sorry, I must have missed that page then. Can you please link to it here? Thanks. 

Sent from Mailbox for iPhone

On Wed, Jun 26, 2013 at 4:19 PM, Alex Speller [email protected]
wrote:

@robertfeldt I put the exact steps I followed on the wiki. If those aren't working for you then I can't help.

Reply to this email directly or view it on GitHub:
#64 (comment)

from nmatrix.

agarie avatar agarie commented on September 28, 2024

Hey @robertfeldt, you can find installation procedures for Linux and OSX in Installation page of the wiki. If it still doesn't work, please post about the problem here.

from nmatrix.

robertfeldt avatar robertfeldt commented on September 28, 2024

Thanks, I got much farther now and could build and install the gem. But when I require it from Ruby there seems to be a conflict with NArray:

Successfully installed nmatrix-0.0.5
Parsing documentation for nmatrix-0.0.5
Done installing documentation for nmatrix after 0 seconds
Done installing documentation for nmatrix (0 sec).
1 gem installed
feldt:~/dev/external/nmatrix$ irb
2.0.0-p0 :001 > require 'nmatrix'
NameError: uninitialized constant NArray
from /Users/feldt/.rvm/gems/ruby-2.0.0-p0/gems/narray-0.6.0.8/nmatrix.rb:8:in <top (required)>' from /Users/feldt/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:inrequire'
from /Users/feldt/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in rescue in require' from /Users/feldt/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:inrequire'
from (irb):1
from /Users/feldt/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `

'
2.0.0-p0 :002 >

Any advice? This was with the latest git version i.e. including commits up to:

commit 12f7ca1
Merge: 27e1594 22c4ff8
Author: John Woods [email protected]
Date: Tue Jun 25 10:58:48 2013 -0700

Merge pull request #102 from cjfuller/lapack-spec-precision-fix

lapack getrf precision fix

from nmatrix.

robertfeldt avatar robertfeldt commented on September 28, 2024

Ok, forget my previous comment. I just had to uninstall narray and problem solved. Thanks for all help.

from nmatrix.

lazywei avatar lazywei commented on September 28, 2024

I ran into this problem. I followed the wiki page for installation instruction.
My gcc version is 4.9

I got this when compile

mkdir -p tmp/x86_64-darwin13.0/nmatrix/2.1.0
cd tmp/x86_64-darwin13.0/nmatrix/2.1.0
/Users/lazywei/.rbenv/versions/2.1.0/bin/ruby -I. ../../../../ext/nmatrix/extconf.rb
using C++ standard... c++11
g++ reports version... 4.9.0
checking for main() in -lclapack... yes
checking for main() in -llapack... yes
checking for main() in -lcblas... yes
checking for main() in -latlas... no
checking for atlas/cblas.h... no
checking for cblas.h... yes
checking for clapack.h... yes
checking for clapack_dgetrf() in cblas.h,clapack.h... no
checking for clapack_dgetri() in cblas.h,clapack.h... no
checking for dgesvd_() in clapack.h... yes
checking for cblas_dgemm() in cblas.h... yes

I check my clapack.h, its version is 4.2.1 (the latest is 4.5.0). Is the problem because my clapack too old?

from nmatrix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.