Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1223249

Bug#1089544: Error in auto_compact: arg issue

From Aditi Mishra <aditi@linux.ibm.com>
Newsgroups linux.debian.bugs.dist
Subject Bug#1089544: Error in auto_compact: arg issue
Date 2024-12-08 18:50 +0100
Message-ID <JRtzQ-eSQw-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Source: ruby-msgpack

Version:1.7.2-1

Severity: serious

Justification: ftbfs patch


Hi,

Getting following error:

<internal:gc>:59:in `auto_compact=': Automatic compaction isn't 
available on this platform (NotImplementedError)
         from /<<PKGBUILDDIR>>/spec/spec_helper.rb:33:in `<top (required)>'
         from 
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:86:in 
`require'
         from 
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:86:in 
`require'
         from /<<PKGBUILDDIR>>/spec/cases_spec.rb:1:in `<top (required)>'
         from 
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:86:in 
`require'
         from 
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:86:in 
`require'
         from -e:1:in `block in <main>'
         from -e:1:in `each'
         from -e:1:in `<main>'
ERROR: Test "ruby3.1" failed. Exiting, having arguement issue
dh_auto_install: error: dh_ruby --install 
/<<PKGBUILDDIR>>/debian/ruby-msgpack returned exit code 1
make: *** [debian/rules:7: binary] Error 25
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess 
returned exit status 2

Here is my fix patch :

diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index ff2fad3..c67eadf 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -19,18 +19,20 @@ require 'rspec'
  require 'msgpack'
  require "msgpack/bigint"

-
  if GC.respond_to?(:verify_compaction_references)
    # This method was added in Ruby 3.0.0. Calling it this way asks the 
GC to
    # move objects around, helping to find object movement bugs.
    begin
      GC.verify_compaction_references(double_heap: true, toward: :empty)
-  rescue NotImplementedError
+  rescue NotImplementedError, ArgumentError
    end
  end

  if GC.respond_to?(:auto_compact=)
+  begin
      GC.auto_compact = true
+  rescue NotImplementedError, ArgumentError
+  end
  end



Thanks and regards,

Aditi

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#1089544: Error in auto_compact: arg issue Aditi Mishra <aditi@linux.ibm.com> - 2024-12-08 18:50 +0100

csiph-web