Copilot commented on code in PR #9049: URL: https://github.com/apache/ozone/pull/9049#discussion_r2361791928
########## hadoop-hdds/docs/content/start/FromSource.md: ########## @@ -95,6 +95,35 @@ make mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=${PROTOBUF_VERSION} -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=src/protoc # workaround for Maven 3.9.x. Not needed for 3.8.x or earlier cp $HOME/.m2/repository/com/google/protobuf/protoc/${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-osx-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-osx-aarch_64.exe + +cd .. +# Patch protobuf 3.19.6 +PROTOBUF_VERSION="3.19.6" +curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-all-${PROTOBUF_VERSION}.tar.gz +tar xzf protobuf-all-${PROTOBUF_VERSION}.tar.gz +cd protobuf-${PROTOBUF_VERSION} +./configure --disable-shared +make -j +mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=${PROTOBUF_VERSION} -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=src/protoc +# workaround for Maven 3.9.x. Not needed for 3.8.x or earlier +cp $HOME/.m2/repository/com/google/protobuf/protoc/${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-osx-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-osx-aarch_64.exe + +cd .. +# Compile grpc +# Pre-req: Manually install gradle (www.gradle.org) and a jvm compatible with installed gradle version +git clone https://github.com/grpc/grpc-java.git +cd grpc-java +git checkout v1.71.0 +PARENTDIR=$(cd .. && pwd) +PROTOBUF_ROOT="$PARENTDIR/protobuf-${PROTOBUF_VERSION}" +PATH="${PROTOBUF_ROOT}/src:$PATH" +CPPFLAGS="-I${PROTOBUF_ROOT}/src" +LDFLAGS="-L${PROTOBUF_ROOT}/src/.libs" Review Comment: The environment variables CPPFLAGS and LDFLAGS are set but not exported. These should be exported to ensure they are available to the gradle build process: `export CPPFLAGS=...` and `export LDFLAGS=...`. ```suggestion export CPPFLAGS="-I${PROTOBUF_ROOT}/src" export LDFLAGS="-L${PROTOBUF_ROOT}/src/.libs" ``` ########## hadoop-hdds/docs/content/start/FromSource.md: ########## @@ -95,6 +95,35 @@ make mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=${PROTOBUF_VERSION} -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=src/protoc # workaround for Maven 3.9.x. Not needed for 3.8.x or earlier cp $HOME/.m2/repository/com/google/protobuf/protoc/${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-osx-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-osx-aarch_64.exe + +cd .. +# Patch protobuf 3.19.6 +PROTOBUF_VERSION="3.19.6" +curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-all-${PROTOBUF_VERSION}.tar.gz +tar xzf protobuf-all-${PROTOBUF_VERSION}.tar.gz +cd protobuf-${PROTOBUF_VERSION} +./configure --disable-shared +make -j +mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=${PROTOBUF_VERSION} -Dclassifier=osx-aarch_64 -Dpackaging=exe -Dfile=src/protoc +# workaround for Maven 3.9.x. Not needed for 3.8.x or earlier +cp $HOME/.m2/repository/com/google/protobuf/protoc/${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-osx-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-osx-aarch_64.exe + +cd .. +# Compile grpc +# Pre-req: Manually install gradle (www.gradle.org) and a jvm compatible with installed gradle version Review Comment: The prerequisite comment lacks specific version requirements. Consider specifying the minimum Gradle version and compatible JVM versions needed for building gRPC Java to help users avoid compatibility issues. ```suggestion # Pre-req: Manually install Gradle (version 7.0 or higher) and a compatible JVM (JDK 8 or higher) as required by gRPC Java v1.71.0. See https://github.com/grpc/grpc-java/blob/v1.71.0/README.md for details. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org