[ 
https://issues.apache.org/jira/browse/PROTON-1738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319072#comment-16319072
 ] 

Alan Conway commented on PROTON-1738:
-------------------------------------

Attached patch partially fixes the 2.0.0 issues, but there are still 
problems.It has not been fully tested. I'm leaving on vacation so can't finish 
this now, will finish on return unless somebody else wants to.

> [ruby-binding] incompatible with ruby 2.0.0
> -------------------------------------------
>
>                 Key: PROTON-1738
>                 URL: https://issues.apache.org/jira/browse/PROTON-1738
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: ruby-binding
>    Affects Versions: proton-c-0.19.0
>         Environment: 4dfe296920c9345dfbe8c9c535cbeb27055c01c2 
> (upstream/master)
> Author: Alan Conway <acon...@redhat.com>
> Date:   Thu Jan 4 12:47:25 2018 -0500
>     PROTON-1706: fix compiler warnings in windows c examples
>            Reporter: Jiri Daněk
>            Assignee: Alan Conway
>             Fix For: proton-c-0.20.0
>
>         Attachments: 0001-WIP-Fix-for-issues-on-ruby-2.0.0.patch
>
>
> {noformat}
> $ ctest -VV -R ruby-example-test
> UpdateCTestConfiguration  from 
> :/home/jdanek/Work/repos/qpid-proton/build/DartConfiguration.tcl
> Parse Config 
> file:/home/jdanek/Work/repos/qpid-proton/build/DartConfiguration.tcl
> UpdateCTestConfiguration  from 
> :/home/jdanek/Work/repos/qpid-proton/build/DartConfiguration.tcl
> Parse Config 
> file:/home/jdanek/Work/repos/qpid-proton/build/DartConfiguration.tcl
> Test project /home/jdanek/Work/repos/qpid-proton/build
> Constructing a list of tests
> Done constructing a list of tests
> Updating test list for fixtures
> Added 0 tests to meet fixture requirements
> Checking test dependency graph...
> Checking test dependency graph end
> test 13
>     Start 13: ruby-example-test
> 13: Test command: 
> /nix/store/hr461qqci171p6k53wwz52ifyp2h9g9l-python-2.7.14/bin/python 
> "/home/jdanek/Work/repos/qpid-proton/proton-c/env.py" "--" 
> "PATH=/nix/store/pgwzcwz3v13dm193iys78xajrxf7m9yq-include-what-you-use-0.8/bin:/nix/store/x9p1z5z22z59x88h7ap09s0f79w50nj0-krb5-1.15.2-dev/bin:/nix/store/0gpszn41jk1fdw98q1jdm7n4z271m303-krb5-1.15.2/bin:/nix/store/xmbal41hbh2z82jz7pgjgxkba9malcvf-gss-1.0.3/bin:/nix/store/qs68njxs4awvjaqf2yw89x8bnb2jwl2a-pkg-config-0.29.2/bin:/nix/store/bd1qnp2y4mni2jsr7yqfy45q5wj9q4wz-util-linux-2.31-bin/bin:/nix/store/s03sh263lrxnz8dp9d81is9xwrs67ay9-openssl-1.0.2n-bin/bin:/nix/store/0frzwaf62yrbs0ni6043sllk8ac7db1l-cmake-3.9.6/bin:/nix/store/q03ccdnb7i7za2q66gx8b3mii293i6cg-ninja-1.8.2/bin:/nix/store/2sb5s8wj4s6awvfd4rn82297g2fhr18d-gcc-wrapper-7.2.0/bin:/nix/store/gkasrgaqw2riqc8ck8hh3a9k06cqaqrd-gcc-7.2.0/bin:/nix/store/b25rk6qm6p3af1r1g25lzr16r31336r1-glibc-2.26-75-bin/bin:/nix/store/hw5a3mifkrzd8y0pxs7nzzr4yscg08mw-coreutils-8.28/bin:/nix/store/m5s6hd02nlfywi9n3yrgrx3fa8kgp9jd-binutils-wrapper-2.28.1/bin:/nix/store/kcdiibhpjrbpash3r1bvj2ncv4rwr3sm-binutils-2.28.1/bin:/nix/store/b25rk6qm6p3af1r1g25lzr16r31336r1-glibc-2.26-75-bin/bin:/nix/store/hw5a3mifkrzd8y0pxs7nzzr4yscg08mw-coreutils-8.28/bin:/nix/store/h5m0g1agfcyc2d5lql0n8z6fls261rnn-go-1.9.2/bin:/nix/store/ksl9j54260jc99qphf9gr6gg5vdn8dp0-ruby-2.0.0-p648/bin:/nix/store/10lvqls7vl68blvvv42g36bh5rjbwkmk-gdb-8.0.1/bin:/nix/store/11wq1ncfb8za0mnnficcizd53p1md2y7-swig-3.0.12/bin:/nix/store/hr461qqci171p6k53wwz52ifyp2h9g9l-python-2.7.14/bin:/nix/store/waf0wx7drw74pkig43ickd8bn540wbz6-cyrus-sasl-2.1.26-bin/bin:/nix/store/n7l459d0f28lmdirr1wlzkdi7151jhqk-patchelf-0.9/bin:/nix/store/q7p8jaiymb1k4n44l31xdm753j79h7l5-paxctl-0.9/bin:/nix/store/4cqv0dm94h2sm0xpcqi6h8z6bnxqqlna-gcc-wrapper-6.4.0/bin:/nix/store/d88s1v28v11j2jxshqdvqms6h0pvp8aw-gcc-6.4.0/bin:/nix/store/b25rk6qm6p3af1r1g25lzr16r31336r1-glibc-2.26-75-bin/bin:/nix/store/hw5a3mifkrzd8y0pxs7nzzr4yscg08mw-coreutils-8.28/bin:/nix/store/hw5a3mifkrzd8y0pxs7nzzr4yscg08mw-coreutils-8.28/bin:/nix/store/n2p15qg4lxgq0xkfrgqqfgpwkmd3295d-findutils-4.6.0/bin:/nix/store/ajiwrzg6nz9xpifr91wp14cy8al7s4df-diffutils-3.6/bin:/nix/store/n5rsq2cxj7lp4gynkvqrp0xkf78f1ni6-gnused-4.4/bin:/nix/store/nwpv4sxayci7jkjq7fid8hwz6ig5xjzi-gnugrep-3.1/bin:/nix/store/w1cddj0qc3ximvpwrn28rig7wq99ajd7-gawk-4.2.0/bin:/nix/store/7iw6c6nx7spzsp92pqq5qnd7d8jvbdl8-gnutar-1.30/bin:/nix/store/qk11lqm8fz9hpk1682gyf3x51wwasj3z-gzip-1.8/bin:/nix/store/mi9vmy5nwc4ma33jz6ihrdhh1r6izzv6-bzip2-1.0.6.0.1-bin/bin:/nix/store/92cdms75qnqh3hf39wbxra60bxdah9mq-gnumake-4.2.1/bin:/nix/store/65l6hr8snf4v823f974k97jc65i7bhvf-bash-4.4-p12/bin:/nix/store/irwrb341fpqd2lj22j13ffsxcjhayv1m-patch-2.7.5/bin:/nix/store/8fy4c90a0cj1mw2xibvv5k6b0rxx6b09-xz-5.2.3-bin/bin:/home/jdanek/bin:/run/wrappers/bin:/etc/per-user-pkgs/jdanek/bin:/home/jdanek/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/jdanek/Work/repos/qpid-proton/build/proton-c/bindings/ruby:/home/jdanek/Work/repos/qpid-proton/build/proton-c"
>  
> "RUBYLIB=:/home/jdanek/Work/repos/qpid-proton/proton-c/bindings/ruby/lib:/home/jdanek/Work/repos/qpid-proton/proton-c/bindings/ruby/tests:/home/jdanek/Work/repos/qpid-proton/proton-c/bindings/ruby/spec:/home/jdanek/Work/repos/qpid-proton/build/proton-c/bindings/ruby:/home/jdanek/Work/repos/qpid-proton/build/proton-c"
>  
> "SASLPASSWD=/nix/store/waf0wx7drw74pkig43ickd8bn540wbz6-cyrus-sasl-2.1.26-bin/bin/saslpasswd2"
>  "/nix/store/ksl9j54260jc99qphf9gr6gg5vdn8dp0-ruby-2.0.0-p648/bin/ruby" 
> "example_test.rb" "-v"
> 13: Test timeout computed to be: 1500
> 13: 
> /home/jdanek/Work/repos/qpid-proton/proton-c/bindings/ruby/lib/core/container.rb:128:in
>  `initialize': undefined method `<<' for 
> #<ConditionVariable:0x00000000e162e8> (NoMethodError)
> 13:     from broker.rb:165:in `new'
> 13:     from broker.rb:165:in `<main>'
> 13: example_test.rb:97:in `readline': end of file reached (EOFError)
> 13:     from example_test.rb:97:in `<main>'
> 1/1 Test #13: ruby-example-test ................***Failed    0.23 sec
> 0% tests passed, 1 tests failed out of 1
> Total Test time (real) =   0.24 sec
> The following tests FAILED:
>          13 - ruby-example-test (Failed)
> Errors while running CTest
> {noformat}
> The problematic line of code reads {{@work << :start << self   # Issue start 
> and start start selecting}}
> I believe the cause is that in ruby 2.0.0, the Queue behaves differently than 
> in more recent versions.
> {noformat}
> $ ruby --version
> ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
> $ irb
> irb(main):001:0> q = Queue::new
> => #<Queue:0x00000000c3c148 @que=[], @num_waiting=0, 
> @mutex=#<Mutex:0x00000000c3c0f8>, @cond=#<ConditionVariable:0x00000000c3c0a8 
> @waiters={}, @waiters_mutex=#<Mutex:0x00000000c3c058>>>
> irb(main):002:0> q << :somevalue
> => #<ConditionVariable:0x00000000c3c0a8 @waiters={}, 
> @waiters_mutex=#<Mutex:0x00000000c3c058>>
> {noformat}
> Compare that to
> {noformat}
> $ ruby --version
> ruby 2.4.2p198 (2017-09-14) [x86_64-linux]
> $ irb
> irb(main):001:0> q = Queue::new
> => #<Thread::Queue:0x00000000024360f0>
> irb(main):002:0> q << :somevalue
> => #<Thread::Queue:0x00000000024360f0>
> irb(main):003:0> 
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to