Re: [rvm-research] Compilation error when trying to install Jikes 3.0.0
xeonmailinglist <[email protected]>
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
thank you for the reply, but I still have a problem applying the patch.
I have downloaded the patch from http://jira.codehaus.org/browse/RVM-1004
I have tried with |patch -p1| and |patch -p2| and I get the error below.
Am I applying the patch wrong?
|vagrant@airavat-1:~/Programs/jikesrvm-3.0.0/rvm$ patch -p1 < RVM-1004-backport.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/rvm/src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java b/rvm/src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java
|--- a/rvm/src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java
|+++ b/rvm/src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java
--------------------------
File to patch: ^C
vagrant@airavat-1:~/Programs/jikesrvm-3.0.0/rvm$
vagrant@airavat-1:~/Programs/jikesrvm-3.0.0/rvm$ patch -p2 < RVM-1004-backport.patch
patching file src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java
Hunk #1 FAILED at 1588.
1 out of 1 hunk FAILED -- saving rejects to file src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java.rej
vagrant@airavat-1:~/Programs/jikesrvm-3.0.0/rvm$ pwd
/home/vagrant/Programs/jikesrvm-3.0.0/rvm
|
Here is the output of the rej file.
|vagrant@airavat-1:~/Programs/jikesrvm-3.0.0/rvm$ cat src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java.rej
--- src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java
+++ src/org/jikesrvm/compilers/opt/bc2ir/BC2IR.java
@@ -1588,23 +1588,39 @@
}
// optimization: if the field is final and either
- // initialized or we're writing the bootimage and in an
- // RVM bootimage class, then get the value at compile
+ // initialized or we're writing the bootimage and the field
+ // is from a suitable class, then get the value at compile
// time.
if (gc.options.SIMPLIFY_CHASE_FINAL_FIELDS && field.isFinal()) {
RVMClass declaringClass = field.getDeclaringClass();
- if (declaringClass.isInitialized() || declaringClass.isInBootImage()) {
+
+ boolean initializedClassAtRuntime = VM.runningVM & declaringClass.isInitialized();
+ boolean fieldFromRVMInternalClassInBootImage = declaringClass.isInBootImage() &&
+ declaringClass.getDescriptor().isRVMDescriptor();
+ // We cannot assume that non-public fields from the host JVM's class library are present in
+ // the class library used by Jikes RVM: only public fields are part of the API.
+ boolean publicFieldInBootImage = declaringClass.isInBootImage() &&
+ field.isPublic();
+
+ if (initializedClassAtRuntime || fieldFromRVMInternalClassInBootImage ||
+ publicFieldInBootImage) {
try {
ConstantOperand rhs = StaticFieldReader.getStaticFieldValue(field);
// VM.sysWrite("Replaced getstatic of "+field+" with "+rhs+"\n");
push(rhs, fieldType);
break;
} catch (NoSuchFieldException e) {
- if (VM.runningVM) { // this is unexpected
+ if (VM.runningVM) {
throw new Error("Unexpected exception", e);
} else {
// Field not found during bootstrap due to chasing a field
- // only valid in the bootstrap JVM
+ // only valid in the bootstrap JVM.
+
+ // Although we try to avoid most cases where this could happen, we cannot
+ // avoid all. For example, a NoSuchFieldException can occur when we're trying
+ // to optimize a public field from Jikes RVM's class library that's not present
+ // in the host JVM's class library (example: a field from an internal
+ // helper class).
}
}
}
|
Thanks,
Pedro
On 19-01-2015 19:20, Michael Bond wrote:
> Agreed. That bug report gives a proper fix. Here's a quick "fix":
> http://sourceforge.net/p/jikesrvm/mailman/message/30033788/
>
> Cheers,
> Mike
>
> On 01/19/2015 01:30 PM, Nachshon Cohen wrote:
>> Hi
>>
>> Seem like bug RVM-1004: http://jira.codehaus.org/browse/RVM-1004
>>
>> Nachshon
>>
>> On Mon, Jan 19, 2015 at 7:24 PM, xeonmailinglist
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>> Hi all,
>>
>> I am trying to install an old version of Jikes RVM, Jikes 3.0.0.,
>> that is patched with patches that the application Airavat
>> (Airavat: Security and Privacy for MapReduce - Usenix
>> <https://www.google.pt/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CB8QFjAA&url=https%3A%2F%2Fwww.usenix.org%2Fevent%2Fnsdi10%2Ftech%2Ffull_papers%2Froy.pdf&ei=8Tu9VKmMOcGrUY6ggsAJ&usg=AFQjCNFcjBgKHETQr2ZFgRzS-iHFQHwesw&sig2=IapybJlF8xrq7Wugn11vTQ&bvm=bv.83829542,d.d24>)
>> makes it available. The patch file is in the tar.gz in attachment
>> (just for curiosity….).
>>
>> Airavat needs Jikes 3.0.0 and in the README file they say to
>> follow this step:
>>
>> 2) For Airavat JVM: Download Jikes 3.0.0 and apply
>> airavat-jikes.patch
>> Use a configuration file with the suffix “_airavat” (e.g.
>> -Dconfig.name=FastAdaptiveGenMS_airavat)
>> The build process is identical to that of Jikes RVM.
>>
>> What I have mentioned above is just to justify why I use Jikes 3.0.0.
>>
>> The problem is that when I compile Jikes I have the error below.
>> This error is independent of the patch because I have also tried
>> without applying the patch, and I get the same error.
>>
>> I don’t understand why I get this error, and I don’t know what to
>> do to try to solve it. Any help to try to install Jikes 3.0.0?
>>
>> |build-bootimage-writer:
>> [mkdir] Created dir: /home/vagrant/Programs/jikesrvm-3.0.0/target/FastAdaptiveGenMS_airavat_ia32-linux/bootimage-writer
>> [javac] /home/vagrant/Programs/jikesrvm-3.0.0/build.xml:1317: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
>> [javac] Compiling 8 source files to /home/vagrant/Programs/jikesrvm-3.0.0/target/FastAdaptiveGenMS_airavat_ia32-linux/bootimage-writer
>> [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
>> [javac] Note: /home/vagrant/Programs/jikesrvm-3.0.0/tools/bootImageWriter/src/org/jikesrvm/tools/bootImageWriter/BootImageObjectAddressRemapper.java uses unchecked or unsafe operations.
>> [javac] Note: Recompile with -Xlint:unchecked for details.
>> [javac] 1 warning
>>
>> gen-primordial-list:
>>
>> build-bootimage:
>> [echo] Building bootimage. Output redirected to : /home/vagrant/Programs/jikesrvm-3.0.0/target/FastAdaptiveGenMS_airavat_ia32-linux/BootImageWriterOutput.txt
>> [echo] MMTk properties = /home/vagrant/Programs/jikesrvm-3.0.0/build/mmtk/default.properties
>> [java] BootImageWriter: compiler arg: O2
>> [java] Java Result: 101
>> [echo] BootImageCompiler: init (opt compiler)
>> [echo] Compiler failure during compilation of < BootstrapCL, Ljava/util/logging/LogManager; >.checkAccess ()V
>> [echo] java.lang.NullPointerException
>> [echo] at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:54)
>> [echo] at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:38)
>> [echo] at java.lang.reflect.Field.get(Field.java:379)
>> [echo] at org.jikesrvm.compilers.opt.StaticFieldReader.getObjectStaticFieldValue(StaticFieldReader.java:313)
>> [echo] at org.jikesrvm.compilers.opt.StaticFieldReader.getStaticFieldValue(StaticFieldReader.java:185)
>> [echo] at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateFrom(BC2IR.java:1607)
>> [echo] at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateHIR(BC2IR.java:379)
>> [echo] at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateHIR(BC2IR.java:177)
>> [echo] at org.jikesrvm.compilers.opt.bc2ir.ConvertBCtoHIR.perform(ConvertBCtoHIR.java:36)
>> [echo] at org.jikesrvm.compilers.opt.driver.CompilerPhase.performPhase(CompilerPhase.java:205)
>> [echo] at org.jikesrvm.compilers.opt.driver.OptimizationPlanAtomicElement.perform(OptimizationPlanAtomicElement.java:89)
>> [echo] at org.jikesrvm.compilers.opt.driver.OptimizationPlanCompositeElement.perform(OptimizationPlanCompositeElement.java:143)
>> [echo] at org.jikesrvm.compilers.opt.driver.CompilationPlan.execute(CompilationPlan.java:131)
>> [echo] at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.compile(OptimizingCompiler.java:224)
>> [echo] at org.jikesrvm.compilers.opt.driver.OptimizingBootImageCompiler.compileMethod(OptimizingBootImageCompiler.java:119)
>> |
>>
>> Yours sincerely,
>>
>>
>>
>> ------------------------------------------------------------------------------
>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>> GigeNET is offering a free month of service with a new server in
>> Ashburn.
>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>> Higher redundancy.Lower latency.Increased capacity.Completely
>> compliant.
>> http://p.sf.net/sfu/gigenet
>> _______________________________________________
>> Jikesrvm-researchers mailing list
>> [email protected]
>> <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>> GigeNET is offering a free month of service with a new server in Ashburn.
>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>> http://p.sf.net/sfu/gigenet
>>
>>
>> _______________________________________________
>> Jikesrvm-researchers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
>
>
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers