patchWeeChat - Patches: patch #8209, Fix compilation for Ruby >= 2.0


patch #8209: Fix compilation for Ruby >= 2.0

Submitted by:  None
Submitted on:  Fri 11 Oct 2013 08:56:02 PM UTC  
Category:  compilation Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Sebastien Helleu <flashcode> Originator Email:  -email is unavailable-
Open/Closed:  Closed IRC nick:  tmatth

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 05 Feb 2014 04:31:24 PM UTC, comment #4: 

Thank you for the patches, they are now committed, with some changes.
Both cmake and autotools should detect and use Ruby 2.0 without any problem.

Since the version is currently release candidate 2 (release planned for Sunday Feb 9th), feedback is welcome!

Sebastien Helleu <flashcode>
Project AdministratorIn charge of this item.
Tue 15 Oct 2013 08:59:02 PM UTC, comment #3: 

Andrew's patch works for Ruby 2 and 1.9. If his patch is applied, the patch I'm now attaching could be used to remove the RUBY_VERSION define code from, since it would no longer be needed.

(file #29383)

Tristan Matthews <tmatth>
Sun 13 Oct 2013 11:08:26 PM UTC, comment #2: 

I'm attaching an alternative patch that just changes the #if tests from RUBY_VERSION to use RUBY_API_VERSION_MAJOR and RUBY_API_VERSION_MINOR. From some Google results I think these symbols are defined in 1.9, but I've only tested against Ruby 2.

It would probably be nicer to do this in CMake and define a single variable.

(file #29370)

Andrew Potter <talisein>
Sat 12 Oct 2013 06:51:49 AM UTC, comment #1: 


Thanks for the patch.
If I understand your patch (especially the error displayed), it means that WeeChat would not work at all with Ruby 2.0 ? But it's supposed to work fine: I tested Ruby 2.0 some months ago, but I compiled with cmake, which is the recommended way to compile WeeChat (anyway "configure" must be fixed if there is a problem).
So I'm not sure this is the good fix, maybe should be fixed to work fine with Ruby 2.0, no?

Sebastien Helleu <flashcode>
Project AdministratorIn charge of this item.
Fri 11 Oct 2013 08:56:02 PM UTC, original submission:  

The attached patch fixes to avoid building the Ruby plugins if Ruby's version number could not be detected. Presently if weechat's configure script is run on a system with Ruby 2.0.0, configure will detect ruby headers and enable ruby plugins, but compilation will fail since RUBY_VERSION is undefined.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #29370:  0001-ruby-Fix-compilation-with-ruby-2.patch added by talisein (1KiB - text/x-patch - Alternative patch to use RUBY_API_VERSION_MAJOR and MINOR)
file #29359:  0001-configure-don-t-build-Ruby-plugins-if-version-was-no.patch added by None (1KiB - text/x-patch - nicer patch, prepared with git format-patch)
file #29358:  configure_ruby.patch added by None (1KiB - text/x-patch - Fixes compilation if Ruby version could not be detected)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by tmatth (Updated the item)
  • -email is unavailable- added by talisein (Updated the item)
  • -email is unavailable- added by flashcode (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-09 flashcode Open/ClosedOpen => Closed
    2014-02-05 flashcode StatusNeed Info => Done
    2013-10-15 tmatth Attached File- => Added 0001-configure-remove-unused-DRUBY_VERSION.patch, #29383
    2013-10-13 talisein Attached File- => Added 0001-ruby-Fix-compilation-with-ruby-2.patch, #29370
    2013-10-12 flashcode StatusNone => Need Info
        Assigned toNone => flashcode
    2013-10-11 None Attached File- => Added 0001-configure-don-t-build-Ruby-plugins-if-version-was-no.patch, #29359
    2013-10-11 None Attached File- => Added configure_ruby.patch, #29358

    Back to the top

    Powered by Savane 3.7