adoptium / temurin-build

Eclipse Temurin™ build scripts - common across all releases/versions
Apache License 2.0
1.01k stars 246 forks source link

The tested number of bits differs when cross-compiling for powerpc #3883

Open hpckurt opened 1 month ago

hpckurt commented 1 month ago

Problem description: I'm currently trying to cross-compile jdk8u for powerpc-linux using the bootlin 13.2.0 toolchain and I'm running into an error. It happens with the standard GCC toolchain as well. When I go to run the configure script, it results in the following error:

configure: The tested number of bits in the target (64) differs from the number of bits expected to be found in the target (32).
configure: I'll retry after setting the platforms compiler target bits flag to -m32
checking size of int *... 0
configure: error: The tested number of bits in the target (0) differs from the number of bits expected to be found in the target (32)

The configure command I am running is bash configure --openjdk-target=powerpc-linux --with-jvm-variants=zero

Any help is appreciated.

EDIT: I'm using the Azul Zulu JDK 7 as my boot JDK.

hpckurt commented 1 month ago

Update: The same error occurs when building with an ubuntu 16.04 powerpc sysroot.

sxa commented 1 month ago

Just to be clear, are you intending to produce a 32-bit JDK? I had similar issues when trying to build a 32-bit JDK on a 64-bit x86 host at https://github.com/adoptium/temurin-build/issues/986#issuecomment-476324129

To be clear, this is not a platform or build environment which we would support or have the time to look into (we do linux-ppc64le but not 32-bit), but let is know if you manage to make it work. I'll tag in @AdamBrousseau since his team may have compiled parts of openjdk for Linux/ppc32 in the past in case they have any knowledge.

I'll also note that Adoptium builds JDK8 with GCC 7.5 and it will not necessarily build yet with the newer compilers, although there is some work upstream to improve that.

hpckurt commented 1 month ago

Unfortunately, that didn't work. It is for a 32 bit ppc jdk.