Protoc dependency error
The build process of Ozone requires protoc 2.5.0 which doesn't have a version for Apple Silicon (M1, M1 Pro) machines. When you build Ozone on macOS with M1(Pro) chip, you will get following error.
Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.1:compile (compile-protoc-2) on project hdds-interface-client: Missing:
[ERROR] ----------
[ERROR] 1) com.google.protobuf:protoc:exe:osx-aarch_64:2.5.0
So If you would like to build Ozone on your macOS with M1(Pro) chip / ARM64 CPU, here is a simple solution.
Open your maven setting file under ~/.m2/settings.xml
or your customized location, specify the the properties os.detected.classifier
to be osx-x86_64 and active the profile.
<settings>
<activeProfiles>
<activeProfile>apple-silicon</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>apple-silicon</id>
<properties>
<os.detected.classifier>osx-x86_64</os.detected.classifier>
</properties>
</profile>
</profiles>
</settings>
Poorly performing Docker images
By default ozone-runner images (ones created locally after executing docker-compose
) are built for linux/amd64 architecture. If you experience issues such as slow startup of Recon/OM/SCM or never-ending commands like ozone sh volume create /volume
it might be due to wrong architecture.
To overcome this:
- clone ozone-docker-runner repo (https://github.com/apache/ozone-docker-runner)
- build local image for arm64 architecture:
docker buildx build --platform linux/arm64 -t apache/ozone-runner:dev . --progress=plain
- pass the local ozone-runner build version when building ozone distribution:
mvn clean install -DskipTests -Ddocker.ozone-runner.version=dev
1 Comment
Neil Joshi
Thanks to Mladjan Gadzic for his contribution for working with ozone docker images on M1.