Bug 2417699 - openwsman-2.8.1-11.fc44 will FTBFS with upcoming ruby4.0
Summary: openwsman-2.8.1-11.fc44 will FTBFS with upcoming ruby4.0
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: openwsman
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2418384
TreeView+ depends on / blocked
 
Reported: 2025-11-28 13:45 UTC by Mamoru TASAKA
Modified: 2026-01-08 08:51 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
vcrhonek: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-2901 0 None None None 2026-01-07 10:07:18 UTC

Description Mamoru TASAKA 2025-11-28 13:45:37 UTC
Now we as ruby-sig is preparing for upcoming ruby4.0 release 
(which is going to be released on 2025-Dec-25)

https://fedoraproject.org/wiki/Changes/Ruby_4.0

and rebuilding openwsman-2.8.1-11.fc44 with current ruby4.0.0dev snapshot
(currently tried with
  ruby 4.0.0dev (2025-11-28 master 404e6aa9b5) +PRISM [x86_64-linux] )
gets FTBFS like:

```
[ 71%] Generating html
cd /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby && /usr/bin/cmake -E echo_append Creating\ rdoc\ documentation\ ...
Creating rdoc documentation ...cd /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby && rm -rf /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/build/bindings/ruby/html
cd /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby && ./rdoc 4.0 -o /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/build/bindings/ruby/html -t Openwsman\ -\ WS-Management\ for\ all -m README.rdoc README.rdoc ../openwsman.i ../*.i openwsman/*.rb
Parsing sources...
  7% [ 1/13]  ../openwsman.i
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /usr/bin/ruby -c ../openwsman.i

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

	(ArgumentError) wrong number of arguments (given 0, expected 1)

uh-oh! RDoc had a problem:
wrong number of arguments (given 0, expected 1)

run with --debug for full backtrace
make[2]: *** [bindings/ruby/CMakeFiles/ruby_rdoc.dir/build.make:79: bindings/ruby/html] Error 1
make[2]: Leaving directory '/builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/build'
make[1]: *** [CMakeFiles/Makefile2:2562: bindings/ruby/CMakeFiles/ruby_rdoc.dir/all] Error 2
make[1]: Leaving directory '/builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/build'
make: *** [Makefile:169: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.CrPuEg (%build)
```

Reproducible: Always

Actual Results:
In detail:

[mockbuild@21c16368fe0b49ceb467beb154a5ac3f ruby]$  ./rdoc 4.0 -o /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/build/bindings/ruby/html -t Openwsman\ -\ WS-Management\ for\ all -m README.rdoc README.rdoc ../openwsman.i ../*.i openwsman/*.rb --debug
Parsing sources...
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /usr/bin/ruby -c ../openwsman.i

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

        (ArgumentError) wrong number of arguments (given 0, expected 1)

/usr/share/gems/gems/rdoc-6.16.0/lib/rdoc/token_stream.rb:93:in 'RDoc::TokenStream#collect_tokens'
        /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby/rdoc_parser_swig.rb:380:in 'RDoc::Parser::SWIG#find_body'
        /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby/rdoc_parser_swig.rb:762:in 'RDoc::Parser::SWIG#handle_method'
        /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby/rdoc_parser_swig.rb:271:in 'block in RDoc::Parser::SWIG#do_methods'
        /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby/rdoc_parser_swig.rb:269:in 'String#scan'
        /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby/rdoc_parser_swig.rb:269:in 'RDoc::Parser::SWIG#do_methods'
        /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby/rdoc_parser_swig.rb:935:in 'RDoc::Parser::SWIG#scan'
        /usr/share/gems/gems/rdoc-6.16.0/lib/rdoc/rdoc.rb:354:in 'RDoc::RDoc#parse_file'
        /usr/share/gems/gems/rdoc-6.16.0/lib/rdoc/rdoc.rb:406:in 'block in RDoc::RDoc#parse_files'
        /usr/share/gems/gems/rdoc-6.16.0/lib/rdoc/rdoc.rb:404:in 'Array#map'
        /usr/share/gems/gems/rdoc-6.16.0/lib/rdoc/rdoc.rb:404:in 'RDoc::RDoc#parse_files'
        /usr/share/gems/gems/rdoc-6.16.0/lib/rdoc/rdoc.rb:467:in 'RDoc::RDoc#document'
        /usr/share/gems/gems/rdoc-6.16.0/exe/rdoc:20:in '<top (required)>'
        /usr/share/rubygems/rubygems.rb:303:in 'Kernel#load'
        /usr/share/rubygems/rubygems.rb:303:in 'Gem.activate_and_load_bin_path'
        /builddir/build/BUILD/openwsman-2.8.1-build/openwsman-2.8.1/bindings/ruby/rdoc4_0.rb:25:in '<top (required)>'
        ./rdoc:52:in 'Kernel#require'
        ./rdoc:52:in '<main>'
wrong number of arguments (given 0, expected 1)



Additional Information:
This is most likely due to rdoc side change (rdoc is upgraded to 6.16.0),
especially most likely due to the following change:

https://github.com/ruby/rdoc/commit/f2d18923991c0f4d49213cedd377541b43d0279d

Something like below change is needed for openwsman

--------------------------------------------------
$ diff -up openwsman-2.8.1/bindings/ruby/rdoc_parser_swig.rb{.ruby40,}
--- openwsman-2.8.1/bindings/ruby/rdoc_parser_swig.rb.ruby40	2025-11-28 15:29:50.594403118 +0900
+++ openwsman-2.8.1/bindings/ruby/rdoc_parser_swig.rb	2025-11-28 22:43:01.121336310 +0900
@@ -377,7 +377,11 @@ class RDoc::Parser::SWIG < RDoc::Parser
       find_modifiers comment, meth_obj if comment
 
       #meth_obj.params = params
-      meth_obj.start_collecting_tokens
+      if meth_obj.method(:start_collecting_tokens).arity == 1
+        meth_obj.start_collecting_tokens :ruby
+      else
+        meth_obj.start_collecting_tokens
+      end
       begin
         RDoc::const_get "RubyToken"
         tk = RDoc::RubyToken::Token.new nil, 1, 1
--------------------------------------------------

Comment 2 Mamoru TASAKA 2026-01-03 01:00:18 UTC
PR: https://src.fedoraproject.org/rpms/openwsman/pull-request/8

I am going to merge the above before ruby4.0 mass rebuild starts.

Comment 3 Mamoru TASAKA 2026-01-08 08:51:16 UTC
(Now we started ruby4.0 mass rebuild)


Note You need to log in before you can comment on or make changes to this bug.