Dne 29. 01. 19 v 12:29 Mamoru TASAKA napsal(a):
> Zdenek Dohnal wrote on 2019/01/29 18:07:
>> Hi,
>>
>> I'm just adding my 'cent' to ruby 2.6 mass rebuild - Vim started to
>> fail after ruby-2.6 was introduced to rawhide, but it fails only on
>> i686 and armv7hl:
>>
>> i686:
>> task: https://koji.fedoraproject.org/koji/taskinfo?taskID=32309685
>> log:
>> https://kojipkgs.fedoraproject.org//work/tasks/9685/32309685/build.log
>>
>> armv7hl:
>> task: https://koji.fedoraproject.org/koji/taskinfo?taskID=32309687
>> log:
>> https://kojipkgs.fedoraproject.org//work/tasks/9687/32309687/build.log
>>
>> The error looks like mistake in C programming, but I already tried to
>> build current Vim with old ruby in copr and the build passes, but it
>> fails with new ruby. Did anyone encounter such errors with new ruby?
>
> Actually this is due to API change on rb_int2big in ruby 2.6:
>
> https://github.com/ruby/ruby/commit/d77e8a7da596fc23acd76c785548f6314114f97a
>
> https://bugs.ruby-lang.org/issues/14036
Right. Please see the attached patch for naive fix of this issue (it
builds on i686 with the patch, that is all I tested). However, there
should be probably some Ruby version checks, because I suspect the patch
won't work on Ruby 2.5 and older.
I'll probably open Ruby upstream ticket pointing out the issue. But not
sure what anwer to expect ¯\_(ツ)_/¯
Vít
>
> So I guess this affects mainly 32 bit platforms.
>
> Regards,
> Mamoru
> _______________________________________________
> ruby-sig mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/[email protected]
diff --git a/fix-ruby26.patch b/fix-ruby26.patch
new file mode 100644
index 0000000..9fd8353
--- /dev/null
+++ b/fix-ruby26.patch
@@ -0,0 +1,22 @@
+diff --git a/src/if_ruby.c b/src/if_ruby.c
+index 9c91f3177..9f4ce0b06 100644
+--- a/src/if_ruby.c
++++ b/src/if_ruby.c
+@@ -476,7 +476,7 @@ static void (*dll_ruby_init_stack)(VALUE*);
+ # endif
+ # endif
+ # ifdef RUBY19_OR_LATER
+-static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
++static VALUE (*dll_rb_int2big)(intptr_t);
+ # endif
+
+ # ifdef RUBY19_OR_LATER
+@@ -506,7 +506,7 @@ SIGNED_VALUE rb_num2long_stub(VALUE x)
+ {
+ return dll_rb_num2long(x);
+ }
+-VALUE rb_int2big_stub(SIGNED_VALUE x)
++VALUE rb_int2big_stub(intptr_t x)
+ {
+ return dll_rb_int2big(x);
+ }
diff --git a/vim.spec b/vim.spec
index 0266067..fac611b 100644
--- a/vim.spec
+++ b/vim.spec
@@ -68,6 +68,8 @@ Patch3016: vim-8.0-copy-paste.patch
# migrate shebangs in script to /usr/bin/python3 and use python2 when necessary
Patch3017: vim-python3-tests.patch
+Patch4000: fix-ruby26.patch
+
# gcc is no longer in buildroot by default
BuildRequires: gcc
@@ -256,6 +258,8 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
%patch3016 -p1
%patch3017 -p1
+%patch4000 -p1
+
%build
%if 0%{?rhel} > 7
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
_______________________________________________
ruby-sig mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/[email protected]