Need OpenJDK to be used on PowerPC for our products.

Dipendu Ghosh dipendu.ghosh at keysight.com
Fri Jan 7 10:06:05 UTC 2022


Thank You Aleksey for the clarification.

It was my mistake that I mentioned about PPC32 and my commands were trying to build for another platform.
At present I am trying to setup the build environment for OpenJDK. So I followed the steps present at https://openjdk.java.net/groups/build/doc/building.html.
The default build steps ran fine and the output was generated for linux-x86_64-server-release. Now I am trying to execute the cross compilation which is for aarch64-linux-gnu.
All these which I am trying are being executed on the latest code from https://git.openjdk.java.net/jdk/ so I am not working on OpenJDK 8 at present.

Thanks & Regards,
Dipendu

-----Original Message-----
From: Aleksey Shipilev <shade at redhat.com> 
Sent: 07 January 2022 14:38
To: Dipendu Ghosh <dipendu.ghosh at keysight.com>; David Holmes <david.holmes at oracle.com>; build-dev at openjdk.java.net
Subject: Re: Need OpenJDK to be used on PowerPC for our products.

CAUTION: This message originates from an external sender.

On 1/7/22 9:38 AM, Dipendu Ghosh wrote:
> Thank You David for the link. But that does not provide builds for Linux/PPC32 (single core e500v2).

PPC32 is not a supported platform, so you would not be be able to compile "Server" (C1/C2 compilers) for it. You would be able to compile "Zero" (pure C++ interpreter), but that would produce 20..50x slower binary.

Evidence that current mainline (JDK 19+) can be configured and built for Linux/PPC32/Zero:

https://urldefense.com/v3/__https://builds.shipilev.net/openjdk-jdk/configure-logs/configure-openjdk-jdk-linux-ppc-zero-release-gcc10-glibc2.31.log__;!!I5pVk4LIGAfnvw!x3Rv0V9KaXy7JXJNfVgwddCv5m9J5jH0v0SOg2QU4HAa6aGLJd73duL6EoyDQzPos1dGaA$

https://urldefense.com/v3/__https://builds.shipilev.net/openjdk-jdk/build-logs/build-openjdk-jdk-linux-ppc-zero-release-gcc10-glibc2.31.log__;!!I5pVk4LIGAfnvw!x3Rv0V9KaXy7JXJNfVgwddCv5m9J5jH0v0SOg2QU4HAa6aGLJd73duL6EoyDQzN64vQZjw$
   https://urldefense.com/v3/__https://builds.shipilev.net/openjdk-jdk/openjdk-jdk-linux-ppc-zero-release-gcc10-glibc2.31.tar.xz__;!!I5pVk4LIGAfnvw!x3Rv0V9KaXy7JXJNfVgwddCv5m9J5jH0v0SOg2QU4HAa6aGLJd73duL6EoyDQzNMbl5hNQ$

Generally, I would warn that getting PPC32 (old hardware) to work reasonably well on JDK 8 (old
release) would be much harder than just cross-compiling it. Unless you can find a vendor that does that for you, be prepared to do *a lot* of work.

Please read the previous paragraph again.

> Failure step:-
>
> sh ./configure \
>    --openjdk-target=aarch64-linux-gnu \
>    --with-sysroot=~/sysroot-arm64
>
> Error is as below:-
>
> “configure: error: Could not find X11 libraries. You might be able to fix this by running 'sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev'. configure exiting with result code 1”
>
> The fix provided after the error is not solving the problem since the packages are already installed but somehow they are not being included in the sysroot.

Several problems here.

First, you are trying to build arm64 binaries, not ppc32.

Second, the default search paths work well for JDK 11 and 17, but on JDK 8, you sometimes have to point to library locations by hand, e.g see "using configure arguments" line here:
https://urldefense.com/v3/__https://builds.shipilev.net/openjdk-jdk8/configure-logs/configure-linux-aarch64-server-fastdebug.log__;!!I5pVk4LIGAfnvw!x3Rv0V9KaXy7JXJNfVgwddCv5m9J5jH0v0SOg2QU4HAa6aGLJd73duL6EoyDQzN4XXiMhQ$

Third, I think PPC32 would still not compile on JDK 8, because some massaging would be required to accept a new architecture in the build. I might be wrong about that part, though. I cannot remember what was the reason why my CIs are only building PPC64 Zero for JDK 8...

--
Thanks,
-Aleksey



More information about the build-dev mailing list