Skip to content

Site build broken with ruby 3.4 #374

Description

@cboltz

We updated the machine that hosts the jekyll pages (including yast.opensuse.org) to Leap 16.0 and Jekyll 3.4

Unfortunately yast.o.o now fails to build with compile errors in raspell:

build log
Fetching gem metadata from https://rubygems.org/.........
Installing raspell 1.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

   current directory: /home/web_jekyll/git/yast.opensuse.org/vendor/bundle/ruby/3.4.0/gems/raspell-1.3/ext
/usr/bin/ruby.ruby3.4 extconf.rb
checking for ruby.h... yes
checking for aspell.h... yes
checking for -laspell... yes
creating Makefile

current directory: /home/web_jekyll/git/yast.opensuse.org/vendor/bundle/ruby/3.4.0/gems/raspell-1.3/ext
make DESTDIR\= sitearchdir\=./.gem.20260402-108791-qaebkc sitelibdir\=./.gem.20260402-108791-qaebkc clean

current directory: /home/web_jekyll/git/yast.opensuse.org/vendor/bundle/ruby/3.4.0/gems/raspell-1.3/ext
make DESTDIR\= sitearchdir\=./.gem.20260402-108791-qaebkc sitelibdir\=./.gem.20260402-108791-qaebkc
compiling raspell.c
raspell.c: In function ‘Init_raspell’:
raspell.c:7:6: warning: old-style function definition [-Wold-style-definition]
    7 | void Init_raspell() {
      |      ^~~~~~~~~~~~
raspell.c: In function ‘get_info’:
raspell.c:15:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations]
   15 |     Data_Get_Struct(info, AspellDictInfo, result);
      |     ^~~~~~~~~~~~~~~
In file included from /usr/include/ruby-3.4.0/ruby/internal/core.h:27,
                 from /usr/include/ruby-3.4.0/ruby/ruby.h:29,
                 from /usr/include/ruby-3.4.0/ruby.h:38,
                 from raspell.h:5,
                 from raspell.c:2:
/usr/include/ruby-3.4.0/ruby/internal/core/rdata.h:325:1: note: declared here
  325 | rb_data_object_get_warning(VALUE obj)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
