Comments (10)
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.
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.
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.
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//dev/external/nmatrix$ bundle exec rake compile
feldt:
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:in
block 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/dev/external/nmatrix$ gcc -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.1]
feldt:
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.
@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.
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.
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.
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:in
require'
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:in
require'
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.
Ok, forget my previous comment. I just had to uninstall narray and problem solved. Thanks for all help.
from nmatrix.
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)
- Fix travis-ci rdoc problem on mac osx builds
- MRI segmentation fault at unknown location in code HOT 15
- Calculate rank of matrix based on SVD HOT 1
- More user-friendly SVD interface HOT 8
- Update Travis CI for current Ruby options [critical]
- Concatenate matrices by specifying them in an Array HOT 3
- Boolean indexing
- Check equality with tolerance HOT 1
- More descriptive TypeError from #dot HOT 1
- Can we stop using ALLOCA_N in C++? HOT 3
- MKL support out-of-the-box? HOT 5
- Add Ruby 2.5 and 2.6 to travis configuration HOT 7
- Installation error for MaxOSX and Ubuntu HOT 4
- There is a method in nmatrix for matrix exponential? HOT 9
- puts or p on simple matrix crashes HOT 2
- lib/nmatrix/nmatrix.rb:47:in `require_relative': superclass mismatch for class NMatrix (TypeError) HOT 1
- Is there a 'argmax' method for NMatrix? HOT 1
- '10.2.1' < '4.3.0' is true
- Last argument as keyword parameters is deprecated in Ruby 2.7
- Dir.exists? removed in Ruby 3.2 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nmatrix.