ppc64le / build-scripts

Build scripts for open source projects on Linux on POWER LE
Apache License 2.0
79 stars 247 forks source link

Please modify the build script a/apicurio-registry/apicurio-registry_rhel8.sh #832

Open afsanjar opened 3 years ago

afsanjar commented 3 years ago

1) Has the embedded patch in the build script pushed upstream? 2) Is the patch dependent on a specific grpc-java version? if yes, please modify the "git clone.." 3) Isolate the path in a separate file 4) Include a grpc-java build Dockerfile (preferably base on a rh_ubi image) Use a/apicurio-registry/apicurio-registry_rhel8.sh as a reference.

seth-priya commented 3 years ago

@shirodkara please address / respond

shirodkara commented 3 years ago

@afsanjar @seth-priya

1. Has the embedded patch in the build script pushed upstream?

No this hasn't been pushed upstream

2. Is the patch dependent on a specific grpc-java version? if yes, please modify the "git clone.."

this isn't for a specific version , but yes using a version is a better, will add the version to the "git clone.."

The change done was because on RHEL8 there is no libstdc++-static available (more info here : https://access.redhat.com/articles/rhel8-abi-compatibility in the section "Static Linking with the C/C++ Runtime")

gerrith3 commented 3 years ago

@shirodkara can you clarify why this patch wasn't pushed upstream? It seems like it should be?

shirodkara commented 3 years ago

@gerrith3

Based on https://github.com/grpc/grpc-java/issues/7757 it looked like they needed static linking for protobuf for most platforms.

Nevertheless , I have asked them whether we can upstream this , if they confirm , I'll raise a PR for this.

afsanjar commented 3 years ago

@shirodkara could you add a condition check in your patch similar to: if (System.getProperty('os.arch').contains('ppc64')){ linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-static-libgcc", "-Wl,-Bdynamic", "-lpthread", "-s" } else { linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-static-libgcc", "-static-libstdc++", "-Wl,-Bdynamic", "-lpthread", "-s" }

gerrith3 commented 3 years ago

@shirodkara Any progress on this one? Seems like @afsanjar 's solution is simple enough?

seth-priya commented 1 year ago

The changes mentioned above were upstreamed to grpc-java as part of https://github.com/grpc/grpc-java/commit/a6d78c5e3e7f3091e2b84c3afda5f91f51fbe2d6