NArray install fail with DevKit on Win

C

Chris Lervag

Hi All

I just attempted to install NArray on Ruby 1.9.2 on Win XP with DevKit
installed. It seems like the devkit installed successfully (I was able
to run the RDiscount test displayed on the devkit wiki).

Attempting to install narray however failed (pasting the command prompt
output below). When it comes to compiling Im basically lost as to
interpret what's going on, so if someone could bring some insight as to
what is happening here that would be appreciated. I guess it would be
nice to know if it is either something wrong with the narray gem or if
it is related to either my ruby/devkit install or if Im missing some
required libraries or whatever.

Thanks,
Chris



C:\>gem install narray --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing narray:
ERROR: Failed to build gem native extension.

C:/Ruby/bin/ruby.exe extconf.rb
checking for stdint.h... yes
checking for u_int8_t... no
checking for uint8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for u_int32_t... no
checking for uint32_t... yes
creating narray_config.h
creating Makefile

make
Makefile:180: warning: overriding commands for target
`C:/Ruby/lib/ruby/gems/1.9
1/gems/narray-0.5.9.9/.'
Makefile:178: warning: ignoring old commands for target
`C:/Ruby/lib/ruby/gems/1
9.1/gems/narray-0.5.9.9/.'
gcc -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32
-I/C/Ruby/include/ruby-1.9.1/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DHAVE_STDINT_H
-DHAVE_UINT8_T -DH
AVE_INT16_T -DHAVE_INT32_T -DHAVE_UINT32_T -O3 -g -Wextra
-Wno-unused-paramet
er -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializ
ers -Wno-long-long -o narray.o -c narray.c
narray.c: In function 'na_inspect':
narray.c:784:15: warning: initialization discards qualifiers from
pointer target
type
narray.c:785:15: warning: initialization discards qualifiers from
pointer target
type
gcc -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32
-I/C/Ruby/include/ruby-1.9.1/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DHAVE_STDINT_H
-DHAVE_UINT8_T -DH
AVE_INT16_T -DHAVE_INT32_T -DHAVE_UINT32_T -O3 -g -Wextra
-Wno-unused-paramet
er -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializ
ers -Wno-long-long -o na_array.o -c na_array.c
gcc -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32
-I/C/Ruby/include/ruby-1.9.1/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DHAVE_STDINT_H
-DHAVE_UINT8_T -DH
AVE_INT16_T -DHAVE_INT32_T -DHAVE_UINT32_T -O3 -g -Wextra
-Wno-unused-paramet
er -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializ
ers -Wno-long-long -o na_func.o -c na_func.c
gcc -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32
-I/C/Ruby/include/ruby-1.9.1/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DHAVE_STDINT_H
-DHAVE_UINT8_T -DH
AVE_INT16_T -DHAVE_INT32_T -DHAVE_UINT32_T -O3 -g -Wextra
-Wno-unused-paramet
er -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializ
ers -Wno-long-long -o na_index.o -c na_index.c
gcc -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32
-I/C/Ruby/include/ruby-1.9.1/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DHAVE_STDINT_H
-DHAVE_UINT8_T -DH
AVE_INT16_T -DHAVE_INT32_T -DHAVE_UINT32_T -O3 -g -Wextra
-Wno-unused-paramet
er -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializ
ers -Wno-long-long -o na_random.o -c na_random.c
na_random.c: In function 'RndI':
na_random.c:288:18: warning: comparison between signed and unsigned
integer expr
essions
na_random.c: In function 'RndL':
na_random.c:315:18: warning: comparison between signed and unsigned
integer expr
essions
C:/Ruby/bin/ruby -I. ./mkop.rb
gcc -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32
-I/C/Ruby/include/ruby-1.9.1/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DHAVE_STDINT_H
-DHAVE_UINT8_T -DH
AVE_INT16_T -DHAVE_INT32_T -DHAVE_UINT32_T -O3 -g -Wextra
-Wno-unused-paramet
er -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializ
ers -Wno-long-long -o na_op.o -c na_op.c
C:/Ruby/bin/ruby -I. ./mkmath.rb
gcc -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32
-I/C/Ruby/include/ruby-1.9.1/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DHAVE_STDINT_H
-DHAVE_UINT8_T -DH
AVE_INT16_T -DHAVE_INT32_T -DHAVE_UINT32_T -O3 -g -Wextra
-Wno-unused-paramet
er -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializ
ers -Wno-long-long -o na_math.o -c na_math.c
gcc -I. -IC:/Ruby/include/ruby-1.9.1/i386-mingw32
-I/C/Ruby/include/ruby-1.9.1/r
uby/backward -I/C/Ruby/include/ruby-1.9.1 -I. -DHAVE_STDINT_H
-DHAVE_UINT8_T -DH
AVE_INT16_T -DHAVE_INT32_T -DHAVE_UINT32_T -O3 -g -Wextra
-Wno-unused-paramet
er -Wno-parentheses -Wpointer-arith -Wwrite-strings
-Wno-missing-field-initializ
ers -Wno-long-long -o na_linalg.o -c na_linalg.c
na_linalg.c: In function 'Init_na_linalg':
na_linalg.c:577:13: warning: comparison between signed and unsigned
integer expr
essions
na_linalg.c:577:32: warning: signed and unsigned type in conditional
expression
gcc -shared -s -o narray.so narray.o na_array.o na_func.o na_index.o
na_random.o
na_op.o na_math.o na_linalg.o -L. -LC:/Ruby/lib -L.
-Wl,--enable-auto-image-ba
se,--enable-auto-import ./narray.def,--out-implib=libnarray.a
-lmsvcrt-ruby191
-lshell32 -lws2_32
gcc.exe: ./narray.def,--out-implib=libnarray.a: No such file or
directory
make: *** [narray.so] Error 1


