You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "smengcl (via GitHub)" <gi...@apache.org> on 2025/11/03 21:26:45 UTC
[PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
smengcl opened a new pull request, #9242:
URL: https://github.com/apache/ozone/pull/9242
## What changes were proposed in this pull request?
There is a `cd ..` command that is not necessary.
The file modification step can be more streamlined. Along with other tweaks and fixes.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13877
## How was this patch tested?
- Tested manually on a fresh M4 MacBook Air.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9242:
URL: https://github.com/apache/ozone/pull/9242#issuecomment-3619001317
This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on PR #9242:
URL: https://github.com/apache/ozone/pull/9242#issuecomment-3640204526
Let's update the v2 doc and remove the protobuf 2.5 instructions there.
v1 doc will soon be deprecated (hopefully this time for real)
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #9242:
URL: https://github.com/apache/ozone/pull/9242#issuecomment-3634557965
> Thanks @smengcl for the fix. Unnecessary `cd ..` has been removed in [HDDS-13931](https://issues.apache.org/jira/browse/HDDS-13931) as a simple targeted fix. This PR can be updated for the remaining improvements.
>
> I agree with @bdemers suggestion in #9295: `sed` is better than manual edits, but `patch` is even better.
I like the idea. I have replaced `sed` with an inline patch. ptal.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #9242:
URL: https://github.com/apache/ozone/pull/9242#discussion_r2604587899
##########
hadoop-hdds/docs/content/start/FromSource.md:
##########
@@ -66,29 +66,40 @@ mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dver
cp $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe
```
-## ARM-based Apple Silicon (Apple M1 ... etc)
+## ARM-based Apple silicon (Apple M1, M2, etc.)
```bash
# Patch protobuf 2.5.0 - this is needed for Hadoop 2 support
-PROTOBUF_VERSION="2.5.0"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
tar xzf protobuf-2.5.0.tar.gz
-pushd protobuf-${PROTOBUF_VERSION}
-
-# Open the file `src/google/protobuf/stubs/platform_macros.h` with an editor like vim and append the following lines after line 59 (include the #).
-# Save the file when complete.
-
-#elif defined(__arm64__)
-#define GOOGLE_PROTOBUF_ARCH_ARM 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+pushd protobuf-2.5.0
+
+# Patch to insert arm64 macro
+patch << EOF
Review Comment:
The `patch` command should specify which file to patch. Consider using `patch -p1 < EOF` instead of `patch << EOF` to ensure the patch is applied correctly with the proper path stripping level.
```suggestion
patch -p1 <<'EOF'
```
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #9242:
URL: https://github.com/apache/ozone/pull/9242#discussion_r2487906618
##########
hadoop-hdds/docs/content/start/FromSource.md:
##########
@@ -66,30 +66,28 @@ mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dver
cp $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe
```
-## ARM-based Apple Silicon (Apple M1 ... etc)
+## ARM-based Apple silicon (Apple M1, M2, M3, M4, M5, etc.)
```bash
# Patch protobuf 2.5.0 - this is needed for Hadoop 2 support
-PROTOBUF_VERSION="2.5.0"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
tar xzf protobuf-2.5.0.tar.gz
-cd protobuf-${PROTOBUF_VERSION}
-
-# Open the file `src/google/protobuf/stubs/platform_macros.h` with an editor like vim and append the following lines after line 59 (include the #).
-# Save the file when complete.
+cd protobuf-2.5.0
-#elif defined(__arm64__)
-#define GOOGLE_PROTOBUF_ARCH_ARM 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+# Insert arm64 macro to src/google/protobuf/stubs/platform_macros.h
+sed -i '' '59 a\
+#elif defined(__arm64__)\
+#define GOOGLE_PROTOBUF_ARCH_ARM 1\
+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1' src/google/protobuf/stubs/platform_macros.h
Review Comment:
The `sed -i ''` syntax is macOS-specific (BSD sed). This command will fail on Linux systems which use GNU sed and require `sed -i` without the empty string. Since this section is specifically for Apple Silicon, this is acceptable, but consider adding a comment clarifying this is macOS-only or providing an alternative for users who might try this on Linux ARM systems.
##########
hadoop-hdds/docs/content/start/FromSource.md:
##########
@@ -66,30 +66,28 @@ mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dver
cp $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe
```
-## ARM-based Apple Silicon (Apple M1 ... etc)
+## ARM-based Apple silicon (Apple M1, M2, M3, M4, M5, etc.)
```bash
# Patch protobuf 2.5.0 - this is needed for Hadoop 2 support
-PROTOBUF_VERSION="2.5.0"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
tar xzf protobuf-2.5.0.tar.gz
-cd protobuf-${PROTOBUF_VERSION}
-
-# Open the file `src/google/protobuf/stubs/platform_macros.h` with an editor like vim and append the following lines after line 59 (include the #).
-# Save the file when complete.
+cd protobuf-2.5.0
-#elif defined(__arm64__)
-#define GOOGLE_PROTOBUF_ARCH_ARM 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+# Insert arm64 macro to src/google/protobuf/stubs/platform_macros.h
+sed -i '' '59 a\
+#elif defined(__arm64__)\
+#define GOOGLE_PROTOBUF_ARCH_ARM 1\
+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1' src/google/protobuf/stubs/platform_macros.h
# Execute the following commands to build `protoc`
./configure --disable-shared
make -j
-cd ..
+
Review Comment:
The `cd ..` command was removed but there's no corresponding change back to the original directory before running `mvn install:install-file`. The `mvn` command references `-Dfile=src/protoc` which is a relative path from the `protobuf-2.5.0` directory. This command should either include `cd ..` before it or update the path to `-Dfile=protobuf-2.5.0/src/protoc`.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #9242:
URL: https://github.com/apache/ozone/pull/9242#issuecomment-3644439991
> Let's update the v2 doc and remove the protobuf 2.5 instructions there. v1 doc will soon be deprecated (hopefully this time for real)
We still need this for Ozone 2.1 dev. It is no longer necessary from 2.2 and onwards.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #9242:
URL: https://github.com/apache/ozone/pull/9242#discussion_r2487902678
##########
hadoop-hdds/docs/content/start/FromSource.md:
##########
@@ -66,30 +66,28 @@ mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dver
cp $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe
```
-## ARM-based Apple Silicon (Apple M1 ... etc)
+## ARM-based Apple silicon (Apple M1, M2, M3, M4, M5, etc.)
```bash
# Patch protobuf 2.5.0 - this is needed for Hadoop 2 support
-PROTOBUF_VERSION="2.5.0"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
tar xzf protobuf-2.5.0.tar.gz
-cd protobuf-${PROTOBUF_VERSION}
-
-# Open the file `src/google/protobuf/stubs/platform_macros.h` with an editor like vim and append the following lines after line 59 (include the #).
-# Save the file when complete.
+cd protobuf-2.5.0
-#elif defined(__arm64__)
-#define GOOGLE_PROTOBUF_ARCH_ARM 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+# Insert arm64 macro to src/google/protobuf/stubs/platform_macros.h
Review Comment:
Remove trailing whitespace at the end of the comment line.
```suggestion
# Insert arm64 macro to src/google/protobuf/stubs/platform_macros.h
```
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #9242:
URL: https://github.com/apache/ozone/pull/9242#discussion_r2488197452
##########
hadoop-hdds/docs/content/start/FromSource.md:
##########
@@ -66,30 +66,28 @@ mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dver
cp $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe
```
-## ARM-based Apple Silicon (Apple M1 ... etc)
+## ARM-based Apple silicon (Apple M1, M2, M3, M4, M5, etc.)
```bash
# Patch protobuf 2.5.0 - this is needed for Hadoop 2 support
-PROTOBUF_VERSION="2.5.0"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
tar xzf protobuf-2.5.0.tar.gz
-cd protobuf-${PROTOBUF_VERSION}
-
-# Open the file `src/google/protobuf/stubs/platform_macros.h` with an editor like vim and append the following lines after line 59 (include the #).
-# Save the file when complete.
+cd protobuf-2.5.0
-#elif defined(__arm64__)
-#define GOOGLE_PROTOBUF_ARCH_ARM 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+# Insert arm64 macro to src/google/protobuf/stubs/platform_macros.h
Review Comment:
> ./google/protobuf/stubs/platform_macros.h:63:2: error: Host architecture was not detected as supported by protobuf
> 63 | #error Host architecture was not detected as supported by protobuf
> | ^
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on PR #9242:
URL: https://github.com/apache/ozone/pull/9242#issuecomment-3533686994
Is this intended to match the steps on the [new website](https://ozone-site-v2.staged.apache.org/docs/developer-guide/build/maven#additional-steps-required-for-arm-based-apple-silicon-macs-m1-etc)?
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #9242:
URL: https://github.com/apache/ozone/pull/9242#issuecomment-3534269236
Thanks @smengcl for the fix. Unnecessary `cd ..` has been removed in HDDS-13931 as a simple targeted fix. This PR can be updated for the remaining improvements.
I agree with @bdemers suggestion in #9295: `sed` is better than manual edits, but `patch` is even better.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #9242:
URL: https://github.com/apache/ozone/pull/9242#discussion_r2488206578
##########
hadoop-hdds/docs/content/start/FromSource.md:
##########
@@ -66,30 +66,28 @@ mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dver
cp $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe
```
-## ARM-based Apple Silicon (Apple M1 ... etc)
+## ARM-based Apple silicon (Apple M1, M2, M3, M4, M5, etc.)
```bash
# Patch protobuf 2.5.0 - this is needed for Hadoop 2 support
-PROTOBUF_VERSION="2.5.0"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
tar xzf protobuf-2.5.0.tar.gz
-cd protobuf-${PROTOBUF_VERSION}
-
-# Open the file `src/google/protobuf/stubs/platform_macros.h` with an editor like vim and append the following lines after line 59 (include the #).
-# Save the file when complete.
+cd protobuf-2.5.0
-#elif defined(__arm64__)
-#define GOOGLE_PROTOBUF_ARCH_ARM 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+# Insert arm64 macro to src/google/protobuf/stubs/platform_macros.h
+sed -i '' '59 a\
+#elif defined(__arm64__)\
+#define GOOGLE_PROTOBUF_ARCH_ARM 1\
+#define GOOGLE_PROTOBUF_ARCH_64_BIT 1' src/google/protobuf/stubs/platform_macros.h
Review Comment:
The following update works for me
```suggestion
sed -i '' '59 a\
#elif defined(__arm64__)\
#define GOOGLE_PROTOBUF_ARCH_ARM 1\
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1\
' src/google/protobuf/stubs/platform_macros.h
```
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #9242:
URL: https://github.com/apache/ozone/pull/9242#issuecomment-3634466570
> Is this intended to match the steps on the [new website](https://ozone-site-v2.staged.apache.org/docs/developer-guide/build/maven#additional-steps-required-for-arm-based-apple-silicon-macs-m1-etc)?
ah yup, that needs to be updated as well. Will file another PR for that. Thanks for the reminder.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on code in PR #9242:
URL: https://github.com/apache/ozone/pull/9242#discussion_r2604590151
##########
hadoop-hdds/docs/content/start/FromSource.md:
##########
@@ -66,29 +66,40 @@ mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dver
cp $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe
```
-## ARM-based Apple Silicon (Apple M1 ... etc)
+## ARM-based Apple silicon (Apple M1, M2, etc.)
```bash
# Patch protobuf 2.5.0 - this is needed for Hadoop 2 support
-PROTOBUF_VERSION="2.5.0"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
tar xzf protobuf-2.5.0.tar.gz
-pushd protobuf-${PROTOBUF_VERSION}
-
-# Open the file `src/google/protobuf/stubs/platform_macros.h` with an editor like vim and append the following lines after line 59 (include the #).
-# Save the file when complete.
-
-#elif defined(__arm64__)
-#define GOOGLE_PROTOBUF_ARCH_ARM 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+pushd protobuf-2.5.0
+
+# Patch to insert arm64 macro
+patch << EOF
Review Comment:
It is tested working in my env.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #9242:
URL: https://github.com/apache/ozone/pull/9242#discussion_r2488205998
##########
hadoop-hdds/docs/content/start/FromSource.md:
##########
@@ -66,30 +66,28 @@ mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dver
cp $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64 $HOME/.m2/repository/com/google/protobuf/protoc/2.5.0/protoc-2.5.0-linux-aarch_64.exe
```
-## ARM-based Apple Silicon (Apple M1 ... etc)
+## ARM-based Apple silicon (Apple M1, M2, M3, M4, M5, etc.)
```bash
# Patch protobuf 2.5.0 - this is needed for Hadoop 2 support
-PROTOBUF_VERSION="2.5.0"
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
tar xzf protobuf-2.5.0.tar.gz
-cd protobuf-${PROTOBUF_VERSION}
-
-# Open the file `src/google/protobuf/stubs/platform_macros.h` with an editor like vim and append the following lines after line 59 (include the #).
-# Save the file when complete.
+cd protobuf-2.5.0
-#elif defined(__arm64__)
-#define GOOGLE_PROTOBUF_ARCH_ARM 1
-#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+# Insert arm64 macro to src/google/protobuf/stubs/platform_macros.h
Review Comment:
The following update works for me
```suggestion
# Insert arm64 macro to src/google/protobuf/stubs/platform_macros.h
sed -i '' '59 a\
#elif defined(__arm64__)\
#define GOOGLE_PROTOBUF_ARCH_ARM 1\
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1\
' src/google/protobuf/stubs/platform_macros.h
```
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #9242:
URL: https://github.com/apache/ozone/pull/9242#issuecomment-3638594876
Would you like to take a look @adoroszlai ?
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang merged PR #9242:
URL: https://github.com/apache/ozone/pull/9242
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-13877. Fix and tweak Apple silicon protobuf 2.5.0 build section [ozone]
Posted by "smengcl (via GitHub)" <gi...@apache.org>.
smengcl commented on PR #9242:
URL: https://github.com/apache/ozone/pull/9242#issuecomment-3644440819
Thanks @jojochuang @adoroszlai for reviewing this.
--
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-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org