Forum: JRuby ruby gems broken on Solaris

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
255957e676582582b6b8914e5c6aaec3?d=identicon&s=25 Chris Evans (Guest)
on 2009-03-12 15:51
(Received via mailing list)
I did a clean install of jruby on Solaris 10, and am now getting an
error when trying to use gem.

 $ uname -a
SunOS ecom-devdb 5.10 Generic_118833-22 sun4u sparc SUNW,Sun-Fire-V240

$ jruby -v
jruby 1.2.0RC2 (ruby 1.8.6 patchlevel 287) (2009-03-06 rev 9369)
[sparc-java]

 $ jruby -S gem list

*** LOCAL GEMS ***

/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:721:in
`set_paths': getpwuid unimplemented unsupported on this platform
(NotImplementedError)
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:719:in
`each'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:719:in
`set_paths'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb:17:in
`set_paths'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:526:in
`path'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb:81:in
`installed_spec_directories'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:56:in
`from_installed_gems'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:736:in
`source_index'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/commands/query_command.rb:81:in
`execute'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/commands/list_command.rb:31:in
`execute'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:136:in
`invoke'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:105:in
`process_args'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:75:in
`run'
        from
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:39:in
`run'
        from /export/home/hudson/bin/jruby/bin/gem:24

$ jruby -S irb
irb(main):002:0> require 'etc'
=> true
irb(main):003:0> defined?(Etc) && !Etc.getpwuid.nil?
NotImplementedError: getpwuid unimplemented unsupported on this platform
        from (irb):4
irb(main):004:0> defined?(Etc)
=> "constant"
irb(main):005:0> !Etc.getpwuid.nil?
NotImplementedError: getpwuid unimplemented unsupported on this platform
        from (irb):6
irb(main):006:0> quit


Any thoughts?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-03-12 17:43
(Received via mailing list)
I think this is an issue with native calls on Solaris that we just
missed merging into RC2. Can you try it with trunk/nightlies?

Chris Evans wrote:
>
> `set_paths'
>         from 
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/commands/list_command.rb:31:in
>
>         from (irb):6
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 AD (Guest)
on 2009-03-12 17:46
(Received via mailing list)
Yea i had the same getpwuid issue on Solaris and i think this got
fixed in the trunk build we tried.

Search JIRA you will see my error (or this list)

Adam

On Thu, Mar 12, 2009 at 10:47 AM, Chris Evans <evans.chris@gmail.com>
wrote:
>
> `set_paths'
>        from 
/export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/commands/list_command.rb:31:in
>
>        from (irb):6
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
255957e676582582b6b8914e5c6aaec3?d=identicon&s=25 Chris Evans (Guest)
on 2009-03-12 20:18
(Received via mailing list)
I get this error when compiling from trunk:

generate-method-classes:

_gmc_internal_:
     [echo] Generating invokers...
     [java] Exception in thread "main" java.lang.NoClassDefFoundError:
org/jruby/anno/InvokerGenerator
     [java] Caused by: java.lang.ClassNotFoundException:
org.jruby.anno.InvokerGenerator
     [java]     at
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java]     at java.security.AccessController.doPrivileged(Native
Method)
     [java]     at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     [java]     at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
     [java]     at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
     [java] Could not find the main class:
org.jruby.anno.InvokerGenerator.  Program will exit.

BUILD FAILED
/export/home/hudson/jruby/build.xml:409: The following error occurred
while executing this line:
/export/home/hudson/jruby/build.xml:164: The following error occurred
while executing this line:
/export/home/hudson/jruby/build.xml:169: Java returned: 1


This is my first time building from trunk.  These are the commands I
ran:

$ svn co http://svn.codehaus.org/jruby/trunk/jruby jruby
$ cd jruby
$ ant

$ java -version
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)
$ ant -version
Apache Ant version 1.7.1 compiled on June 27 2008


Thanks,



On Thu, Mar 12, 2009 at 12:43 PM, Charles Oliver Nutter
<charles.nutter@sun.com> wrote:
>>
>> (NotImplementedError)
>> /export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems.rb:526:in
>>        from
>> `process_args'
>> => true
>>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-03-12 21:37
(Received via mailing list)
Hmm, do you have a JAVA_HOME environment variable set to something else?
This is a very peculiar error.

Chris Evans wrote:
>      [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> /export/home/hudson/jruby/build.xml:409: The following error occurred
> $ ant
>
>>>
>>>
>>> /export/home/hudson/bin/jruby/lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb:17:in
>>>        from
>>> `invoke'
>>>
>>>        from (irb):6
>>>
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
255957e676582582b6b8914e5c6aaec3?d=identicon&s=25 Chris Evans (Guest)
on 2009-03-12 22:22
(Received via mailing list)
JAVA_HOME wasn't set, but it didn't make a difference when I set it.

 $ echo $JAVA_HOME
/export/home/hudson/tools/jdk1.6.0_12

I ran ant -v, and this seems to be the interesting bit (though I may be
wrong):

_gmc_internal_:
     [echo] Generating invokers...
     [java] Executing
'/export/home/hudson/tools/jdk1.6.0_12/jre/bin/java' with arguments:
     [java] '-classpath'
     [java]
