Closed tekumara closed 9 months ago
When building extension wheels setuptools will try to use the compiler (ie: CC
) used to build python itself ...
In my case, my python binary was built on ubuntu where CC
was set to /usr/bin/aarch64-linux-gnu-gcc:
$ python3 -m sysconfig | grep -E '\bCC ='
CC = "/usr/bin/aarch64-linux-gnu-gcc"
But amazon/redhat linux has:
$ ls /usr/bin/ | grep gcc
aarch64-redhat-linux-gcc
aarch64-redhat-linux-gcc-7
So when I use my binary python on amazon linux it can't find gcc. To resolve this, override CC
with an env var, eg:
export CC = gcc
or link /usr/bin/aarch64-linux-gnu-gcc -> gcc