ruby-numo / numo-narray

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

Can't install numo properly #176

Closed ghost closed 3 years ago

ghost commented 3 years ago

I get this, when I run gem install numo

$ gem install numo
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing numo:
        ERROR: Failed to build gem native extension.

    current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/numo-fftw-0.1.1/ext/numo/fftw   
C:/Ruby27-x64/bin/ruby.exe -I C:/Ruby27-x64/lib/ruby/2.7.0 -r ./siteconf20201206-8584-wcx2j2.rb extconf.rb
checking for numo/narray.h... yes
checking for fftw3.h... yes
checking for -lfftw3... yes
creating Makefile

current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/numo-fftw-0.1.1/ext/numo/fftw       
make "DESTDIR=" clean

current directory: C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/numo-fftw-0.1.1/ext/numo/fftw       
make "DESTDIR="
generating fftw-x64-mingw32.def
erb -T- fftw.erb.c > fftw.c
compiling fftw.c
linking shared-object numo/fftw.so
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.text+0xb0): undefined reference to `nary_check_contiguous' 
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.text+0x19d): undefined reference to `nary_get_pointer_for_read_write'
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.text+0x238): undefined reference to `nary_s_new_like'      
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.text+0x244): undefined reference to `nary_get_pointer_for_read'
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.text+0x24f): undefined reference to `nary_get_pointer_for_write'
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.text+0x261): undefined reference to `nary_dup'
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.text+0x42d): undefined reference to `na_ndloop3'
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.text+0x5bc): undefined reference to `na_ndloop3'
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.text+0x72f): undefined reference to `na_ndloop3'
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.rdata$.refptr.nary_eDimensionError[.refptr.nary_eDimensionError]+0x0): undefined reference to `nary_eDimensionError'
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.rdata$.refptr.na_data_type[.refptr.na_data_type]+0x0): undefined reference to `na_data_type'
C:/Ruby27-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: fftw.o:fftw.c:(.rdata$.refptr.numo_cDComplex[.refptr.numo_cDComplex]+0x0): 
undefined reference to `numo_cDComplex'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:261: fftw.so] Error 1

make failed, exit code 2

Gem files will remain installed in C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/numo-fftw-0.1.1 for 
inspection.
Results logged to C:/Ruby27-x64/lib/ruby/gems/2.7.0/extensions/x64-mingw32/2.7.0/numo-fftw-0.1.1/gem_make.out
kojix2 commented 3 years ago

This looks like an error that occurs in Windows. I was able to reproduce the problem as well. But this is a numo-fftw problem, not a numo-narray problem. The numo-narray should be installed successfully. So close this issue and put an issue on numo-fftw.

Perhaps it could be the same as the next issue. https://github.com/ruby-numo/numo-fftw/issues/1

ghost commented 3 years ago

This looks like an error that occurs in Windows. I was able to reproduce the problem as well. But this is a numo-fftw problem, not a numo-narray problem. The numo-narray should be installed successfully. So close this issue and put an issue on numo-fftw.

Perhaps it could be the same as the next issue. ruby-numo/numo-fftw#1

I think maybe you're right. This is when I had installed fftw in MSYS. Closing this issue.