-
Notifications
You must be signed in to change notification settings - Fork 449
Description
Expected Behavior
Hyperledger Cello should build and run correctly on macOS with Apple Silicon (M1/M2/M3) processors using the standard setup instructions.
Current Behavior
The build process fails on Apple Silicon Macs with architecture-related errors. Services fail to start properly due to platform compatibility issues between ARM64 architecture and the default amd64/x86_64 Docker images.
Possible Solution
Implement architecture-specific configurations and build options to properly support ARM64-based systems. This includes modifying Docker configurations to specify platform requirements and creating ARM64-specific Dockerfiles where needed.-
Steps to Reproduce
- Clone the Hyperledger Cello repository on a Mac with Apple Silicon
- Follow standard setup instructions in the documentation
- Run
make docker
to build images - Execute
make start
to start the services - Observe platform/architecture-related errors in the logs
Context (Environment)
- OS: macOS Ventura/Sonoma (13.x/14.x)
- Architecture: arm64 (Apple Silicon)
- Docker version: 24.0.6
- Docker compose version: v2.23.0-desktop.1
- Kubernetes version: N/A (using Docker Compose)
Detailed Description and log
When attempting to set up Hyperledger Cello on Apple Silicon Macs, multiple architecture compatibility issues arise:
- Image Build Failures:
failed to solve: process "/bin/sh -c apt-get update && apt-get install -y ..." did not complete successfully: exit code: 1
- Runtime Platform Errors:
standard_init_linux.go:228: exec user process caused: exec format error
- Application Crashes:
Illegal instruction: 4
These errors occur because the current Docker images are built for amd64/x86_64 architecture and run through Rosetta 2 emulation on Apple Silicon, causing compatibility issues.
Possible Implementation
Our implementation adds ARM64 support through separate configuration files that won't affect existing AMD64 users:
- Architecture-specific Docker Files:
- Create
docker-compose.arm64.yml
with platform specifications - Add
Dockerfile.arm64
variants for services requiring ARM64-specific builds
- Dedicated Build Process:
- Implement
build_arm64.sh
script for Apple Silicon users - Add architecture detection to suggest correct commands based on CPU
- Documentation:
- Add a dedicated "Apple Silicon Setup" section to the documentation
- Create clear guides for macOS users without changing instructions for other platforms
This approach ensures:
- No disruption to existing AMD64/x86_64 users
- Clean path for Apple Silicon users
- Easy maintenance as each architecture has isolated configuration files
With the growing adoption of Apple Silicon in the developer community, this addition will remove a significant barrier to entry for macOS users wanting to contribute to Hyperledger Cello.