indygreg / python-build-standalone

Produce redistributable builds of Python
BSD 3-Clause "New" or "Revised" License
1.71k stars 107 forks source link

Is Clang required for source wheels? #230

Open HajoRed opened 3 months ago

HajoRed commented 3 months ago

Hey there,

I am currently trying to get an installation to work on Linux (specifically Ubuntu 20.04+) which is working so far. When trying to install some packages with pip which are only deployed as source code, installation fails with a clang not found message. Is Clang strictly needed for this scenario or can source packages be build with gcc as well? If they can be build with gcc, how can this be done?

Best regards

bluss commented 3 months ago

In many cases they can be built by just setting the environment variable, CC=gcc or CC=gcc-XY where XY is the version. In some cases however, there are harder issues which are not so easy to solve, see this chapter: https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#references-to-build-time-paths