tags 563028 + patch thanks Seb == Sebastien Delafond <s...@debian.org> wrote
Seb> There is no Java5 SDK that I can find left in the archive: Seb> sun-java5 was removed a while ago, Hi Sebastian, Java5 is non-free in Lenny http://packages.debian.org/lenny/sun-java5-jre Java5 is still, IMHO, widely used in production installations today and probably will be for several more years inspite of its end of life. Seb> openjdk never had a version 5 in debian, and gcj could never Seb> quite build jruby, so this will have to remain like this. I hope the attached simple dpatch file will change your mind :-) As I learned this weekend, the JRuby build process defaults to generate class files in the 1.5 format (even with a 1.6 JDK as on Squeeze) when using javac. However, this default is not being passed in build.xml to the org.jruby.anno.InvokerGenerator (see org.jruby.RubyInstanceConfig) which defaults to the current JRE version instead. As a result we are ending up with version 1.5 class files generated by the (v1.6) javac and 1.6 class files for ASM generated classes during the build by InvokerGenerator. I believe this bug should be reported upstream. The upstream binary works with JDK 1.5 so I can only assume they are building with a 1.5 JDK. I'd be happy to report upstream if you prefer that (I am a casual user with practically zero JRuby experience, hence the reluctance to start there). I certainly am hoping you will reconsider the wontfix/wishlist position so users like me, whose business environment often insists on a 1.5 JDK, won't have to use a home grown JRuby package/upstream tarball ;-) Cheers! Shyamal
#! /bin/sh /usr/share/dpatch/dpatch-run ## 07_jruby_bytecode_version.dpatch by Shyamal Prasad <shya...@member.fsf.org> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Set bytecode version for ASM generated bytecodes to target javac ## DP: version during the build process @DPATCH@ --- jruby-1.4.0/build.xml.orig 2010-01-09 22:49:27.000000000 -0800 +++ jruby-1.4.0/build.xml 2010-01-09 22:47:35.000000000 -0800 @@ -197,6 +197,7 @@ <!-- uncomment this line when building on a JVM with invokedynamic <jvmarg line="-XX:+InvokeDynamic"/> --> + <sysproperty key="jruby.bytecode.version" value="${javac.version}"/> <arg value="src_gen/annotated_classes.txt"/> <arg value="${jruby.classes.dir}"/> </java>