Discussion:
[jruby-dev] [jruby-9k] uninitialized constant Fiddle::Pointer
Christian MICHON
2013-12-05 15:08:11 UTC
Permalink
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-***@public.gmane.org)

Are the issues still tracked in Jira or are they now tracked on github only?
--
Christian
Thomas E Enebo
2013-12-05 15:36:41 UTC
Permalink
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
Post by Christian MICHON
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 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]
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
- 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
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.enebo-***@public.gmane.org
Christian MICHON
2013-12-05 16:15:43 UTC
Permalink
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
Post by Thomas E Enebo
require 'dl'
=> true
Post by Thomas E Enebo
require 'fiddle'
=> true
Post by Thomas E Enebo
DL.fiddle?
=> true
Post by Thomas E Enebo
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...
Post by Thomas E Enebo
We are now tracking issues on github. The Jira ones are still there but
mostly for posterity. Open new ones on github.
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 <
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 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]
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
- 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
Are the issues still tracked in Jira or are they now tracked on github only?
--
Christian
--
blog: http://blog.enebo.com twitter: tom_enebo
--
Christian
Thomas E Enebo
2013-12-05 16:31:23 UTC
Permalink
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 <
Post by Christian MICHON
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
Post by Thomas E Enebo
require 'dl'
=> true
Post by Thomas E Enebo
require 'fiddle'
=> true
Post by Thomas E Enebo
DL.fiddle?
=> true
Post by Thomas E Enebo
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...
Post by Thomas E Enebo
We are now tracking issues on github. The Jira ones are still there but
mostly for posterity. Open new ones on github.
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 <
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 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]
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
- 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
Are the issues still tracked in Jira or are they now tracked on github only?
--
Christian
--
blog: http://blog.enebo.com twitter: tom_enebo
--
Christian
--
blog: http://blog.enebo.com twitter: tom_enebo
mail: tom.enebo-***@public.gmane.org
Christian MICHON
2013-12-06 09:14:39 UTC
Permalink
Still trying to figure out the env difference, to no avail yet.

I've done more tests, and apparently some rubygems work if included in the
jar file: I'll add pry-rescue to figure out the exact location of the
failure, as the backtrace if quite limited.

Any other idea to debug this?
Post by Thomas E Enebo
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
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 <
Post by Christian MICHON
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
Post by Thomas E Enebo
require 'dl'
=> true
Post by Thomas E Enebo
require 'fiddle'
=> true
Post by Thomas E Enebo
DL.fiddle?
=> true
Post by Thomas E Enebo
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...
Post by Thomas E Enebo
We are now tracking issues on github. The Jira ones are still there but
mostly for posterity. Open new ones on github.
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 <
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 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]
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
- 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
Are the issues still tracked in Jira or are they now tracked on github only?
--
Christian
--
blog: http://blog.enebo.com twitter: tom_enebo
--
Christian
--
blog: http://blog.enebo.com twitter: tom_enebo
--
Christian
Thomas E Enebo
2013-12-06 15:54:44 UTC
Permalink
Hmmm I wonder if rubygems uses something which requires this only on a
particular type of gemspec? Just random flung out suggestion :)

-Tom
Post by Christian MICHON
Still trying to figure out the env difference, to no avail yet.
I've done more tests, and apparently some rubygems work if included in the
jar file: I'll add pry-rescue to figure out the exact location of the
failure, as the backtrace if quite limited.
Any other idea to debug this?
Post by Thomas E Enebo
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
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 <
Post by Christian MICHON
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
Post by Thomas E Enebo
require 'dl'
=> true
Post by Thomas E Enebo
require 'fiddle'
=> true
Post by Thomas E Enebo
DL.fiddle?
=> true
Post by Thomas E Enebo
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...
Post by Thomas E Enebo
We are now tracking issues on github. The Jira ones are still there
but mostly for posterity. Open new ones on github.
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 <
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 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]
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
- 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
Are the issues still tracked in Jira or are they now tracked on github only?
--
Christian
--
blog: http://blog.enebo.com twitter: tom_enebo
--
Christian
--
blog: http://blog.enebo.com twitter: tom_enebo
--
Christian
--
blog: http://blog.enebo.com twitter: tom_enebo
mail: tom.enebo-***@public.gmane.org
Loading...