raspell.c: In function ‘Init_dictinfo’:
raspell.c:43:6: warning: old-style function definition [-Wold-style-definition]
   43 | void Init_dictinfo() {
      |      ^~~~~~~~~~~~~
In file included from /usr/include/ruby-3.4.0/ruby/ruby.h:27:
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:308:143: error: passing argument 3 of ‘rb_define_singleton_method_00’ from incompatible pointer type [-Wincompatible-pointer-types]
  308 | #define rb_define_singleton_method(obj, mid, func, arity)   RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))
      |                                                                                                                                               ^~~~~~
      |                                                                                                                                               |
      |                                                                                                                                               VALUE (*)(int,  VALUE *, VALUE) {aka long unsigned int (*)(int,  long unsigned int *, long unsigned int)}
raspell.c:48:5: note: in expansion of macro ‘rb_define_singleton_method’
   48 |     rb_define_singleton_method(cDictInfo, "new", dictinfo_s_new, 0);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:271:21: note: expected ‘VALUE (*)(VALUE)’ {aka ‘long unsigned int (*)(long unsigned int)’} but argument is of type ‘VALUE (*)(int,  VALUE *, VALUE)’ {aka ‘long unsigned int (*)(int,  long unsigned int *, long unsigned
int)’}
  271 | RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ruby-3.4.0/ruby/internal/anyargs.h:255:41: note: in definition of macro ‘RBIMPL_ANYARGS_DECL’
  255 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \
      |                                         ^~~
raspell.c:19:14: note: ‘dictinfo_s_new’ declared here
   19 | static VALUE dictinfo_s_new(int argc, VALUE *argv, VALUE klass) {
      |              ^~~~~~~~~~~~~~
raspell.c: In function ‘get_speller’:
raspell.c:121:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations]
  121 |     Data_Get_Struct(speller, AspellSpeller, result);
      |     ^~~~~~~~~~~~~~~
/usr/include/ruby-3.4.0/ruby/internal/core/rdata.h:325:1: note: declared here
  325 | rb_data_object_get_warning(VALUE obj)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~
raspell.c: In function ‘aspell_s_new’:
raspell.c:203:42: warning: passing argument 2 of ‘set_option’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  203 |     if (RTEST(vlang)) set_option(config, "lang", StringValuePtr(vlang));
      |                                          ^~~~~~
raspell.c:87:52: note: expected ‘char *’ but argument is of type ‘const char *’
   87 | static void set_option(AspellConfig *config, char *key, char *value) {
      |                                              ~~~~~~^~~
raspell.c:205:44: warning: passing argument 2 of ‘set_option’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  205 |     if (RTEST(vjargon)) set_option(config, "jargon", StringValuePtr(vjargon));
      |                                            ^~~~~~~~
raspell.c:87:52: note: expected ‘char *’ but argument is of type ‘const char *’
   87 | static void set_option(AspellConfig *config, char *key, char *value) {
      |                                              ~~~~~~^~~
raspell.c:207:42: warning: passing argument 2 of ‘set_option’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  207 |     if (RTEST(vsize)) set_option(config, "size", StringValuePtr(vsize));
      |                                          ^~~~~~
raspell.c:87:52: note: expected ‘char *’ but argument is of type ‘const char *’
   87 | static void set_option(AspellConfig *config, char *key, char *value) {
      |                                              ~~~~~~^~~
raspell.c:209:46: warning: passing argument 2 of ‘set_option’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  209 |     if (RTEST(vencoding)) set_option(config, "encoding", StringValuePtr(vencoding));
      |                                              ^~~~~~~~~~
raspell.c:87:52: note: expected ‘char *’ but argument is of type ‘const char *’
   87 | static void set_option(AspellConfig *config, char *key, char *value) {
      |                                              ~~~~~~^~~
raspell.c:223:5: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations]
  223 |     return Data_Wrap_Struct(klass, 0, aspell_free, speller);
      |     ^~~~~~
/usr/include/ruby-3.4.0/ruby/internal/core/rdata.h:293:1: note: declared here
  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
raspell.c: In function ‘aspell_s_new1’:
raspell.c:262:5: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations]
  262 |     return Data_Wrap_Struct(klass, 0, aspell_free, speller);
      |     ^~~~~~
/usr/include/ruby-3.4.0/ruby/internal/core/rdata.h:293:1: note: declared here
  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
raspell.c: In function ‘aspell_s_list_dicts’:
raspell.c:285:9: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations]
  285 |         rb_ary_push(result, Data_Wrap_Struct(cDictInfo, 0, 0, (AspellDictInfo *)entry));
      |         ^~~~~~~~~~~
/usr/include/ruby-3.4.0/ruby/internal/core/rdata.h:293:1: note: declared here
  293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
raspell.c: In function ‘aspell_set_suggestion_mode’:
raspell.c:317:48: warning: passing argument 2 of ‘set_option’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  317 |     set_option(aspell_speller_config(speller), "sug-mode", StringValuePtr(value));
      |                                                ^~~~~~~~~~
raspell.c:87:52: note: expected ‘char *’ but argument is of type ‘const char *’
   87 | static void set_option(AspellConfig *config, char *key, char *value) {
      |                                              ~~~~~~^~~
raspell.c: In function ‘Init_aspell’:
raspell.c:636:6: warning: old-style function definition [-Wold-style-definition]
  636 | void Init_aspell() {
      |      ^~~~~~~~~~~
raspell.c: At top level:
raspell.c:394:14: warning: ‘aspell_add_to_session’ defined but not used [-Wunused-function]
  394 | static VALUE aspell_add_to_session(VALUE self, VALUE word) {
      |              ^~~~~~~~~~~~~~~~~~~~~
raspell.c:343:14: warning: ‘aspell_main_wordlist’ defined but not used [-Wunused-function]
  343 | static VALUE aspell_main_wordlist(VALUE self) {
      |              ^~~~~~~~~~~~~~~~~~~~
raspell.c:163:14: warning: ‘get_wordregexp’ defined but not used [-Wunused-function]
  163 | static VALUE get_wordregexp(VALUE word) {
      |              ^~~~~~~~~~~~~~
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:251: raspell.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/web_jekyll/git/yast.opensuse.org/vendor/bundle/ruby/3.4.0/gems/raspell-1.3 for inspection.
Results logged to /home/web_jekyll/git/yast.opensuse.org/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux-gnu/3.4.0/raspell-1.3/gem_make.out

  /usr/lib64/ruby/3.4.0/rubygems/ext/builder.rb:126:in 'Gem::Ext::Builder.run'
  /usr/lib64/ruby/3.4.0/rubygems/ext/builder.rb:52:in 'block in Gem::Ext::Builder.make'
  /usr/lib64/ruby/3.4.0/rubygems/ext/builder.rb:44:in 'Array#each'
  /usr/lib64/ruby/3.4.0/rubygems/ext/builder.rb:44:in 'Gem::Ext::Builder.make'
  /usr/lib64/ruby/3.4.0/rubygems/ext/ext_conf_builder.rb:44:in 'Gem::Ext::ExtConfBuilder.build'
  /usr/lib64/ruby/3.4.0/rubygems/ext/builder.rb:195:in 'Gem::Ext::Builder#build_extension'
  /usr/lib64/ruby/3.4.0/rubygems/ext/builder.rb:229:in 'block in Gem::Ext::Builder#build_extensions'
  /usr/lib64/ruby/3.4.0/rubygems/ext/builder.rb:226:in 'Array#each'
  /usr/lib64/ruby/3.4.0/rubygems/ext/builder.rb:226:in 'Gem::Ext::Builder#build_extensions'
  /usr/lib64/ruby/3.4.0/rubygems/installer.rb:844:in 'Gem::Installer#build_extensions'
  /usr/lib64/ruby/3.4.0/bundler/rubygems_gem_installer.rb:111:in 'Bundler::RubyGemsGemInstaller#build_extensions'
  /usr/lib64/ruby/3.4.0/bundler/rubygems_gem_installer.rb:30:in 'Bundler::RubyGemsGemInstaller#install'
  /usr/lib64/ruby/3.4.0/bundler/source/rubygems.rb:220:in 'Bundler::Source::Rubygems#install'
  /usr/lib64/ruby/3.4.0/bundler/installer/gem_installer.rb:55:in 'Bundler::GemInstaller#install'
  /usr/lib64/ruby/3.4.0/bundler/installer/gem_installer.rb:17:in 'Bundler::GemInstaller#install_from_spec'
  /usr/lib64/ruby/3.4.0/bundler/installer/parallel_installer.rb:133:in 'Bundler::ParallelInstaller#do_install'
  /usr/lib64/ruby/3.4.0/bundler/installer/parallel_installer.rb:124:in 'block in Bundler::ParallelInstaller#worker_pool'
  /usr/lib64/ruby/3.4.0/bundler/worker.rb:62:in 'Bundler::Worker#apply_func'
  /usr/lib64/ruby/3.4.0/bundler/worker.rb:57:in 'block in Bundler::Worker#process_queue'
  <internal:kernel>:168:in 'Kernel#loop'
  /usr/lib64/ruby/3.4.0/bundler/worker.rb:54:in 'Bundler::Worker#process_queue'
  /usr/lib64/ruby/3.4.0/bundler/worker.rb:90:in 'block (2 levels) in Bundler::Worker#create_threads'

An error occurred while installing raspell (1.3), and Bundler cannot continue.

In Gemfile:
  raspell

Can you please update Gemfile and Gemfile.lock to fix the build with ruby 3.4 on Leap 16.0? The most boring solution might be to remove raspell (and maybe also rainbow) from Gemfile, and to rebuild Gemfile.lock.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions