datafusion-ballista icon indicating copy to clipboard operation
datafusion-ballista copied to clipboard

Cannot build Docker images on macOS 12.5.1 with M1 chip

Open andygrove opened this issue 3 years ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

#6 3.081 cc1: error: unrecognized command line option '-m64'
#6 3.083 make[1]: *** [Makefile:678: apps/app_rand.o] Error 1
#6 3.083 make[1]: Leaving directory '/tmp/openssl-1.1.1b'

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

andygrove avatar Sep 17 '22 15:09 andygrove

Docker on M1 leverages aarch64 which is causing the failure. The docker build code currently is based on x86_64 architecture. Support for x86_64 in Mac is provided using Rosetta. We can force docker to use it https://github.com/apache/arrow-ballista/pull/239

If we use Rosetta, the emulation is increasing the integration tests duration considerably. I think it is beneficial to add support for aarch64. https://github.com/apache/arrow-ballista/pull/240 (* This is my first contribution. Please do let me know if there is a discussion forum to propose such changes)

rahull-p avatar Sep 18 '22 14:09 rahull-p

This is resolved with the recent change of installing openssl instead of building it from source. It handles the above architecture discrepancy

rahull-p avatar Oct 19 '22 10:10 rahull-p

I confirmed that I can now build docker images and run docker compose on Mac M1. Thanks @rahulpenti and @avantgardnerio

andygrove avatar Oct 20 '22 14:10 andygrove