h2oai / datatable

A Python package for manipulating 2-dimensional tabular data structures
https://datatable.readthedocs.io
Mozilla Public License 2.0
1.82k stars 157 forks source link

Error when building with gcc on `arm64` #3430

Closed hallmeier closed 1 year ago

hallmeier commented 1 year ago

I read the related issues, but my error is not included. I can install the development version of datatable just fine (Chip: Apple M1 Max, OS: Ventura 13.1), except in docker (FROM python:3.11):

gcc: error: unrecognized command-line option ‘-m64’

clang understands this command line option, but gcc does not. That is why installation works on the system, but not in docker. The fix for me is simple, just remove the option:

RUN git clone https://github.com/h2oai/datatable datatable
RUN sed -i "/m64/d" datatable/ci/ext.py
RUN pip install datatable/.

But I assume the option has some purpose, so it should ideally be wrapped with an appropiate if-clause. I don't know what that would be, though.

oleksiyskononenko commented 1 year ago

Yeah, for the moment we didn’t port datatable to Apple CPUs. Even though you can build it, some tests are failing. We can work on a fix, however, our Jenkins/AppVeyor don’t have machines with Apple CPUs to test the changes.

oleksiyskononenko commented 1 year ago

@hallmeier btw, what was the docker operating system and gcc version?

hallmeier commented 1 year ago

The docker base image is python:3.11(.2-bullseye), so the operating system inside docker is Linux and the gcc version is gcc (Debian 10.2.1-6) 10.2.1 20210110.

hallmeier commented 1 year ago

Thanks for addressing this, and we're almost there! But I found on my ARM64 machine platform.machine() returns "aarch64" (an alias) instead of "arm64". So the line arm64 = (arch == "arm64") needs to be changed to arm64 = (arch == "aarch64") or arm64 = (arch in ["arm64", "aarch64"]) (I don't know if "arm64" is returned on some machines) and it would work.

oleksiyskononenko commented 1 year ago

Yes, on my M1 machine it returns arm64. Thanks for letting me know, I will push a fix.