On Fri, Dec 26, 2025 at 11:33:13PM -0800, Jeremy Evans wrote:
> This adds Ruby 4.0, released yesterday. Release announcement at
> https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/
>
> I'd like to commit this with updates to ruby.port.mk to support the
> ruby40 FLAVOR for Ruby ports.
>
> Tested on amd64 since preview1. New port attached as .tar.gz,
> ruby.port.mk change inline. I'll update ruby-module.5 appropriately
> after commit.
>
> OK to commit?
arm64 builds, packages and passes regress. Build is broken on sparc64.
ok tb
with "BROKEN-sparc64 = miniruby SIGBUS during build" or similar.
Here's the tail of the build log and a backtrace. Looks like an
unaligned access in ibf_load_object_complex_rational(). I won't
have time to dig deeper before end of next week.
make -f exts.mk -j 4 V=1 mkdir_p=mkdir\ -p\ --
SHARED_LIBS_LOG=/usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/shared_libs.log
LIBTOOL=/usr/bin/libtool libruby40_ltversion=0.0
LIBruby40_LTVERSION=-version-info\ 0:0:0 RUBY="./miniruby -I./lib -I.
-I.ext/common " top_srcdir="." note
make -f enc.mk V="1" UNICODE_HDR_DIR="./enc/unicode/17.0.0" RUBY=" ./miniruby
-I./lib -I. -I.ext/common " MINIRUBY=" ./miniruby -I./lib -I. -I.ext/common "
-j 4 V=1 mkdir_p=mkdir\ -p\ --
SHARED_LIBS_LOG=/usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/shared_libs.log
LIBTOOL=/usr/bin/libtool libruby40_ltversion=0.0
LIBruby40_LTVERSION=-version-info\ 0:0:0 encs
Generating RDoc documentation
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext --
--disable-gems "./tool/rdoc-srcdir" --ri --op ".ext/rdoc" --no-force-update .
<internal:nilclass>: [BUG] Bus Error at 0x000000f3c9bb5570
ruby 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [sparc64-openbsd]
-- Control frame information -----------------------------------------------
c:0004 p:---- s:0012 e:000011 l:y b:---- DUMMY [FINISH]
c:0003 p:---- s:0009 e:000008 l:y b:---- DUMMY [FINISH]
c:0002 p:---- s:0006 e:000005 l:y b:---- DUMMY [FINISH]
c:0001 p:0000 s:0003 E:000d00 l:y b:---- DUMMY [FINISH]
-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 1
-- Other runtime information -----------------------------------------------
* Loaded script: /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/ruby40
* Ruby Box: disabled
* Loaded features:
0 enumerator.so
1 thread.rb
2 fiber.so
3 rational.so
4 complex.so
5 pathname.so
6 ruby2_keywords.rb
7 set.rb
8 /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/.ext/sparc64-openbsd/enc/encdb.so
9
/usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/.ext/sparc64-openbsd/enc/trans/transdb.so
Bus error (core dumped)
*** Error 138 in /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0 (Makefile:1378 'rdoc')
*** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:3067
'/usr/ports/pobj/ruby-4.0.0/.build_done': @cd /usr/ports/pobj/ruby-4.0.0/rub...)
*** Error 2 in /usr/ports/lang/ruby/4.0
(/usr/ports/infrastructure/mk/bsd.port.mk:2710 'all': @lock=ruby-4.0.0; export
_LOCKS_HELD=" ruby-4...)
(gdb) bt
#0 0x000000f3c9c3443c in rb_bug_for_fatal_signal ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#1 0x000000f3c9d97730 in sigbus () from
/usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#2 <signal handler called>
#3 0x000000f3c9bb5570 in ibf_load_object_complex_rational ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#4 0x000000f3c9bb5398 in ibf_load_object.part ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#5 0x000000f3c9bd7e50 in rb_ibf_load_iseq_complete ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#6 0x000000f3c9bd8b9c in ibf_load_iseq ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#7 0x000000f3c9bd7eb0 in rb_ibf_load_iseq_complete ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#8 0x000000f3c9bd8b9c in ibf_load_iseq ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#9 0x000000f3c9bd7eb0 in rb_ibf_load_iseq_complete ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#10 0x000000f3c9bd8b9c in ibf_load_iseq ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#11 0x000000f3c9bd8cfc in rb_iseq_ibf_load_bytes ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#12 0x000000f3c9ef6dfc in load_with_builtin_functions ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#13 0x000000f3c9c7869c in rb_call_builtin_inits ()
from /usr/ports/pobj/ruby-4.0.0/ruby-4.0.0/libruby40.so.0.0
#14 0x000000f3c9d863f8 in ruby_opt_init.part ()