Error while building JVMCI enabled JDK8 on Power

Deepali Patel deepali_patel at persistent.com
Tue Feb 28 12:47:59 UTC 2017


Hi Doug,

Thanks for helpful response. 

I have copied jvmci/jdk.vm.ci.amd64 and jvmci/jdk.vm.ci.hotspot.amd64 to create jvmci/jdk.vm.ci.ppc64 and jvmci/jdk.vm.ci.hotspot.ppc64 (as suggested by Gilles) respectively. I have modified the source code files to reflect ppc64 instead of amd64 in these folders. 

Then I realized that graal-jvmci-8/mx.jvmci/suite.py also needs to be updated to incorporate these new folders. I have also added ppc64le as the supported arch for the Distributions in graal-jvmci-8/mx.jvmci/suite.py. 

By default, the ppc64 is set as arch for LE versions as well, however this leads to following error. The jdk source code has jvm.cfg file under ppc64le folder:
	mx --java-home /usr/lib/jvm/java-8-openjdk-ppc64el build
	None
	{'ppc64': {'path': 'build/product/linux/ppc64/server/jvm.tar'}, 'amd64': {'path': 'build/product/linux/amd64/server/jvm.tar'}, 'sparcv9': {'path': 'build/product/linux/sparcv9/server/jvm.tar'}}
	Creating /home/deepali/Graal/graal-jvmci-8/jdk1.8.0_121/product from /usr/lib/jvm/java-8-openjdk-ppc64el
	/home/deepali/Graal/graal-jvmci-8/jdk1.8.0_121/product/jre/lib/ppc64/jvm.cfg does not exist

Thus I think I need to update the arch to ppc64le in the makefiles. 

Another thing that I noticed is " WARNING: hsdis with flavor 'None' not supported on this plattform or architecture". So looks like I will need to port hsdis as well because it is not available for ppc at https://lafo.ssw.uni-linz.ac.at/pub/hsdis/. 

Regards
Deepali

-----Original Message-----
From: Doug Simon [mailto:doug.simon at oracle.com] 
Sent: Friday, February 24, 2017 2:48 PM
To: Deepali Patel
Cc: Gilles Duboscq; graal-dev at openjdk.java.net
Subject: Re: Error while building JVMCI enabled JDK8 on Power


> On 24 Feb 2017, at 09:20, Deepali Patel <deepali_patel at persistent.com> wrote:
> 
> Thanks Doug and Gilles for quick response.
> 
> Could you please throw some more light on the parts of code(folders, files etc) that will need to be updated/modified to get this working on PPC. Would we need assembly code as well? If so, could you please point me to the corresponding x86 files for reference.

dsimon at kurz-3 ~/g/graal-jvmci-8> find src | grep jvmci | grep x86 src/cpu/x86/vm/jvmci_globals_x86.hpp
src/cpu/x86/vm/jvmciCodeInstaller_x86.cpp
dsimon at kurz-3 ~/g/graal-jvmci-8> find src | grep jvmci | grep sparc src/cpu/sparc/vm/jvmci_globals_sparc.hpp
src/cpu/sparc/vm/jvmciCodeInstaller_sparc.cpp

