ruby-numo / numo-narray

Ruby/Numo::NArray - New NArray class library
http://ruby-numo.github.io/narray/
BSD 3-Clause "New" or "Revised" License
415 stars 41 forks source link

failed to install numo-linalg for jruby #147

Closed daddygongon closed 4 years ago

daddygongon commented 4 years ago

Hi. I've tried to install numo-linalg for jruby but failed. Any advice?

Environment

What did I do.

error message on numo-narray-0.9.1.5/gem_make.out

current directory: /Users/bob/jruby-9.2.9.0/lib/ruby/gems/shared/gems/numo-narray-0.9.1.5/ext/numo/narray
/Users/bob/jruby-9.2.9.0/bin/jruby -r ./siteconf20191125-96205-1qv1p6e.rb extconf.rb
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.headius.backport9.modules.Modules to method sun.nio.ch.NativeThread.signal(long)
WARNING: Please consider reporting this to the maintainers of com.headius.backport9.modules.Modules
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
checking for stdbool.h... RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.

        try_do at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:456
       try_cpp at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:587
   have_header at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:1091
  checking_for at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:942
      postpone at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:350
          open at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:320
      postpone at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:350
          open at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:320
      postpone at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:346
  checking_for at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:941
   have_header at /Users/bob/jruby-9.2.9.0/lib/ruby/stdlib/mkmf.rb:1090
        <main> at extconf.rb:56
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/bob/jruby-9.2.9.0/bin/jruby

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/bob/jruby-9.2.9.0/lib/ruby/gems/shared/extensions/universal-java-13/2.5.0/numo-narray-0.9.1.5/mkmf.log

extconf failed, exit code 1

cat mkmf.log

" -o conftest -Itypes -I/include/universal-java13 -I/Users/bob/jruby-9.2.9.0/lib/ruby/include/ruby/backward -I/Users/bob/jruby-9.2.9.0/lib/ruby/include -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE     -DTARGET_RT_MAC_CFM=0  -fno-omit-frame-pointer -fno-strict-aliasing  -fexceptions  conftest.c  -L. -L/Users/bob/jruby-9.2.9.0/lib    -arch x86_64      "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <ruby.h>
4: int main(int argc, char **argv)
5: {
6:   return 0;
7: }
/* end */
masa16 commented 4 years ago

As far as I know, building C-extension for JRuby is very hard, so currently numo-narray does not support JRuby. Sorry for inconvenience.

daddygongon commented 4 years ago

Thanks for the fast reply, which makes me a clear decison. I am writing a subset of DFloat class, which works well. I hope you doing more valuable works.