Yeah I can see that there is an issue here.  No doubt it is something that
2.1 support pulled in that we probably are doing differently in DL.  So
that is definitely a bug and an issue on DL not working makes sense.  I can
confirm that Fiddle::Pointer does not exist.  In fact, looking at 1.9
version of dl/struct I can see:

class CStructEntity < CPtr

So we probably need to audit 2.1 DL code and see what else has changed.

Your original message was how you could not run gem list which I find
mysterious since I can run it.    This still makes me think there must be
some env difference.

-Tom



On Thu, Dec 5, 2013 at 10:15 AM, Christian MICHON <
christian.mic...@gmail.com> wrote:

> Hi Tom.
>
> Well, my environment is as naked as possible (jdk 1.7.0_45-b18 64 bits, no
> GEM_PATH set, etc... but I do have an IRBRC)
>
> Could you please try this in your env?
>
> jruby -S jirb
> >> require 'dl'
> => true
> >> require 'fiddle'
> => true
> >> DL.fiddle?
> => true
> >> Fiddle::Pointer
> NameError: uninitialized constant Fiddle::Pointer
>         from org/jruby/RubyModule.java:2630:in `const_missing'
>         from (irb):3:in `evaluate'
>         from org/jruby/RubyKernel.java:898:in `eval'
>         from org/jruby/RubyKernel.java:1217:in `loop'
>         from org/jruby/RubyKernel.java:1028:in `catch'
>         from org/jruby/RubyKernel.java:1028:in `catch'
>         from
> file:/C:/dev/j9k/jruby-complete-9000.dev.jar!/META-INF/jruby.home/bin/jirb:13:in
> `(root)'
>         from org/jruby/RubyKernel.java:879:in `load'
>         from
> file:/C:/dev/j9k/jruby-complete-9000.dev.jar!/jruby/commands.rb:1:in
> `(root)'
>         from jirb:1:in `(root)'
>
> You should get the NameError: if you do not, I'm interested in knowing the
> value and how you get through this.
>
> As I stated: if you read the code fiddle.rb and dl/struct.rb, it's
> expected to have an undefined Fiddle::Pointer and dl/struct.rb will not
> behave properly...
>
>
>
> On Thu, Dec 5, 2013 at 4:36 PM, Thomas E Enebo <tom.en...@gmail.com>wrote:
>
>> We are now tracking issues on github.  The Jira ones are still there but
>> mostly for posterity.  Open new ones on github.
>>
>> I am not seeing this error:
>>
>> java -jar ~/Downloads/jruby-complete-9000.dev.jar -S jgem list
>>
>> I get am empty GEM list but no error.  A dev build also shows no issue.
>> Either my env is working from an env setting or yours is not working from
>> an env setting.  Tautology :)
>>
>> -Tom
>>
>>
>>
>> On Thu, Dec 5, 2013 at 9:08 AM, Christian MICHON <
>> christian.mic...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I've downloaded
>>> http://ci.jruby.org/snapshots/master/jruby-complete-9000.dev.jar and
>>> I'm trying to test out current state of dev of jruby 9k on Windows 7
>>>
>>> "jruby -v" works out of the box:
>>> jruby 9000.dev (2.1.0.dev) 2013-12-04 e68098b on Java HotSpot(TM) 64-Bit
>>> Server VM 1.7.0_45-b18 [Windows 7-amd64]
>>>
>>> "jruby -S jgem" works also, but "jruby -S jgem list" does not:
>>> ERROR:  Loading command: list (NameError)
>>>         uninitialized constant Fiddle::Pointer
>>> ERROR:  While executing gem ... (NoMethodError)
>>>     undefined method `invoke_with_build_args' for nil:NilClass
>>>
>>> I've been digging into the jar file, and found the 2 references to
>>> Fiddle::Pointer:
>>>
>>> - META-INF/jruby.home/lib/ruby/shared/fiddle.rb where clearly no value
>>> is defined for Fiddle::Pointer as RUBY_ENGINE == 'jruby'
>>>   Pointer = DL::CPtr unless RUBY_ENGINE == 'jruby'
>>>
>>> - META-INF/jruby.home/lib/ruby/2.1/dl/struct.rb where I can see
>>> Fiddle::Pointer used as DF.fiddle? is true
>>>   class CStructEntity < (DL.fiddle? ? Fiddle::Pointer : CPtr)
>>>
>>> Most jgem sub-commands are not working because of this bug.
>>>
>>> Is this a known issue yet? (This is my first post to
>>> dev@jruby.codehaus.org btw)
>>>
>>> Are the issues still tracked in Jira or are they now tracked on github
>>> only?
>>>
>>> --
>>> Christian
>>>
>>
>>
>>
>> --
>> blog: http://blog.enebo.com       twitter: tom_enebo
>> mail: tom.en...@gmail.com
>>
>
>
>
> --
> Christian
>



-- 
blog: http://blog.enebo.com       twitter: tom_enebo
mail: tom.en...@gmail.com

Reply via email to