dsimon at kurz-3 ~/g/graal-core> ls -d graal/*sparc*
graal/org.graalvm.compiler.asm.sparc             graal/org.graalvm.compiler.core.sparc.test       graal/org.graalvm.compiler.replacements.sparc
graal/org.graalvm.compiler.asm.sparc.test        graal/org.graalvm.compiler.hotspot.sparc         graal/org.graalvm.compiler.truffle.hotspot.sparc
graal/org.graalvm.compiler.core.sparc            graal/org.graalvm.compiler.lir.sparc
dsimon at kurz-3 ~/g/graal-core> ls -d graal/*amd64*
graal/org.graalvm.compiler.asm.amd64             graal/org.graalvm.compiler.core.amd64.test       graal/org.graalvm.compiler.lir.amd64
graal/org.graalvm.compiler.asm.amd64.test        graal/org.graalvm.compiler.hotspot.amd64         graal/org.graalvm.compiler.replacements.amd64
graal/org.graalvm.compiler.core.amd64            graal/org.graalvm.compiler.hotspot.amd64.test    graal/org.graalvm.compiler.truffle.hotspot.amd64

Hope that helps,

-Doug

> -----Original Message-----
> From: graal-dev [mailto:graal-dev-bounces at openjdk.java.net] On Behalf 
> Of Gilles Duboscq
> Sent: Thursday, February 23, 2017 5:02 PM
> To: graal-dev at openjdk.java.net
> Subject: Re: Error while building JVMCI enabled JDK8 on Power
> 
> You will also need to implement the Java side of things.
> See for example the sources in jvmci/jdk.vm.ci.amd64 and jvmci/jdk.vm.ci.hotspot.amd64.
> 
>  Gilles
> 
> On 23/02/17 11:26, Doug Simon wrote:
>> Hi Deepali,
>> 
>> This is an interesting but non-trivial project I suspect. You will need to look at all the machine specific JVMCI files and create corresponding *_ppc.[hpp|cpp] files. The existing jvmciGlobals_ppc.hpp needs to be renamed to jvmci_globals_ppc.hpp (as you observed) and completed as part of this.
>> 
>> -Doug
>> 
>>> On 23 Feb 2017, at 10:41, Deepali Patel <deepali_patel at persistent.com> wrote:
>>> 
>>> Hello Team,
>>> 
>>> I am trying to build Graal core on Power.
>>> 
>>> 
>>> 1.       I have updated mx.py to allow build on Power:
>>> -----------------
>>> diff --git a/mx.py b/mx.py
>>> index 172609d..de932f6 100755
>>> --- a/mx.py
>>> +++ b/mx.py
>>> @@ -7369,6 +7369,8 @@ def get_arch():
>>>        except OSError:
>>>            # sysctl is not available
>>>            pass
>>> +    if machine == 'ppc64le' and  get_os() == 'linux':
>>> +       return 'ppc64le'
>>>    abort('unknown or unsupported architecture: os=' + get_os() + ', 
>>> machine=' + machine)
>>> 
>>> mx_subst.results_substitutions.register_no_arg('arch', get_arch)
>>> ------------------------------
>>> 
>>> 
>>> 2.       Next I am trying to build building JVMCI enabled JDK8. However, I see following error:
>>> 
>>> Generating precompiled header precompiled.hpp.gch
>>> 
>>> In file included from /pathto/allocation.hpp:28:0,
>>> 
>>>                from /pathto/iterator.hpp:28,
>>> 
>>>                from /pathto/genOopClosures.hpp:28,
>>> 
>>>                from /pathto/klass.hpp:28,
>>> 
>>>                from /pathto/handles.hpp:28,
>>> 
>>>                from /pathto/universe.hpp:28,
>>> 
>>>                from /pathto/oopRecorder.hpp:28,
>>> 
>>>                from /pathto/codeBuffer.hpp:28,
>>> 
>>>                from /pathto/assembler.hpp:28,
>>> 
>>>                from /pathto/precompiled.hpp:29:
>>> 
>>> /pathto/globals.hpp:143:34: fatal error: jvmci_globals_ppc.hpp: No 
>>> such file or directory
>>> 
>>> compilation terminated.
>>> 
>>> /pathto/vm.make:322: recipe for target 'precompiled.hpp.gch' failed
>>> 
>>> make[4]: Leaving directory '/pathto/linux_ppc64_compiler2/product'
>>> 
>>> make[4]: *** [precompiled.hpp.gch] Error 1
>>> 
>>> /pathto/top.make:119: recipe for target 'the_vm' failed
>>> 
>>> make[3]: Leaving directory '/pathto/product'
>>> 
>>> /pathto/make/linux/Makefile:303: recipe for target 'product' failed
>>> 
>>> make[2]: Leaving directory '/pathto/graal-jvmci-8/build/linux'
>>> 
>>> Makefile:231: recipe for target 'generic_build2' failed
>>> 
>>> make[1]: Leaving directory '/pathtoGraal/graal-jvmci-8/make'
>>> 
>>> make[3]: *** [the_vm] Error 2
>>> 
>>> make[2]: *** [product] Error 2
>>> 
>>> make[1]: *** [generic_build2] Error 2
>>> 
>>> Makefile:182: recipe for target 'product' failed
>>> 
>>> make: *** [product] Error 2
>>> 
>>> make: Leaving directory '/pathto/graal-jvmci-8/make'
>>> 
>>> Building HotSpot[product, server] failed
>>> 
>>> 1         build tasks failed
>>> 
>>> 
>>> 
>>> 3.       I dont see jvmci_globals_ppc.hpp in the src tree. But there is another file with name jvmciGlobals_ppc.hpp available in the src tree. I tried to use jvmciGlobals_ppc.hpp, but I get following errors:
>>> 
>>> /pathto/graal-jvmci-8/src/cpu/ppc/vm/jvmciGlobals_ppc.hpp:35:2: 
>>> error: #error Unimplemented
>>> 
>>> #error Unimplemented
>>> 
>>> ^
>>> 
>>> /pathto/graal-jvmci-8/make/linux/makefiles/vm.make:322: recipe for 
>>> target 'precompiled.hpp.gch' failed
>>> 
>>> Please advise if I am missing on something here.
>>> 
>>> Regards
>>> Deepali
>>> 
>>> 
>>> 
>>> DISCLAIMER
>>> ==========
>>> This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
>>> 
>> 
> 
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
> 


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.



More information about the graal-dev mailing list