numo-narray icon indicating copy to clipboard operation
numo-narray copied to clipboard

New release for GCC 15.x

Open kucho opened this issue 6 months ago • 3 comments

Can we have a new release, please? Recently there were changes merged that addresses issues related with recent versions of GCC (15.x) that prevents this gem from being built.

Thank you in advance!

kucho avatar Jul 06 '25 17:07 kucho

I would also like to have the new version. If you depend on numo-narray, some tests will fail in GitHub Actions.

kojix2 avatar Aug 11 '25 09:08 kojix2

Please release new version.

Because when I try to install numo-narray, it causes following installation error.

$ LANG=C gem install numo-narray
Building native extensions. This could take a while...
ERROR:  Error installing numo-narray:
        ERROR: Failed to build gem native extension.

    current directory: /home/watson/.rbenv/versions/3.4.5/lib/ruby/gems/3.4.0/gems/numo-narray-0.9.2.1/ext/numo/narray
/home/watson/.rbenv/versions/3.4.5/bin/ruby extconf.rb
checking for stdbool.h... yes
checking for stdint.h... yes
checking for bool in stdbool.h... yes
checking for u_int8_t in stdint.h... yes
checking for u_int16_t in stdint.h... yes
checking for int32_t in stdint.h... yes
checking for u_int32_t in stdint.h... yes
checking for int64_t in stdint.h... yes
checking for u_int64_t in stdint.h... yes
checking for exp10()... yes
checking for rb_arithmetic_sequence_extract()... yes
checking for rb_cComplex... yes
creating /home/watson/.rbenv/versions/3.4.5/lib/ruby/gems/3.4.0/gems/numo-narray-0.9.2.1/ext/numo/narray/numo/extconf.h
creating Makefile

current directory: /home/watson/.rbenv/versions/3.4.5/lib/ruby/gems/3.4.0/gems/numo-narray-0.9.2.1/ext/numo/narray
make DESTDIR\= sitearchdir\=./.gem.20250814-23193-b0vaeh sitelibdir\=./.gem.20250814-23193-b0vaeh clean

current directory: /home/watson/.rbenv/versions/3.4.5/lib/ruby/gems/3.4.0/gems/numo-narray-0.9.2.1/ext/numo/narray
make DESTDIR\= sitearchdir\=./.gem.20250814-23193-b0vaeh sitelibdir\=./.gem.20250814-23193-b0vaeh
compiling narray.c
compiling array.c
compiling step.c
compiling index.c
compiling ndloop.c
ndloop.c: In function 'ndloop_alloc':
ndloop.c:359:19: error: assignment to 'void (*)(void)' from incompatible pointer type 'void (*)(ndfunc_t *, na_md_loop_t *)' {aka 'void (*)(struct NDFUNCTION *, struct NA_MD_LOOP *)'} [-Wincompatible-pointer-types]
  359 |     lp->loop_func = loop_func;
      |                   ^
ndloop.c: In function 'ndloop_run':
ndloop.c:1275:23: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
 1275 |     if (lp->loop_func == loop_narray) {
      |                       ^~
ndloop.c:1287:23: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
 1287 |     if (lp->loop_func == loop_narray) {
      |                       ^~
ndloop.c:1297:6: error: too many arguments to function 'lp->loop_func'; expected 0, have 2
 1297 |     (*(lp->loop_func))(nf, lp);
      |     ~^~~~~~~~~~~~~~~~~ ~~
ndloop.c:59:12: note: declared here
   59 |     void (*loop_func)();
      |            ^~~~~~~~~
At top level:
cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-parentheses-equality' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-constant-logical-operand' may have been intended to silence earlier diagnostics
make: *** [Makefile:348: ndloop.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/watson/.rbenv/versions/3.4.5/lib/ruby/gems/3.4.0/gems/numo-narray-0.9.2.1 for inspection.
Results logged to /home/watson/.rbenv/versions/3.4.5/lib/ruby/gems/3.4.0/extensions/x86_64-linux/3.4.0/numo-narray-0.9.2.1/gem_make.out

Watson1978 avatar Aug 13 '25 20:08 Watson1978

I'm seeing similar issues with gcc-14 & clang-17. The fact I'm using Truffleruby has nothing to do with it, btw.

thank you.


thornhill@abydos:~$ gem install numo-narray Building native extensions. This could take a while... ERROR: Error installing numo-narray: ERROR: Failed to build gem native extension.

current directory: /home/thornhill/.rbenv/versions/truffleruby+graalvm-25.0.0/lib/gems/gems/numo-narray-0.9.2.1/ext/numo/narray

/home/thornhill/.rbenv/versions/truffleruby+graalvm-25.0.0/bin/truffleruby extconf.rb checking for stdbool.h... yes checking for stdint.h... yes checking for bool in stdbool.h... yes checking for u_int8_t in stdint.h... yes checking for u_int16_t in stdint.h... yes checking for int32_t in stdint.h... yes checking for u_int32_t in stdint.h... yes checking for int64_t in stdint.h... yes checking for u_int64_t in stdint.h... yes checking for exp10()... no checking for rb_arithmetic_sequence_extract()... yes checking for rb_cComplex... yes creating /home/thornhill/.rbenv/versions/truffleruby+graalvm-25.0.0/lib/gems/gems/numo-narray-0.9.2.1/ext/numo/narray/numo/extconf.h creating Makefile

current directory: /home/thornhill/.rbenv/versions/truffleruby+graalvm-25.0.0/lib/gems/gems/numo-narray-0.9.2.1/ext/numo/narray make DESTDIR= sitearchdir=./.gem.20251026-103018-kcj4dt sitelibdir=./.gem.20251026-103018-kcj4dt clean

current directory: /home/thornhill/.rbenv/versions/truffleruby+graalvm-25.0.0/lib/gems/gems/numo-narray-0.9.2.1/ext/numo/narray make DESTDIR= sitearchdir=./.gem.20251026-103018-kcj4dt sitelibdir=./.gem.20251026-103018-kcj4dt compiling narray.c narray.c: In function ‘nary_copy_flags’: narray.c:948:5: error: implicit declaration of function ‘RBASIC’ [-Wimplicit-function-declaration] 948 | RBASIC(dst)->flags |= (RBASIC(src)->flags) & | ^~~~~~ narray.c:948:16: error: invalid type argument of ‘->’ (have ‘int’) 948 | RBASIC(dst)->flags |= (RBASIC(src)->flags) & | ^~ narray.c:948:39: error: invalid type argument of ‘->’ (have ‘int’) 948 | RBASIC(dst)->flags |= (RBASIC(src)->flags) & | ^~ make: *** [Makefile:584: narray.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/thornhill/.rbenv/versions/truffleruby+graalvm-25.0.0/lib/gems/gems/numo-narray-0.9.2.1 for inspection. Results logged to /home/thornhill/.rbenv/versions/truffleruby+graalvm-25.0.0/lib/gems/extensions/x86_64-linux/3.3.7.25.0.0.1/numo-narray-0.9.2.1/gem_make.out

mrsdavis5845 avatar Oct 26 '25 22:10 mrsdavis5845