Sunday, January 03, 2021

Re: New: Ruby 3.0.0

On 01/03 05:26, Jeremie Courreges-Anglas wrote:
> On Fri, Dec 25 2020, Jeremy Evans <jeremy@openbsd.org> wrote:
> > Here's a port for the recently released Ruby 3.0.0.
> >
> > Release notes at:
> > http://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/
> >
> > Tested on amd64. OKs to import?
>
> sparc64 strikes again!
> ruby now tries to use __thread, which fails with our base-gcc:
>
> --8<--
> In file included from vm_core.h:85,
> from eval_intern.h:5,
> from vm_trace.c:24:
> thread_pthread.h: At top level:
> thread_pthread.h:108: error: thread-local storage not supported for this target
> In file included from ./include/ruby/internal/arithmetic/char.h:23,
> from ./include/ruby/internal/arithmetic.h:23,
> from ./include/ruby/ruby.h:25,
> from gc.h:3,
> from vm_dump.c:32:
> ./include/ruby/internal/arithmetic/int.h: In function 'rb_int2num_inline':
> ./include/ruby/internal/arithmetic/int.h:146: warning: comparison is always true due to limited range of data type
> ./include/ruby/internal/arithmetic/int.h:146: warning: comparison is always true due to limited range of data type
> ./include/ruby/internal/arithmetic/int.h: In function 'rb_uint2num_inline':
> ./include/ruby/internal/arithmetic/int.h:155: warning: comparison is always true due to limited range of data type
> In file included from vm_core.h:85,
> from vm_sync.c:1:
> thread_pthread.h: At top level:
> thread_pthread.h:108: error: thread-local storage not supported for this target
> In file included from vm_core.h:85,
> from iseq.h:14,
> from vm_dump.c:36:
> thread_pthread.h: At top level:
> thread_pthread.h:108: error: thread-local storage not supported for this target
> *** Error 1 in /usr/ports/pobj/ruby-3.0.0/ruby-3.0.0 (Makefile:425 'vm_dump.o')
> *** Error 1 (Makefile:425 'vm_sync.o')
> *** Error 1 (Makefile:425 'vm_trace.o')
> *** Error 1 in target 'vm_trace.o'
> *** Error 1 in target 'vm_sync.o'
> *** Error 1 in target 'vm_dump.o'
> *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2925 '/usr/ports/pobj/ruby-3.0.0/.build_done': @cd /usr/ports/pobj/ruby-3.0.0/rub...)
> *** Error 2 in /usr/ports/lang/ruby/3.0 (/usr/ports/infrastructure/mk/bsd.port.mk:2584 'all': @lock=ruby-3.0.0; export _LOCKS_HELD=" ruby-3...)
> billy /usr/ports/lang/ruby/3.0$
> -->8--
>
> The attached tarball contains a patch to use the no-__thread fallback,
> so that we can keep using base-gcc. With this, ruby30 packages on
> sparc64. ports-gcc supports __thread emulation (like base-clang), but
> then I'm not sure which compiler MJIT should use.
>
> The diff between configure log of 2.7 and 3.0 seems sane, except maybe
> for
>
> -checking whether -D_FORTIFY_SOURCE=2 is accepted as CFLAGS... yes
> +checking whether -O3 -D_FORTIFY_SOURCE=2 is accepted as CFLAGS... yes
>
> Maybe not a new problem, configure log for 2.7 already shows
>
> * optflags: -O3
>
> I would suggest importing this and fixing problems as they come, but
> I'm far from a ruby expert.

jca,

I imported ruby 3.0 already, can you send a diff?

Thanks,
Jeremy

No comments:

Post a Comment