ppc64le/build-scripts

grpc-java (core) build script doesn't work

Closed this issue · 8 comments

Base build platform: registry.access.redhat.com/ubi8/ubi-minimal.
JAVA version = open-jdk 8
gradle = distribution default
attemped grpc-version=1.15.1 and 1.28.1
build fails

@pratham-m can you please check?

Hi @afsanjar just to clarify the grpc-java (core) script builds only the core component, and not the entire repository.
And your requirement is also to build just the core component. is that correct understanding?

@afsanjar
The script was originally written and tested on registry.access.redhat.com/rhel:7.6 base image.
I verified on RHEL7.6 and the script works with minor JAVA version change on this line. Guess the default JAVA version is changed to 1.8.0.6.25 on registry.access.redhat.com/rhel:7.6 base image, since we published the script.

We can't use registry.access.redhat.com/ubi8/ubi-minimal as the base image since it doesn't have yum which is used to install some dependencies. Instead, I tried with registry.access.redhat.com/ubi8/ubi as the base image, and with below changes was able to build the core component.

  • Remove build-essential from this line and
  • Change this line to export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.282.b08-2.el8_3.ppc64le since the JDK is different on ubi8

Used 1.28.1 branch/tag and Gradle 6.2.2.
FYI @seth-priya

Works with registry.access.redhat.com/ubi8/ubi-minimal also. Just replace yum with microdnf in addition to 2 changes mentioned in my previous comment.

Shouldn't this be using one of :
ubi8/openjdk-8
ubi8/openjdk-11

then as the base image? Then you don't need to microndf/dnf/yum instsall it?

so @gerrith3 , it does sound like the correct approach given the issue we ran into here, however, we typically create the builds scripts for and test them on basic RHEL or UBI base because we want to be sure that we are installing all the needed dependencies explicitly as we are not sure what the requesters / users might end up using... of course its different for containers where we optimize more as the base image is explicitly mentioned/pulled automatically at build time

@genisysram and @seth-priya
I believe our objects should be to provide the users:

  1. A Dockerfile - encapsulates all the build tools and dependencies for the given product.
  2. Build script - download (specify a version as arg, default is master), build, copy binary to the host shared volume, and cleanup.
  3. Documentation.
    Please use https://github.com/ppc64le/build-scripts/tree/master/a/activemq/Dockerfiles/redhat_ubi8 as a reference

Fixed by grpc-core build script updates, dockerfile added #842