'/export/home/hudson/jruby/build_lib/apt-mirror-api.jar:/export/home/hudson/jruby/build_lib/asm-3.0.jar:/export/home/hudson/jruby/build_lib/asm-analysis-3.0.jar:/expor
t/home/hudson/jruby/build_lib/asm-commons-3.0.jar:/export/home/hudson/jruby/build_lib/asm-tree-3.0.jar:/export/home/hudson/jruby/build_lib/asm-util-3.0.jar:/export/home/hudson/jru
by/build_lib/backport-util-concurrent.jar:/export/home/hudson/jruby/build_lib/bnd-0.0.249.jar:/export/home/hudson/jruby/build_lib/bytelist-1.0.1.jar:/export/home/hudson/jruby/buil
d_lib/constantine.jar:/export/home/hudson/jruby/build_lib/dynalang-0.3.jar:/export/home/hudson/jruby/build_lib/emma.jar:/export/home/hudson/jruby/build_lib/emma_ant.jar:/export/ho
me/hudson/jruby/build_lib/invokedynamic.jar:/export/home/hudson/jruby/build_lib/jarjar-1.0rc8.jar:/export/home/hudson/jruby/build_lib/jcodings.jar:/export/home/hudson/jruby/build_
lib/jffi.jar:/export/home/hudson/jruby/build_lib/jline-0.9.93.jar:/export/home/hudson/jruby/build_lib/jna-posix.jar:/export/home/hudson/jruby/build_lib/jna.jar:/export/home/hudson
/jruby/build_lib/joda-time-1.5.1.jar:/export/home/hudson/jruby/build_lib/joni.jar:/export/home/hudson/jruby/build_lib/junit.jar:/export/home/hudson/jruby/build_lib/jvyamlb-0.2.5.j
ar:/export/home/hudson/jruby/build_lib/retroweaver-2.0.5.jar:/export/home/hudson/jruby/build_lib/retroweaver-rt-2.0.5.jar:/export/home/hudson/jruby/build_lib/yydebug.jar:/export/h
ome/hudson/jruby/lib/bsf.jar:/export/home/hudson/jruby/build/classes/jruby'
     [java] 'org.jruby.anno.InvokerGenerator'
     [java] 'src_gen/annotated_classes.txt'
     [java] '/export/home/hudson/jruby/build/classes/jruby'
     [java]
     [java] The ' characters around the executable and arguments are
     [java] not part of the command.
     [java] Exception in thread "main" java.lang.NoClassDefFoundError:
org/jruby/anno/InvokerGenerator
     [java] Caused by: java.lang.ClassNotFoundException:
org.jruby.anno.InvokerGenerator
     [java]     at
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java]     at java.security.AccessController.doPrivileged(Native
Method)
     [java]     at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     [java]     at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
     [java]     at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
     [java] Could not find the main class:
org.jruby.anno.InvokerGenerator.  Program will exit.
  [antcall] Exiting /export/home/hudson/jruby/build.xml.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-03-13 04:54
(Received via mailing list)
What platform are you on? Looks like Solaris eh? Maybe there's something
about our build or about your copy of ant that's broken on Solaris?

Chris Evans wrote:
> '/export/home/hudson/tools/jdk1.6.0_12/jre/bin/java' with arguments:
>      [java] 'org.jruby.anno.InvokerGenerator'
>      [java]     at java.security.AccessController.doPrivileged(Native Method)
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
255957e676582582b6b8914e5c6aaec3?d=identicon&s=25 Chris Evans (Guest)
on 2009-03-13 19:20
(Received via mailing list)
No idea what the previous build issue was, but I have a couple of
brand spanking new Solaris 10 boxes.  Subversion checkout and build
worked fine, and jruby -S gem list worked fine.

On another note, ant test broke, I don' know if that's a known issue,
Solaris related, or what.

[java] 'Struct aligns fields correctly long long, followed by an int'
FAILED
     [java] expected: 12,
     [java]      got: 16 (using ==)
     [java] spec/ffi/struct_spec.rb:26:
     [java]
     [java] Finished in 4.346 seconds
     [java]
     [java] 2041 examples, 1 failure
     [java] rake aborted!
     [java] Command /export/home/csevans/jruby/bin/jruby
-I"/export/home/csevans/jruby/lib/ruby/gems/1.8/gems/rspec-1.1.12/lib"
 "/export/home/csevans/jruby/lib/ruby/gems/1.8/gems/rspec-1.1.12/bin/spec"
"spec/ffi/struct_spec.rb" "spec/ffi/buffer_spec.rb"
"spec/ffi/memorypointer_spec.rb" "spec/ffi/callback_spec.rb"  fail




--Chris

On Thu, Mar 12, 2009 at 11:54 PM, Charles Oliver Nutter
<charles.nutter@sun.com> wrote:
>> I ran ant -v, and this seems to be the interesting bit (though I may be
>> 
t/home/hudson/jruby/build_lib/asm-commons-3.0.jar:/export/home/hudson/jruby/build_lib/asm-tree-3.0.jar:/export/home/hudson/jruby/build_lib/asm-util-3.0.jar:/export/home/hudson/jru
>>
>> org/jruby/anno/InvokerGenerator
>>     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-03-13 19:59
(Received via mailing list)
Ah-ha, that would be an FFI issue; long long or int must be sized
differently than we expect on Sparc. Can you file an issue for that?

Chris Evans wrote:
>      [java] spec/ffi/struct_spec.rb:26:
>
>> Chris Evans wrote:
>>>     [java] Executing
>>>
>>>     [java] 'src_gen/annotated_classes.txt'
>>> Method)
>>>  [antcall] Exiting /export/home/hudson/jruby/build.xml.
>>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.