Gem files will remain installed in
C:/Ruby/lib/ruby/gems/1.9.1/gems/narray-0.5.9
9 for inspection.
Results logged to
C:/Ruby/lib/ruby/gems/1.9.1/gems/narray-0.5.9.9/src/gem_make.o
ut

C:\>ruby --version
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]

C:\>gem --version
1.6.2

C:\>
 
J

Jon Forums

Attempting to install narray however failed (pasting the command prompt
output below). When it comes to compiling Im basically lost as to
interpret what's going on, so if someone could bring some insight as to
what is happening here that would be appreciated. I guess it would be
nice to know if it is either something wrong with the narray gem or if
it is related to either my ruby/devkit install or if Im missing some
required libraries or whatever.

See if this at least allows you to build and install it:

C:\Users\Jon\Downloads\temp>ruby --version
ruby 1.9.2p180 (2011-02-18 revision 30907) [i386-mingw32]

C:\Users\Jon\Downloads\temp>gem --version
1.6.2


C:\Users\Jon\Downloads\temp>gem fetch narray
Fetching: narray-0.5.9.9.gem (100%)
Downloaded narray-0.5.9.9

C:\Users\Jon\Downloads\temp>gem unpack narray-0.5.9.9.gem
Unpacked gem: 'C:/Users/Jon/Downloads/temp/narray-0.5.9.9'

C:\Users\Jon\Downloads\temp>cd narray-0.5.9.9

# comment out the following lines in src\extconf.rb
https://github.com/masa16/narray/blob/master/extconf.rb#L55-66

C:\Users\Jon\Downloads\temp\narray-0.5.9.9>gem spec
..\narray-0.5.9.9.gem > narray.gemspec

C:\Users\Jon\Downloads\temp\narray-0.5.9.9>gem build narray.gemspec
WARNING: no description specified
Successfully built RubyGem
Name: narray
Version: 0.5.9.9
File: narray-0.5.9.9.gem

C:\Users\Jon\Downloads\temp\narray-0.5.9.9>gem install
narray-0.5.9.9.gem
Building native extensions. This could take a while...
Successfully installed narray-0.5.9.9
1 gem installed


C:\Users\Jon\Documents>irb
irb(main):001:0> require 'narray_ext'
=> true
irb(main):002:0> require 'narray'
=> true
irb(main):003:0> $LOADED_FEATURES.select {|i| i =~ /n(array|matrix)/}
=> ["C:/ruby192/lib/ruby/gems/1.9.1/gems/narray-0.5.9.9/nmatrix.rb",
"C:/ruby192/lib/ruby/gems/1.9.1/gems/narray-0.5.9.9/narray_ext.rb",
"C:/ruby192/lib/ruby/gems/1.9.1/gems/narray-0.5.9.9/narray.so"]
 
V

Vicente Bosch Campos

Hi,

I want to have a global unique Logger object.

Is there any other way than having an inherited class with the singleton =
mixin ?

require 'logger'
require 'singleton'

module Utils
class ApplicationLogger < Logger
include Singleton
=20
def initialize
=20
super(STDOUT)
=20
end
=20
end
end=
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top