Need OpenJDK to be used on PowerPC for our products.

Aleksey Shipilev shade at redhat.com
Fri Jan 7 09:07:44 UTC 2022


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://builds.shipilev.net/openjdk-jdk/configure-logs/configure-openjdk-jdk-linux-ppc-zero-release-gcc10-glibc2.31.log
 
https://builds.shipilev.net/openjdk-jdk/build-logs/build-openjdk-jdk-linux-ppc-zero-release-gcc10-glibc2.31.log
   https://builds.shipilev.net/openjdk-jdk/openjdk-jdk-linux-ppc-zero-release-gcc10-glibc2.31.tar.xz

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://builds.shipilev.net/openjdk-jdk8/configure-logs/configure-linux-aarch64-server-fastdebug.log

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