[ 
https://issues.apache.org/jira/browse/TEZ-4300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17494564#comment-17494564
 ] 

Martin Tzvetanov Grigorov edited comment on TEZ-4300 at 2/18/22, 11:54 AM:
---------------------------------------------------------------------------

Using Bash didn't help!

But applying the patch helped!

I just needed to make the following patch on top of it:
{code:java}
 diff --git build-tools/install-protobuf.sh build-tools/install-protobuf.sh
index 0ccfc6dee..cc3e43cb5 100755
--- build-tools/install-protobuf.sh
+++ build-tools/install-protobuf.sh
@@ -47,7 +47,11 @@ function install_protobuf {
                 FILE_NAME="protoc-$PROTOBUF_VERSION-osx-x86_64"
                 ;;
             Linux)
-                FILE_NAME="protoc-$PROTOBUF_VERSION-linux-x86_64"
+                ARCH=`uname -m`
+                if test $ARCH = "aarch64"; then
+                  ARCH="aarch_64"
+                fi
+                FILE_NAME="protoc-$PROTOBUF_VERSION-linux-$ARCH"
                 ;;
             *)
{code}
Now I am building with 3.19.4


was (Author: mgrigorov):
Using Bash didn't help!

But applying the patch helped!

I just needed to make the following patch on top of it:
{code:java}
 diff --git build-tools/install-protobuf.sh build-tools/install-protobuf.sh
index 0ccfc6dee..cc3e43cb5 100755
--- build-tools/install-protobuf.sh
+++ build-tools/install-protobuf.sh
@@ -47,7 +47,11 @@ function install_protobuf {
                 FILE_NAME="protoc-$PROTOBUF_VERSION-osx-x86_64"
                 ;;
             Linux)
-                FILE_NAME="protoc-$PROTOBUF_VERSION-linux-x86_64"
+                ARCH=`uname -m`
+                if test $ARCH = "aarch64"; then
+                  ARCH="aarch_64"
+                fi
+                FILE_NAME="protoc-$PROTOBUF_VERSION-linux-$ARCH"
                 ;;
             *)
{code}
 

> Download protoc automatically compile/development time
> ------------------------------------------------------
>
>                 Key: TEZ-4300
>                 URL: https://issues.apache.org/jira/browse/TEZ-4300
>             Project: Apache Tez
>          Issue Type: Sub-task
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>         Attachments: TestDAGRecovery-tez-tests.tgz, 
> org.apache.tez.dag.app.TestRecoveryParser-output.txt, 
> org.apache.tez.dag.app.dag.impl.TestDAGRecovery-output.txt, 
> org.apache.tez.dag.history.events.TestHistoryEventsProtoConversion-output.txt,
>  tez_build_protobuf_3_7_1.log
>
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> Currently, Tez cannot be built out of the box because tez-api needs a 
> protobuf compiler (protoc executable), which was also a problematic 
> dependency in a sense that downloading/installing it is a burden on 
> developers. Even if we have tons of 
> [gists|https://gist.github.com/abstractdog/1eddeac9cc09815ded5253e3a83293a8] 
> for that, it's still uncomfortable. Not to mention if we want to support more 
> versions at the same time. 
> Shipping the typically used versions (2.5.0, 3.x for later) of the protoc 
> executable could make sense, but I'm not sure at the moment if it has any 
> license issues, [need to 
> check|https://github.com/protocolbuffers/protobuf/blob/master/LICENSE], also 
> it's not general, instead an intelligent script could do it for developers.
> For 2.5, it should be done from source: 
> https://github.com/protocolbuffers/protobuf/releases/tag/v2.5.0
> But for newer versions, the protoc executable can be downloaded from the 
> releases page: https://github.com/protocolbuffers/protobuf/releases/tag/v3.7.1
> https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protoc-3.7.1-osx-x86_64.zip
> https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protoc-3.7.1-linux-x86_64.zip



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to